-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with accessing RabbitMQ - different hostname #3
Comments
How did you run DShop.Api? Was it via Docker image or Dotnet CLI? As far as I remember the default appsettings.json contains Anyway, let me know how did you try to run it ;) |
I tried to run the application in 2 different approaches :D
For the second one, I can add a network to compose files to allow running different docker containers with a connection to this network. |
I'm not quite sure why do we have |
Yes :) But what about option 2 - is it OK to add network information to compose files? |
@GooRiOn For my instance using default RabbitMQ settings and changing to |
// there are so many repositories, that I don't know where I should put this issue ;)
I created the whole infrastructure by docker compose and tried to run the DShop.Api. And I encountered an error:
An exception of type 'RabbitMQ.Client.Exceptions.BrokerUnreachableException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'None of the specified endpoints were reachable'
I investigated that issue and found out that application uses
appsettings.development.json
file, where there is RabbitMQ configuration -"hostnames": [ "rabbitmq" ]
Unfortunately all resources are created by docker compose on localhost (there is no mentioning a different host), and application cannot connect to RabbitMQ which causes error.
When i hacked RabbitMQ configuration's resolving by
rawRabbitConfiguration.Hostnames[0] = "localhost";
line in DShop.Common application started without problem.My question - is this my problem with running this repo or did you make a mistake with configuration with RabbitMQ?
The text was updated successfully, but these errors were encountered: