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
HttpClient post request throws exception "Couldn't connect to server" in ubuntu server #23754
Comments
What kind of exception is it? What's its message? Inner exception? |
The shown stack trace is all that I have, more precisely this is all that was in systemctl status. |
Ok, I got it.
The interesting thing that the serivce where I do post request is pinging ok, telnet is ok. More over is on the same linux machine. |
Any ideas guys or provided information is not enough? |
What about the actual port this would connect to? Are you able to make the same request using curl from the command line? |
Hi everyone, sorry for the delay and waste of your time.
The request is going to my java app and post method looks as following (also important thing do not forget to register JacksonFeature, for java developers just in case):
Thanks for everyone sorry again for my inattention and I think the issue can be closed. In any case is interesting why the Exception object told me one information like "Couldn't connect to the server" but there was completely different problem. Best regards, Victor. |
Thanks, @loopnotzero. |
The deployment I'm doing in ubuntu server in pair of Kestrel, Nginx e.t.c.
All the steps from this documentation: https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction?tabs=aspnetcore2x
Ubuntu information:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
So, the problem as I see from the stack trace is exactly on the HttpClient initialization .cs line 34
Full stack trace:
Here is example how I'm doing the request:
This static method is placed in static class so called AccountManager and this method is doing post request to another service to register an account.
This method is invoked from the post async controller you can see it a little below
The text was updated successfully, but these errors were encountered: