Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Unable to connect multiple container instances in while app is running in heroku #85

@lexTutor

Description

@lexTutor

When I try making a http call to the another container that has been successfully deployed, but I get the following error

66" dyno=web.1 connect=0ms service=180ms status=500 bytes=130 protocol=https 2021-07-01T21:31:48.960659+00:00 app[web.1]: fail: Microsoft.AspNetCore.Server.Kestrel[13] 2021-07-01T21:31:48.960660+00:00 app[web.1]: Connection id "0HM9SQU8JCHRP", Request id "0HM9SQU8JCHRP:00000002": An unhandled exception was thrown by the application. 2021-07-01T21:31:48.960661+00:00 app[web.1]: System.Net.Http.HttpRequestException: Name or service not known (dockercomposetest.rabbitmqpublisher:443) 2021-07-01T21:31:48.960661+00:00 app[web.1]: ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known 2021-07-01T21:31:48.960666+00:00 app[web.1]: at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)

I tried working my way around it to no avail. Some resources stated that I have to use the hostname of the container to make the httpclient call (and I have no idea how to get the hostname of an docker container) and others stated that multi container communication is not allowed except using docker swarm add on.

Any help will be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions