Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Connect to the IBGateway failed - aarch #112

Closed
kooyear opened this issue May 18, 2024 · 7 comments
Closed

Connect to the IBGateway failed - aarch #112

kooyear opened this issue May 18, 2024 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@kooyear
Copy link

kooyear commented May 18, 2024

Describe the bug

If followed the documentation, and docker-compose up to run the contianer, and try to connect to it, but I got following error

ib-gateway_1 | 2024-05-18 07:29:31:800 IBC: Waiting for config dialog future to complete
ib-gateway_1 | 2024-05-18 07:29:31:800 IBC: Getting main window
ib-gateway_1 | 2024-05-18 07:29:31:800 IBC: Creating main window future
ib-gateway_1 | 2024-05-18 07:29:32:452 IBC: detected frame entitled: IBKR Gateway; event=Opened
ib-gateway_1 | 2024-05-18 07:29:32:453 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
ib-gateway_1 | 2024-05-18 07:29:32:453 IBC: trading mode from settings: tradingMode=live
ib-gateway_1 | 2024-05-18 07:29:32:453 IBC: Setting Trading mode = live
ib-gateway_1 | 2024-05-18 07:29:32:532 IBC: Setting user name
ib-gateway_1 | 2024-05-18 07:29:32:532 IBC: Setting password
ib-gateway_1 | 2024-05-18 07:29:32:533 IBC: Login attempt: 1
ib-gateway_1 | 2024-05-18 07:29:32:533 IBC: detected frame entitled: IBKR Gateway; event=Activated
ib-gateway_1 | 2024-05-18 07:29:32:535 IBC: detected frame entitled: IBKR Gateway; event=Focused
ib-gateway_1 | 2024-05-18 07:29:32:552 IBC: Click button: Log In
ib-gateway_1 | 2024-05-18 07:29:33:692 IBC: detected frame entitled: IBKR Gateway; event=Lost focus
ib-gateway_1 | 2024-05-18 07:29:33:693 IBC: detected frame entitled: IBKR Gateway; event=Deactivated
ib-gateway_1 | 2024-05-18 07:29:33:693 IBC: detected frame entitled: Loading...; event=Activated
ib-gateway_1 | 2024-05-18 07:29:33:698 IBC: detected frame entitled: Loading...; event=Focused
ib-gateway_1 | 2024-05-18 07:29:33:698 IBC: detected frame entitled: Loading...; event=Opened
ib-gateway_1 | 2024-05-18 07:29:33:698 IBC: Found Gateway main window
ib-gateway_1 | 2024-05-18 07:29:33:699 IBC: Got main window from future
ib-gateway_1 | 2024-05-18 07:29:33:699 IBC: Invoking config dialog menu
ib-gateway_1 | 2024/05/18 07:29:34 socat[116] E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused
ib-gateway_1 | 2024-05-18 07:29:34:412 IBC: detected frame entitled: Loading...; event=Lost focus
ib-gateway_1 | 2024-05-18 07:29:34:413 IBC: detected frame entitled: Loading...; event=Deactivated
ib-gateway_1 | 2024-05-18 07:29:34:413 IBC: detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Activated
ib-gateway_1 | 2024-05-18 07:29:34:415 IBC: detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Focused
ib-gateway_1 | 2024-05-18 07:29:34:415 IBC: detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Opened
ib-gateway_1 | 2024-05-18 07:29:36:004 IBC: detected dialog entitled: Second Factor Authentication; event=Opened
ib-gateway_1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ib-gateway_1 | 2024-05-18 07:29:36:004 IBC: You should specify the required second factor device using the SecondFactorDevice setting in config.ini
ib-gateway_1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ib-gateway_1 | 2024-05-18 07:29:36:004 IBC: detected frame entitled: Authenticating...; event=Lost focus
ib-gateway_1 | 2024-05-18 07:29:36:004 IBC: detected frame entitled: Authenticating...; event=Deactivated
ib-gateway_1 | 2024-05-18 07:29:36:005 IBC: detected dialog entitled: Second Factor Authentication; event=Activated
ib-gateway_1 | 2024-05-18 07:29:36:006 IBC: detected dialog entitled: Second Factor Authentication; event=Focused

just want to understand, is it the VNC is up and running, if I can login to the VNC UI to see what happend, I try to access 127.0.0.1:5900, there is not response on the browser

the .env as below

TWS_USERID=
TWS_PASSWORD=

ib-gateway

#TWS_SETTINGS_PATH=/home/ibgateway/Jts

tws

#TWS_SETTINGS_PATH=/config/tws_settings
TWS_SETTINGS_PATH=
TRADING_MODE=live
READ_ONLY_API=no
VNC_SERVER_PASSWORD=myVncPassword
TWOFA_TIMEOUT_ACTION=restart
BYPASS_WARNING=
AUTO_RESTART_TIME=11:59 PM
AUTO_LOGOFF_TIME=
SAVE_TWS_SETTINGS=
RELOGIN_AFTER_2FA_TIMEOUT=yes
TIME_ZONE=Europe/Zurich
CUSTOM_CONFIG=
SSH_TUNNEL=
SSH_OPTIONS=
SSH_ALIVE_INTERVAL=
SSH_ALIVE_COUNT=
SSH_PASSPHRASE=
SSH_REMOTE_PORT=
SSH_USER_TUNNEL=
SSH_RESTART=
SSH_VNC_PORT=

To Reproduce

Steps to reproduce the behavior. Please include information related to docker,
ex docker run command, .env file, docker-compose.yml.

Please provide the output of docker compose config

Expected

A clear and concise description of what you expected to happen.

Container logs

If applicable, add the container logs docker logs <CONTAINER> or
docker-compose logs to help explain your problem.

Versions

Please complete the following information:

  • OS: [e.g. Windows]
  • Docker version: [e.g. chrome, safari]
  • Image Tag (docker image inspect ghcr.io/gnzsnz/ib-gateway:tag): [e.g.
    latest]
  • Image Digest (docker images --digests): [e.g.
    sha256:60d9d54009b1b66908bbca1ebf5b8a03a39fe0cb35c2ab4023f6e41b55d17894]

Additional context

Add any other context about the problem here.

What have you tried and failed.

My primary objective is to fix any bug on the container, ex Dockerfile, run.sh
script, docker-compose.yml. Please don't expect upstream issues to be solved
here (ex. IB gateway, IBC, etc)

@kooyear kooyear added the bug Something isn't working label May 18, 2024
@gnzsnz
Copy link
Owner

gnzsnz commented May 18, 2024

Depending on what you did on your docker-compose.yml you might be able to log into VNC. based on the .env file that you provided, yes VNC should be up and running. is it accessible from the network? that depends on your docker-compose.yml

Please provide the output of docker compose config and docker images --digests, and please make sure that you are using an up to date tag latest or stable

@gnzsnz gnzsnz removed the bug Something isn't working label May 18, 2024
@kooyear
Copy link
Author

kooyear commented May 18, 2024

Thanks for your reply, my docker-compose.yml file as below

version: "3.4"
services:
  ib-gateway:
    restart: always
    build:
      context: ./latest
    image: ghcr.io/gnzsnz/ib-gateway:latest
    environment:
      TWS_USERID: ${TWS_USERID}
      TWS_PASSWORD: ${TWS_PASSWORD}
      TRADING_MODE: ${TRADING_MODE:-paper}
      TWS_USERID_PAPER: ${TWS_USERID_PAPER:-}
      TWS_PASSWORD_PAPER: ${TWS_PASSWORD_PAPER:-}
      TWS_SETTINGS_PATH: ${TWS_SETTINGS_PATH:-}
      READ_ONLY_API: ${READ_ONLY_API:-}
      VNC_SERVER_PASSWORD: ${VNC_SERVER_PASSWORD:-}
      TWOFA_TIMEOUT_ACTION: ${TWOFA_TIMEOUT_ACTION:-exit}
      BYPASS_WARNING: ${BYPASS_WARNING:-}
      AUTO_RESTART_TIME: ${AUTO_RESTART_TIME:-}
      AUTO_LOGOFF_TIME: ${AUTO_LOGOFF_TIME:-}
      SAVE_TWS_SETTINGS: ${SAVE_TWS_SETTINGS:-}
      RELOGIN_AFTER_TWOFA_TIMEOUT: ${RELOGIN_AFTER_TWOFA_TIMEOUT:-no}
      TWOFA_EXIT_INTERVAL: ${TWOFA_EXIT_INTERVAL:-60}
      TIME_ZONE: ${TIME_ZONE:-Etc/UTC}
      TZ: ${TIME_ZONE:-Etc/UTC}
      CUSTOM_CONFIG: ${CUSTOM_CONFIG:-NO}
      JAVA_HEAP_SIZE: ${JAVA_HEAP_SIZE:-}
      SSH_TUNNEL: ${SSH_TUNNEL:-}
      SSH_OPTIONS: ${SSH_OPTIONS:-}
      SSH_ALIVE_INTERVAL: ${SSH_ALIVE_INTERVAL:-}
      SSH_ALIVE_COUNT: ${SSH_ALIVE_COUNT:-}
      SSH_PASSPHRASE: ${SSH_PASSPHRASE:-}
      SSH_REMOTE_PORT: ${SSH_REMOTE_PORT:-}
      SSH_USER_TUNNEL: ${SSH_USER_TUNNEL:-}
      SSH_RESTART: ${SSH_RESTART:-}
      SSH_VNC_PORT: ${SSH_VNC_PORT:-}
    ports:
      - "127.0.0.1:4001:4003"
      - "127.0.0.1:4002:4004"
      - "5900:5900"

and yes I use the latest tag, what I don't understand is when I launched IB Gateway through GUI before, it ask me to verify through SNS message, but if you put IB Gateway, how to implement the SNS message authentication? and how do you connect to VNC? through browser? I had some VNC image before, I can connect it through the browser, but looks it failed on this one. not very sure where I am wrong in which steps.

and when I run the python to test the connection to that docker container, I can see the log message as below
ib-gateway_1 | 2024/05/18 11:05:00 socat[136] E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused

and the connection is timeout and failed

@gnzsnz
Copy link
Owner

gnzsnz commented May 18, 2024

Please provide the output of docker compose config and docker images --digests

@kooyear
Copy link
Author

kooyear commented May 18, 2024

docker compose config as below (TWS_USERID, TWS_PASSWORD I hide the values)

name: ib-gateway-docker
services:
  ib-gateway:
    build:
      context: /Users/yegu/Projects/smartoption-auto-trade/ib-gateway-docker/latest
      dockerfile: Dockerfile
    environment:
      AUTO_LOGOFF_TIME: ""
      AUTO_RESTART_TIME: 11:59 PM
      BYPASS_WARNING: ""
      CUSTOM_CONFIG: "NO"
      JAVA_HEAP_SIZE: ""
      READ_ONLY_API: "no"
      RELOGIN_AFTER_TWOFA_TIMEOUT: "no"
      SAVE_TWS_SETTINGS: ""
      SSH_ALIVE_COUNT: ""
      SSH_ALIVE_INTERVAL: ""
      SSH_OPTIONS: ""
      SSH_PASSPHRASE: ""
      SSH_REMOTE_PORT: ""
      SSH_RESTART: ""
      SSH_TUNNEL: ""
      SSH_USER_TUNNEL: ""
      SSH_VNC_PORT: ""
      TIME_ZONE: Europe/Zurich
      TRADING_MODE: live
      TWOFA_EXIT_INTERVAL: "60"
      TWOFA_TIMEOUT_ACTION: restart
      TWS_PASSWORD: <password>
      TWS_PASSWORD_PAPER: ""
      TWS_SETTINGS_PATH: ""
      TWS_USERID: <username>
      TWS_USERID_PAPER: ""
      TZ: Europe/Zurich
      VNC_SERVER_PASSWORD: myVncPassword
    image: ghcr.io/gnzsnz/ib-gateway:latest
    networks:
      default: null
    ports:
    - mode: ingress
      host_ip: 127.0.0.1
      target: 4003
      published: "4001"
      protocol: tcp
    - mode: ingress
      host_ip: 127.0.0.1
      target: 4004
      published: "4002"
      protocol: tcp
    - mode: ingress
      target: 5900
      published: "5900"
      protocol: tcp
    restart: always
networks:
  default:
    name: ib-gateway-docker_default

docker images --digests as below

REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
ghcr.io/gnzsnz/ib-gateway latest abe609e3b3dc 5 hours ago 786MB

@gnzsnz
Copy link
Owner

gnzsnz commented May 18, 2024

I don't see anything wrong, you are not using latest, nor stable

$ docker images --digests |grep ib-gateway
ghcr.io/gnzsnz/ib-gateway           latest            sha256:29ace0bde0857018ca5c7971256ce9c6a3d4622a3059f80fbac0676ed02021d8   8ae0e053c99f   9 days ago      774MB
ghcr.io/gnzsnz/ib-gateway           stable            sha256:c2cee07f587a557dcee03dc1808993918b47d227d4e508cd38982d92a72b899c   2f193da8f82d   10 days ago     766MB
ghcr.io/gnzsnz/ib-gateway           10.28.1h          sha256:cfcc9b1e6d6c7bf268d95f555f2332432bd80f330c36fa2f2214b01c51cc9874   093f47a1131c   4 weeks ago     777MB

but that should not be an issue, unless you are using something really old. I would suggest to try with your paper account, as the issue seems to be related with MFA. Using paper will rule that out.

regarding VNC any client will do. if you have a VNC client in your browser it will work(ie safari)

having a FULL log file might help as well, you have pasted a small portion.

@kooyear
Copy link
Author

kooyear commented May 18, 2024

I checked out from the aarch64 branch, because I test it on my Macbook pro, attached the full logs after running docker-compose up

➜  ib-gateway-docker git:(aarch64) ✗ docker-compose up                                          
Recreating ib-gateway-docker_ib-gateway_1 ... done
Attaching to ib-gateway-docker_ib-gateway_1
ib-gateway_1  | *************************************************************************
ib-gateway_1  | .> Starting IBC/IB gateway
ib-gateway_1  | *************************************************************************
ib-gateway_1  | .> Starting Xvfb server
ib-gateway_1  | .> SSH tunnel disabled
ib-gateway_1  | .> Usign default Java heap size 768m.
ib-gateway_1  | .> Starting VNC server myVncPassword
ib-gateway_1  | .> API_PORT set to: 4001
ib-gateway_1  | .> SOCAT_PORT set to: 4003
ib-gateway_1  | .> Appling settings to IBC's config.ini
ib-gateway_1  | .> Settings directory NOT set, defaulting to: /home/ibgateway/Jts
ib-gateway_1  | .> Setting timezone in /home/ibgateway/Jts/jts.ini
ib-gateway_1  | .> Starting Port Forwarding.
ib-gateway_1  | .> Starting socat
ib-gateway_1  | _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
ib-gateway_1  | .> Starting IBC in live mode, with params:
ib-gateway_1  | .>              Version: 10.27.1c
ib-gateway_1  | .>              program: gateway
ib-gateway_1  | .>              tws-path: /home/ibgateway/Jts
ib-gateway_1  | .>              ibc-path: /home/ibgateway/ibc
ib-gateway_1  | .>              ibc-init: /home/ibgateway/ibc/config.ini
ib-gateway_1  | .>              tws-settings-path: /home/ibgateway/Jts
ib-gateway_1  | .>              on2fatimeout: restart
ib-gateway_1  | Forking :::4001 onto 0.0.0.0:4003 > trading mode live 
ib-gateway_1  | 18/05/2024 13:57:18 passing arg to libvncserver: -rfbport
ib-gateway_1  | 18/05/2024 13:57:18 passing arg to libvncserver: 5900
ib-gateway_1  | 18/05/2024 13:57:18 passing arg to libvncserver: -passwd
ib-gateway_1  | 18/05/2024 13:57:18 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 8
ib-gateway_1  | 
ib-gateway_1  | ================================================================================
ib-gateway_1  | 
ib-gateway_1  | Starting IBC version  on 2024-05-18 at 13:57:18
ib-gateway_1  | 
ib-gateway_1  | Operating system: Linux e7264d04c0aa 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
ib-gateway_1  | 
ib-gateway_1  | Arguments:
ib-gateway_1  | 
ib-gateway_1  | TWS version = 10.27.1c
ib-gateway_1  | Program = Gateway
ib-gateway_1  | Entry point = ibcalpha.ibc.IbcGateway
ib-gateway_1  | --tws-path = /home/ibgateway/Jts
ib-gateway_1  | --tws-settings-path = 
ib-gateway_1  | --ibc-path = /home/ibgateway/ibc
ib-gateway_1  | --ibc-ini = /home/ibgateway/ibc/config.ini
ib-gateway_1  | --mode = 
ib-gateway_1  | --java-path = 
ib-gateway_1  | --user =
ib-gateway_1  | --pw =
ib-gateway_1  | --fix-user =
ib-gateway_1  | --fix-pw =
ib-gateway_1  | 
ib-gateway_1  | =================================
ib-gateway_1  | Generating the classpath
ib-gateway_1  | Classpath=/home/ibgateway/Jts/ibgateway/10.27.1c/jars/batik-all-1.16.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/commons-io-2.11.0.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/fop-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-annotations-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-core-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-databind-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jts4launch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-linux64-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-swing-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/locales.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-api-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-core-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/total-2023.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-install4j-1.12.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/xmlgraphics-commons-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/.install4j/i4jruntime.jar:/home/ibgateway/ibc/IBC.jar
ib-gateway_1  | 
ib-gateway_1  | Generating the JAVA VM options
ib-gateway_1  | autorestart file not found
ib-gateway_1  | 
ib-gateway_1  | Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=/home/ibgateway/Jts
ib-gateway_1  | 
ib-gateway_1  | Determining the location of java executable
ib-gateway_1  | Location of java executable=/opt/java/bin
ib-gateway_1  | 
ib-gateway_1  | Renaming IB's TWS or Gateway start script to prevent restart without IBC
ib-gateway_1  | 
ib-gateway_1  | Starting Gateway with this command:
ib-gateway_1  | "/opt/java/bin/java" -cp "/home/ibgateway/Jts/ibgateway/10.27.1c/jars/batik-all-1.16.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/commons-io-2.11.0.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/fop-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-annotations-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-core-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-databind-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jts4launch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-linux64-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-swing-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/locales.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-api-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-core-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/total-2023.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-install4j-1.12.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/xmlgraphics-commons-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/.install4j/i4jruntime.jar:/home/ibgateway/ibc/IBC.jar" -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=/home/ibgateway/Jts ibcalpha.ibc.IbcGateway "/home/ibgateway/ibc/config.ini"  
ib-gateway_1  | 
ib-gateway_1  | 18/05/2024 13:57:18 Using X display :1
ib-gateway_1  | 18/05/2024 13:57:18 rootwin: 0x3ff reswin: 0x200001 dpy: 0xc4215fd0
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 ------------------ USEFUL INFORMATION ------------------
ib-gateway_1  | 18/05/2024 13:57:18 X DAMAGE available on display, using it for polling hints.
ib-gateway_1  | 18/05/2024 13:57:18   To disable this behavior use: '-noxdamage'
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18   Most compositing window managers like 'compiz' or 'beryl'
ib-gateway_1  | 18/05/2024 13:57:18   cause X DAMAGE to fail, and so you may not see any screen
ib-gateway_1  | 18/05/2024 13:57:18   updates via VNC.  Either disable 'compiz' (recommended) or
ib-gateway_1  | 18/05/2024 13:57:18   supply the x11vnc '-noxdamage' command line option.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 Wireframing: -wireframe mode is in effect for window moves.
ib-gateway_1  | 18/05/2024 13:57:18   If this yields undesired behavior (poor response, painting
ib-gateway_1  | 18/05/2024 13:57:18   errors, etc) it may be disabled:
ib-gateway_1  | 18/05/2024 13:57:18    - use '-nowf' to disable wireframing completely.
ib-gateway_1  | 18/05/2024 13:57:18    - use '-nowcr' to disable the Copy Rectangle after the
ib-gateway_1  | 18/05/2024 13:57:18      moved window is released in the new position.
ib-gateway_1  | 18/05/2024 13:57:18   Also see the -help entry for tuning parameters.
ib-gateway_1  | 18/05/2024 13:57:18   You can press 3 Alt_L's (Left "Alt" key) in a row to 
ib-gateway_1  | 18/05/2024 13:57:18   repaint the screen, also see the -fixscreen option for
ib-gateway_1  | 18/05/2024 13:57:18   periodic repaints.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 XFIXES available on display, resetting cursor mode
ib-gateway_1  | 18/05/2024 13:57:18   to: '-cursor most'.
ib-gateway_1  | 18/05/2024 13:57:18   to disable this behavior use: '-cursor arrow'
ib-gateway_1  | 18/05/2024 13:57:18   or '-noxfixes'.
ib-gateway_1  | 18/05/2024 13:57:18 using XFIXES for cursor drawing.
ib-gateway_1  | 18/05/2024 13:57:18 GrabServer control via XTEST.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 Scroll Detection: -scrollcopyrect mode is in effect to
ib-gateway_1  | 18/05/2024 13:57:18   use RECORD extension to try to detect scrolling windows
ib-gateway_1  | 18/05/2024 13:57:18   (induced by either user keystroke or mouse input).
ib-gateway_1  | 18/05/2024 13:57:18   If this yields undesired behavior (poor response, painting
ib-gateway_1  | 18/05/2024 13:57:18   errors, etc) it may be disabled via: '-noscr'
ib-gateway_1  | 18/05/2024 13:57:18   Also see the -help entry for tuning parameters.
ib-gateway_1  | 18/05/2024 13:57:18   You can press 3 Alt_L's (Left "Alt" key) in a row to 
ib-gateway_1  | 18/05/2024 13:57:18   repaint the screen, also see the -fixscreen option for
ib-gateway_1  | 18/05/2024 13:57:18   periodic repaints.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 XKEYBOARD: number of keysyms per keycode 7 is greater
ib-gateway_1  | 18/05/2024 13:57:18   than 4 and 51 keysyms are mapped above 4.
ib-gateway_1  | 18/05/2024 13:57:18   Automatically switching to -xkb mode.
ib-gateway_1  | 18/05/2024 13:57:18   If this makes the key mapping worse you can
ib-gateway_1  | 18/05/2024 13:57:18   disable it with the "-noxkb" option.
ib-gateway_1  | 18/05/2024 13:57:18   Also, remember "-remap DEAD" for accenting characters.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 X FBPM extension not supported.
ib-gateway_1  | Xlib:  extension "DPMS" missing on display ":1".
ib-gateway_1  | 18/05/2024 13:57:18 X display is not capable of DPMS.
ib-gateway_1  | 18/05/2024 13:57:18 --------------------------------------------------------
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 Default visual ID: 0x21
ib-gateway_1  | 18/05/2024 13:57:18 Read initial data from X display into framebuffer.
ib-gateway_1  | 18/05/2024 13:57:18 initialize_screen: fb_depth/fb_bpp/fb_Bpl 16/16/2048
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 X display :1 is 16bpp depth=16 true color
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 Listening for VNC connections on TCP port 5900
ib-gateway_1  | 18/05/2024 13:57:18 Listening for VNC connections on TCP6 port 5900
ib-gateway_1  | 18/05/2024 13:57:18 listen6: bind: Address already in use
ib-gateway_1  | 18/05/2024 13:57:18 Not listening on IPv6 interface.
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 Xinerama is present and active (e.g. multi-head).
ib-gateway_1  | 18/05/2024 13:57:18 Xinerama: number of sub-screens: 1
ib-gateway_1  | 18/05/2024 13:57:18 Xinerama: no blackouts needed (only one sub-screen)
ib-gateway_1  | 18/05/2024 13:57:18 
ib-gateway_1  | 18/05/2024 13:57:18 fb read rate: 1920 MB/sec
ib-gateway_1  | 18/05/2024 13:57:18 fast read: reset -wait  ms to: 10
ib-gateway_1  | 18/05/2024 13:57:18 fast read: reset -defer ms to: 10
ib-gateway_1  | 18/05/2024 13:57:18 The X server says there are 10 mouse buttons.
ib-gateway_1  | 18/05/2024 13:57:18 screen setup finished.
ib-gateway_1  | 18/05/2024 13:57:18 PORT=5900
ib-gateway_1  | 
ib-gateway_1  | 
ib-gateway_1  | The VNC desktop is:      e7264d04c0aa:0
ib-gateway_1  | 
ib-gateway_1  | ******************************************************************************
ib-gateway_1  | Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
ib-gateway_1  | 
ib-gateway_1  | The scheme stores pixel data offscreen on the VNC viewer side for faster
ib-gateway_1  | retrieval.  It should work with any VNC viewer.  Try it by running:
ib-gateway_1  | 
ib-gateway_1  |     x11vnc -ncache 10 ...
ib-gateway_1  | 
ib-gateway_1  | One can also add -ncache_cr for smooth 'copyrect' window motion.
ib-gateway_1  | More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
ib-gateway_1  | 
ib-gateway_1  | IBC Settings:
ib-gateway_1  |     AcceptBidAskLastSizeDisplayUpdateNotification=accept
ib-gateway_1  |     AcceptIncomingConnectionAction=reject
ib-gateway_1  |     AcceptNonBrokerageAccountWarning=yes
ib-gateway_1  |     AllowBlindTrading=no
ib-gateway_1  |     AutoLogoffTime=
ib-gateway_1  |     AutoRestartTime=11:59 PM
ib-gateway_1  |     BindAddress=
ib-gateway_1  |     BypassBondWarning=
ib-gateway_1  |     BypassCalledBondWarning=
ib-gateway_1  |     BypassNegativeYieldToWorstConfirmation=
ib-gateway_1  |     BypassNoOverfillProtectionPrecaution=
ib-gateway_1  |     BypassOrderPrecautions=
ib-gateway_1  |     BypassPriceBasedVolatilityRiskWarning=
ib-gateway_1  |     BypassRedirectOrderWarning=
ib-gateway_1  |     BypassSameActionPairTradeWarning=
ib-gateway_1  |     BypassUSStocksMarketDataInSharesWarning=
ib-gateway_1  |     ClosedownAt=
ib-gateway_1  |     CommandPrompt=
ib-gateway_1  |     CommandServerPort=0
ib-gateway_1  |     ConfirmCryptoCurrencyOrders=transmit
ib-gateway_1  |     ConfirmOrderIdReset=
ib-gateway_1  |     ControlFrom=
ib-gateway_1  |     DismissNSEComplianceNotice=yes
ib-gateway_1  |     DismissPasswordExpiryWarning=no
ib-gateway_1  |     ExistingSessionDetectedAction=primary
ib-gateway_1  |     ExitAfterSecondFactorAuthenticationTimeout=no
ib-gateway_1  |     FIX=no
ib-gateway_1  |     FIXLoginId=***
ib-gateway_1  |     FIXPassword=***
ib-gateway_1  |     IbLoginId=***
ib-gateway_1  |     IbPassword=***
ib-gateway_1  |     LogStructureScope=known
ib-gateway_1  |     LogStructureWhen=never
ib-gateway_1  |     LoginDialogDisplayTimeout=60
ib-gateway_1  |     MinimizeMainWindow=no
ib-gateway_1  |     OverrideTwsApiPort=
ib-gateway_1  |     OverrideTwsMasterClientID=
ib-gateway_1  |     ReadOnlyApi=no
ib-gateway_1  |     ReadOnlyLogin=no
ib-gateway_1  |     ReloginAfterSecondFactorAuthenticationTimeout=no
ib-gateway_1  |     ResetOrderIdsAtStart=
ib-gateway_1  |     SaveTwsSettingsAt=
ib-gateway_1  |     SecondFactorAuthenticationExitInterval=60
ib-gateway_1  |     SecondFactorAuthenticationTimeout=180
ib-gateway_1  |     SecondFactorDevice=One Time Passcode
ib-gateway_1  |     SendMarketDataInLotsForUSstocks=
ib-gateway_1  |     StoreSettingsOnServer=
ib-gateway_1  |     SuppressInfoMessages=yes
ib-gateway_1  |     TradingMode=live
ib-gateway_1  |     TrustedTwsApiClientIPs=
ib-gateway_1  | End IBC Settings
ib-gateway_1  | 
ib-gateway_1  | 2024-05-18 13:57:18:306 IBC: version: 3.18.0
ib-gateway_1  | System Properties
ib-gateway_1  | ------------------------------------------------------------
ib-gateway_1  | awt.toolkit = sun.awt.X11.XToolkit
ib-gateway_1  | java.specification.version = 11
ib-gateway_1  | sun.cpu.isalist = 
ib-gateway_1  | sun.jnu.encoding = ANSI_X3.4-1968
ib-gateway_1  | channel = latest
ib-gateway_1  | java.class.path = /home/ibgateway/Jts/ibgateway/10.27.1c/jars/batik-all-1.16.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/commons-io-2.11.0.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/fop-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-annotations-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-core-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jackson-databind-2.12.3.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jts4launch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-linux64-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/jxbrowser-swing-7.29.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/locales.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-api-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/log4j-core-2.17.1.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/total-2023.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-1027.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-install4j-1.12.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/xmlgraphics-commons-2.8.jar:/home/ibgateway/Jts/ibgateway/10.27.1c/.install4j/i4jruntime.jar:/home/ibgateway/ibc/IBC.jar
ib-gateway_1  | java.vm.vendor = BellSoft
ib-gateway_1  | sun.arch.data.model = 64
ib-gateway_1  | java.vendor.url = https://bell-sw.com/
ib-gateway_1  | user.timezone = Europe/Zurich
ib-gateway_1  | os.name = Linux
ib-gateway_1  | java.vm.specification.version = 11
ib-gateway_1  | sun.java.launcher = SUN_STANDARD
ib-gateway_1  | user.country = US
ib-gateway_1  | sun.boot.library.path = /opt/java/lib
ib-gateway_1  | sun.java.command = ibcalpha.ibc.IbcGateway /home/ibgateway/ibc/config.ini
ib-gateway_1  | jdk.debug = release
ib-gateway_1  | sun.cpu.endian = little
ib-gateway_1  | user.home = /home/ibgateway
ib-gateway_1  | user.language = en
ib-gateway_1  | java.specification.vendor = Oracle Corporation
ib-gateway_1  | java.version.date = 2024-01-16
ib-gateway_1  | java.home = /opt/java
ib-gateway_1  | jtsConfigDir = /home/ibgateway/Jts
ib-gateway_1  | file.separator = /
ib-gateway_1  | java.vm.compressedOopsMode = 32-bit
ib-gateway_1  | line.separator = 
ib-gateway_1  | 
ib-gateway_1  | java.specification.name = Java Platform API Specification
ib-gateway_1  | java.vm.specification.vendor = Oracle Corporation
ib-gateway_1  | twslaunch.autoupdate.serviceImpl = com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService
ib-gateway_1  | install4jType = standalone
ib-gateway_1  | java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
ib-gateway_1  | sun.management.compiler = HotSpot 64-Bit Tiered Compilers
ib-gateway_1  | exe4j.isInstall4j = true
ib-gateway_1  | java.runtime.version = 11.0.22+12-LTS
ib-gateway_1  | user.name = ibgateway
ib-gateway_1  | path.separator = :
ib-gateway_1  | os.version = 5.10.104-linuxkit
ib-gateway_1  | java.runtime.name = OpenJDK Runtime Environment
ib-gateway_1  | file.encoding = ANSI_X3.4-1968
ib-gateway_1  | java.vm.name = OpenJDK 64-Bit Server VM
ib-gateway_1  | java.vendor.url.bug = https://bell-sw.com/support
ib-gateway_1  | java.io.tmpdir = /tmp
ib-gateway_1  | java.version = 11.0.22
ib-gateway_1  | user.dir = /home/ibgateway/Jts
ib-gateway_1  | os.arch = aarch64
ib-gateway_1  | java.vm.specification.name = Java Virtual Machine Specification
ib-gateway_1  | java.awt.printerjob = sun.print.PSPrinterJob
ib-gateway_1  | sun.os.patch.level = unknown
ib-gateway_1  | java.library.path = /usr/java/packages/lib:/lib:/usr/lib:/usr/lib64:/lib64
ib-gateway_1  | java.vm.info = mixed mode
ib-gateway_1  | java.vendor = BellSoft
ib-gateway_1  | java.vm.version = 11.0.22+12-LTS
ib-gateway_1  | java.specification.maintenance.version = 2
ib-gateway_1  | sun.io.unicode.encoding = UnicodeLittle
ib-gateway_1  | java.class.version = 55.0
ib-gateway_1  | ------------------------------------------------------------
ib-gateway_1  | 2024-05-18 13:57:18:310 IBC: using default settings provider: ini file is /home/ibgateway/ibc/config.ini
ib-gateway_1  | 2024-05-18 13:57:18:310 IBC: using default login manager: will get username and password from settings; FIX username and password (if required) from settings
ib-gateway_1  | 2024-05-18 13:57:18:310 IBC: using default main window manager
ib-gateway_1  | 2024-05-18 13:57:18:310 IBC: using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
ib-gateway_1  | 2024-05-18 13:57:18:311 IBC: using default config dialog manager
ib-gateway_1  | 2024-05-18 13:57:18:314 IBC: CommandServer is not started because the port is not configured
ib-gateway_1  | 2024-05-18 13:57:18:424 IBC: TWS Settings directory is: /home/ibgateway/Jts
ib-gateway_1  | 2024-05-18 13:57:18:425 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
ib-gateway_1  | 2024-05-18 13:57:18:431 IBC: Ensuring /home/ibgateway/Jts/jts.ini contains required minimal lines
ib-gateway_1  | 2024-05-18 13:57:18:431 IBC: Found setting: [Logon]/s3store=true
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Found setting: [Logon]/Locale=en
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Found setting: [Logon]/displayedproxymsg=1
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Found setting: [Logon]/UseSSL=true
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Found setting: [IBGateway]/ApiOnly=true
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Confirmed /home/ibgateway/Jts/jts.ini contains required minimal lines
ib-gateway_1  | 2024-05-18 13:57:18:432 IBC: Starting Gateway
ib-gateway_1  | WARNING: An illegal reflective access operation has occurred
ib-gateway_1  | WARNING: Illegal reflective access by feature.search.recorder.JtsMultiLookAndFeel (file:/home/ibgateway/Jts/ibgateway/10.27.1c/jars/twslaunch-1027.jar) to method javax.swing.UIManager.getLAFState()
ib-gateway_1  | WARNING: Please consider reporting this to the maintainers of feature.search.recorder.JtsMultiLookAndFeel
ib-gateway_1  | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
ib-gateway_1  | WARNING: All illegal access operations will be denied in a future release
ib-gateway_1  | 2024-05-18 13:57:19:567 IBC: Getting config dialog
ib-gateway_1  | 2024-05-18 13:57:19:567 IBC: Creating config dialog future
ib-gateway_1  | 2024-05-18 13:57:19:569 IBC: Getting config dialog
ib-gateway_1  | 2024-05-18 13:57:19:573 IBC: Getting main window
ib-gateway_1  | 2024-05-18 13:57:19:573 IBC: Creating main window future
ib-gateway_1  | 2024-05-18 13:57:19:577 IBC: Waiting for config dialog future to complete
ib-gateway_1  | 2024-05-18 13:57:20:332 IBC: detected frame entitled: IBKR Gateway; event=Activated
ib-gateway_1  | 2024-05-18 13:57:20:337 IBC: detected frame entitled: IBKR Gateway; event=Focused
ib-gateway_1  | 2024-05-18 13:57:20:337 IBC: detected frame entitled: IBKR Gateway; event=Opened
ib-gateway_1  | 2024-05-18 13:57:20:338 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
ib-gateway_1  | 2024-05-18 13:57:20:339 IBC: trading mode from settings: tradingMode=live
ib-gateway_1  | 2024-05-18 13:57:20:339 IBC: Setting Trading mode = live
ib-gateway_1  | 2024-05-18 13:57:20:419 IBC: Setting user name
ib-gateway_1  | 2024-05-18 13:57:20:420 IBC: Setting password
ib-gateway_1  | 2024-05-18 13:57:20:420 IBC: Login attempt: 1
ib-gateway_1  | 2024-05-18 13:57:20:443 IBC: Button was disabled, has been enabled: Log In
ib-gateway_1  | 2024-05-18 13:57:20:443 IBC: Click button: Log In

I thought the port for VNC should be 5900, right? but when I try to access 127.0.0.1:5900, didn't see any response from the browser

@gnzsnz
Copy link
Owner

gnzsnz commented May 18, 2024

I checked out from the aarch64 branch, because I test it on my Macbook pro, attached the full logs after running docker-compose up

that's important information, it could have saved us all this time. that explains ALL your problems

I thought the port for VNC should be 5900, right? but when I try to access 127.0.0.1:5900, didn't see any response from the browser

VNC does not work on aarch, that's explained in #81 . besides that, even if it works, on aarch (at least on my mac) you can't do 127.0.0.1:5900. you need to check which IP docker is using.

on this log file there is no socat issue and no log-in issue.

10.27.1c is a really old version, I would be surprised that you can still log-in with it.

Next time please put all relevant information up-front.

this can be considered a duplicate of #81

@gnzsnz gnzsnz added the duplicate This issue or pull request already exists label May 18, 2024
@gnzsnz gnzsnz changed the title Connect to the IBGateway failed Connect to the IBGateway failed - aarch May 18, 2024
Repository owner locked and limited conversation to collaborators May 18, 2024
@gnzsnz gnzsnz converted this issue into discussion #113 May 18, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants