IB Gateway not accepting connection when setting credentials

Hi I installed quantrocket recently and am trying to set the credentials:

quantrocket ibg credentials 'ibg1' --username 'XXX' --live

but crashes:

msg: 'IB Gateway should be running but is not accepting connections. Please open the
  IB Gateway GUI to troubleshoot, see http://qrok.it/h/ibgui for help. IBC log output
  is below: NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.desktop/javax.swing=ALL-UNNAMED


  #


  # A fatal error has been detected by the Java Runtime Environment:


  #


  #  SIGILL (0x4) at pc=0x0000ffff9d3ebc5c, pid=136, tid=284


  #


  # JRE version:  (21.0.5+11) (build )


  # Java VM: OpenJDK 64-Bit Server VM (21.0.5+11-LTS, mixed mode, sharing, tiered,
  compressed oops, compressed class ptrs, g1 gc, linux-aarch64)


  # Problematic frame:


  # j  java.lang.System.registerNatives()V+0 java.base


  #


  # No core dump will be written. Core dumps have been disabled. To enable core dumping,
  try "ulimit -c unlimited" before starting Java again


  #


  # An error report file with more information is saved as:


  # /root/Jts/ibgateway/1033/hs_err_pid136.log


  [0.036s][warning][os] Loading hsdis library failed


  #


  # The crash happened outside the Java Virtual Machine in native code.


  # See problematic frame for where to report the bug.


  #

  '
status: error

excerpt of /root/Jts/ibgateway/1033/hs_err_pid136.log:

---------------  S U M M A R Y ------------

Command Line: --add-opens=java.desktop/javax.swing=ALL-UNNAMED -DinstallDir=/root/Jts/ibgateway/1033/ -DjtsConfigDir=${installer:jtsConfigDir} -Dinstall4jType=${installer:installerType} -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -DnightlyEnabled=true -DprivateLabel=ib -DinstallerVersion=4.6.32 -DhideTryDemo=false -Dinstaller.groupId= -DfullVersion=10331d -DmediaFileArch=linux-x64 -DproductName=IB Gateway -javaagent:/opt/IBC/IBC.jar=/root/IBC/config.ini ${TWSUSERID} ${TWSPASSWORD} ${TRADING_MODE} -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=e8e6d390-9bb0-475c-afdc-9105e541f304 -DvmOptionsPath=/root/Jts/ibgateway/1033/ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true install4j.ibgateway.GWClient ${installer:cmdLineArgs}

Host: AArch64, 2 cores, 7G, Debian GNU/Linux 11 (bullseye)
Time: Tue Jul 22 19:54:10 2025 UTC elapsed time: 0.031833 seconds (0d 0h 0m 0s)

---------------  T H R E A D  ---------------

Current thread (0x0000ffffac02d5e0):  JavaThread "Unknown thread" [_thread_in_native, id=284, stack(0x0000ffffb0d8e000,0x0000ffffb0f8c000) (2040K)]

Stack: [0x0000ffffb0d8e000,0x0000ffffb0f8c000],  sp=0x0000ffffb0f8a090,  free space=2032k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j  java.lang.System.registerNatives()V+0 java.base
j  java.lang.System.<clinit>()V+0 java.base
v  ~StubRoutines::call_stub 0x0000ffff9d3e3144
V  [libjvm.so+0x84ae90]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x2c8
V  [libjvm.so+0x824f30]  InstanceKlass::call_class_initializer(JavaThread*)+0x220
V  [libjvm.so+0x827ec0]  InstanceKlass::initialize_impl(JavaThread*)+0x7d0
V  [libjvm.so+0xe34e58]  Threads::initialize_java_lang_classes(JavaThread*, JavaThread*)+0xe8
V  [libjvm.so+0xe37460]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x548
V  [libjvm.so+0x8e5cac]  JNI_CreateJavaVM+0x84
C  [libjli.so+0x4cd0]  JavaMain+0x80
C  [libjli.so+0x86d4]  ThreadJavaMain+0xc
C  [libpthread.so.0+0x7648]  start_thread+0x174
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.lang.System.registerNatives()V+0 java.base
j  java.lang.System.<clinit>()V+0 java.base
v  ~StubRoutines::call_stub 0x0000ffff9d3e3144

siginfo: si_signo: 4 (SIGILL), si_code: 1 (ILL_ILLOPC), si_addr: 0x0000ffff9d3ebc5c

Any ideas why? Have tried restarted the gateways in docker but doesn't seem to fix the issue. Note that nothing is displayed in the VNC gateway viewer either (

I have an IBKR Pro account, is there any setting I need to adjust to allow the gateway to start correctly?

Mostly just interested in getting the sec master so I can do some research.

PS: I'm running on arm mac but ibkr gateway seems to work fine when I install and run it locally with same credentials:

In Docker Desktop, how much memory does Docker have (under Resources)? Haywire behavior like that can sometimes be caused by memory pressure. IB Gateway is fully supported with QuantRocket on Apple Silicon, and it appears you have the correct aarch64 containers, based on your error messages.

I set 8gb of ram as recommended:

Believe it's related to this: Java (eclipse temurin, graalvm) and Docker Desktop on mac m4 crashing · Issue #7583 · docker/for-mac · GitHub

(I'm on M4 Pro)

Are you on the latest version of Docker Desktop (4.43.2)? This was supposedly fixed in 4.39.0. If you're seeing this on the latest Docker Desktop, then we can try updating the Java version from 21.0.5 to 21.0.8 in the IB Gateway container, which should also supposedly fix it. It sounds like this is specific to M4 (we're testing on an earlier generation of Apple Silicon).

Yep I updated and issue has been fixed!

However I recommend you add JAVA_TOOL_OPTIONS="-XX:UseSVE=0" to docker startup options just so people running M4 Pros and old docker versions don't encounter this issue in the future (I did not myself confirm that this fixed issue I just updated instead)

Thanks!