Cannot assign requested address #1929
Replies: 4 comments 2 replies
-
I'm also experiencing this issue. This is specifically with a dockerized gateway. I have run a standard gateway and can get it to reach the apis fine. with an exact duplicate config.json. it seems to be resolving the downstream urls correctly, I can copy and paste them from the console into postman and they run just fine. Here's my config.json And my error logs.
I have also disabled https to try to simplify the issue further. On both the apis and the gateway. |
Beta Was this translation helpful? Give feedback.
-
Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
I think it has something to do with the docker routing. Might be worth trying to point to the actual container IP while this issue gets fixed.
|
Beta Was this translation helpful? Give feedback.
-
I had a similar problem, I think docker has an internal DNS server or something and So in the ocelot.json file, instead of: "DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 6001
}
], you write, "DownstreamHostAndPorts": [
{
"Host": "my.api", // !!!
"Port": 6001
}
], Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
I have done my first example with oclet with docker. I have 2 images 1 is my ocelot apigateway running on localhost:6002 and one is my api running on localhost:6001
Here my config:
If I run http://localhost:6001/api/v1/authentication/authenticate everything works fine. But if I call this endpoint trough the apigateway I see in the logs the following error
I see that ocelot is trying to call this url and calling this with postman it works fine
Downstream url is http://localhost:6001/api/v1/authentication/authenticate
I think I made some beginner error but I can't find him
Thanks
Beta Was this translation helpful? Give feedback.
All reactions