2FA is successfull when starting the docker, and yet I'm not able to connect to the API #250
-
Hi everybody, I need some help please. In paper mode, all is fine. When starting the docker in live mode, I receive the 2FA on my phone, which I promptly acknowledge. This is correctly reflected in the docker logs, as expected: 2025-03-22 15:27:19:105 IBC: Second Factor Authentication initiated So far, so good. However, after this, when then I try to connect to the API, the troubles begin. For example, this simple script fails with timeout error (regardless of the client id that I use):
2025-03-22 15:27:42,546 ib_insync.client INFO Connecting to 127.0.0.1:4001 with clientId 1234... Same outcome when using telnet to test the connectivity: Trying 127.0.0.1... When checking the tcpdump output, I can clearly see that, as soon as the connection is successfully completed, the server initiates a connection termination with FIN, which is then acknowledged and mirrored by the client: 07:52:10.620266 IP (tos 0x0, ttl 64, id 44595, offset 0, flags [DF], proto TCP (6), length 52) 07:52:10.620787 IP (tos 0x0, ttl 64, id 7837, offset 0, flags [DF], proto TCP (6), length 52) 07:52:10.620887 IP (tos 0x0, ttl 64, id 7838, offset 0, flags [DF], proto TCP (6), length 52) Has anybody encountered similar issues when connecting in live mode? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Please make sure that you are mapping ports to the outside correctly. The docker compose file in the repo is tested and working. Another thing to try is to enable api logs trough vnc and check the output in ib gateway Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
After updating to the latest stable docker image, I get a similar problem here. The auto login and 2FA works fine, but my client can't connect to the 4001 port. The port forwarding is fine since I can vncviewer into the container fine. My IB client is getting the following error: It talks about the 'Enable ActiveX and Socket Clients' option, but that option seems to no longer exist in the IB Gateway settings GUI that I see in vncviewer. Anyone know what's going on? |
Beta Was this translation helpful? Give feedback.
Please make sure that you are mapping ports to the outside correctly. The docker compose file in the repo is tested and working.
Another thing to try is to enable api logs trough vnc and check the output in ib gateway
Hope this helps.