I have spent a lot of time and tried everything that I could find on Google but could not make it work.
But I can't send requests from my app, something like the following:
var response = await (await httpClient.GetAsync($"requestString}")).Content.ReadAsStringAsync();
At this part of code i have error:
Unhandled exception rendering component: Resource temporarily unavailable System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace ---
Turn off firewalld, then restart docker.
sudo systemctl stop firewalld
sudo systemctl disable firewalld
I had a similar problem with a netcore app which could not access a custom hosts entry.
Kudos to @gekctek for pointing me in the right direction, I found that my docker container could access the internet, but that the container could not access a custom entry in my host's /etc/hosts file
To get around this, I added a volume mapping in the docker-compose file so that the container's /etc/hosts entry would match that of the host, and it worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With