Can't make requests from other containers in the same docker network #219
-
|
I have a Python script which uses When I run If I run the Python script in Docker using the same docker compose file (and the same default network), the script will get The port is opened with I don't have this issue with any other dockerized IB GWs (for example this) so it must be a bug I guess? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
This works fine, i use it every day. there must be an error on your docker-compose or in the way you are using the API. what do you mean by Regarding how to use a script in as a separate service, please check #83 for an example |
Beta Was this translation helpful? Give feedback.
-
|
Docker compose: If I run the docker compose and use my python script outside docker (just with But if I use the python script inside the above docker compose, it tries If I replace IB GW with for example this other docker image, there's no issues inside docker network. |
Beta Was this translation helpful? Give feedback.
@gnzsnz It seems that it doesn't work if port number is mapped to another.
I replaced "127.0.0.1:8888:4003" with "127.0.0.1:4003:4003" and now I can connect fine to
ib-gateway:4003.EDIT: Though after a while I started to see this in IB GW after every request and I have to keep restarting it:
2025/01/17 14:25:32 socat[451] E connect(5, AF=2 127.0.0.1:4001, 16): Connection timed out