Skip to content
This repository has been 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

Open
lexTutor opened this issue Jul 1, 2021 · 0 comments

Comments

@lexTutor
Copy link

lexTutor commented Jul 1, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant