Skip to content
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

Interactive Brokers local deployment "No suitable Java virtual machine could be found" #547

Open
karstoron opened this issue Feb 11, 2025 · 3 comments

Comments

@karstoron
Copy link

I've seen this issue before for Apple M1 chips #114
However, I am working on x86_64 architecture:

Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          40 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   2
  On-line CPU(s) list:    0,1
Vendor ID:                GenuineIntel
  Model name:             Intel Xeon Processor (Skylake, IBRS, no TSX)
    CPU family:           6
    Model:                85
    Thread(s) per core:   1
    Core(s) per socket:   2
    Socket(s):            1

Below you can find the log.

Build succeeded in 1.7s
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/9.0.101/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/9.0.101/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'QuantConnect.Brokerages.InteractiveBrokers' into project '/ModulesProject/ModulesProject.csproj'.
info : Restoring packages for /ModulesProject/ModulesProject.csproj...
info : Installed QuantConnect.Brokerages.InteractiveBrokers 2.5.16932 from /Modules to /root/.nuget/packages/quantconnect.brokerages.interactivebrokers/2.5.16932 with content hash 
XW+HxcT6DVOMOvvc3TVDoEqq3Bnxt67S2KdrKSHCDV19uxUBI7z1+7lDlp7id5JoBhsl9i3IPd90WIGkmaBI1A==.
info :   GET https://api.nuget.org/v3/vulnerabilities/index.json
info :   OK https://api.nuget.org/v3/vulnerabilities/index.json 10ms
info :   GET https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/vulnerability.base.json
info :   GET https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/2025.02.10.16.20.00/vulnerability.update.json
info :   OK https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/vulnerability.base.json 10ms
info :   OK https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/2025.02.10.16.20.00/vulnerability.update.json 17ms
info : Package 'QuantConnect.Brokerages.InteractiveBrokers' is compatible with all the specified frameworks in project '/ModulesProject/ModulesProject.csproj'.
info : PackageReference for package 'QuantConnect.Brokerages.InteractiveBrokers' version '2.5.16932' added to file '/ModulesProject/ModulesProject.csproj'.
info : Generating MSBuild file /Compile/obj/ModulesProject/ModulesProject.csproj.nuget.g.props.
info : Generating MSBuild file /Compile/obj/ModulesProject/ModulesProject.csproj.nuget.g.targets.
info : Writing assets file to disk. Path: /Compile/obj/ModulesProject/project.assets.json
log  : Restored /ModulesProject/ModulesProject.csproj (in 2.75 sec).

Build succeeded in 1.1s
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/9.0.101/trustedroots/codesignctl.pem'.
info : X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/9.0.101/trustedroots/timestampctl.pem'.
info : Adding PackageReference for package 'QuantConnect.Brokerages.InteractiveBrokers.ToolBox' into project '/ModulesProject/ModulesProject.csproj'.
info : Restoring packages for /ModulesProject/ModulesProject.csproj...
info :   GET https://api.nuget.org/v3-flatcontainer/quantconnect.brokerages.interactivebrokers/index.json
info :   OK https://api.nuget.org/v3-flatcontainer/quantconnect.brokerages.interactivebrokers/index.json 162ms
info :   GET https://api.nuget.org/v3-flatcontainer/quantconnect.brokerages.interactivebrokers/2.5.16550/quantconnect.brokerages.interactivebrokers.2.5.16550.nupkg
info :   OK https://api.nuget.org/v3-flatcontainer/quantconnect.brokerages.interactivebrokers/2.5.16550/quantconnect.brokerages.interactivebrokers.2.5.16550.nupkg 185ms
info : Installed QuantConnect.Brokerages.InteractiveBrokers.ToolBox 2.5.16550 from /Modules to /root/.nuget/packages/quantconnect.brokerages.interactivebrokers.toolbox/2.5.16550 with content hash 
wlbRFBnaVsIiesNa7Fnwu2IX1vmnqHWCZV0XWgy1py4pJGruAuH1NqlrVXVhLsMTxP+flDjZPMRfRcODNcsT9Q==.
info : Installed QuantConnect.Brokerages.InteractiveBrokers 2.5.16550 from https://api.nuget.org/v3/index.json to /root/.nuget/packages/quantconnect.brokerages.interactivebrokers/2.5.16550 with content hash 
TlijqL/ZhUI6C1TfSf8tMSn7GIlSjcrcqbwBy/CbFOVyPmllgHOIYqL/YGzlMZVZqGG0TskibD3Ffwn/yWr9Mg==.
info :   CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/vulnerability.base.json
info :   CACHE https://api.nuget.org/v3-vulnerabilities/2025.02.05.10.19.42/2025.02.10.16.20.00/vulnerability.update.json
info : Package 'QuantConnect.Brokerages.InteractiveBrokers.ToolBox' is compatible with all the specified frameworks in project '/ModulesProject/ModulesProject.csproj'.
info : PackageReference for package 'QuantConnect.Brokerages.InteractiveBrokers.ToolBox' version '2.5.16550' added to file '/ModulesProject/ModulesProject.csproj'.
info : Writing assets file to disk. Path: /Compile/obj/ModulesProject/project.assets.json
log  : Restored /ModulesProject/ModulesProject.csproj (in 1.85 sec).
20250211 06:23:55.086 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20250211 06:23:55.103 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value:
20250211 06:23:55.106 TRACE:: Config.Get(): Configuration key not found. Key: api-url - Using default value: https://www.quantconnect.com/api/v2/
20250211 06:23:55.111 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20250211 06:23:55.122 TRACE:: Composer(): Loading Assemblies from /Lean/Launcher/bin/Debug
20250211 06:23:55.327 TRACE:: Python for .NET Assembly: Python.Runtime, Version=2.0.42.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd
20250211 06:23:55.471 TRACE:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.5.0.0 Mode: DEBUG (64bit) Host: fedora-4gb-nbg1-2
20250211 06:23:55.481 TRACE:: Engine.Main(): Started 6:23 AM
20250211 06:23:55.488 TRACE:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value: LocalLeanManager
20250211 06:23:55.557 TRACE:: JobQueue.NextJob(): Selected /LeanCLI/main.py
20250211 06:23:55.636 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-capacity - Using default value: 120
20250211 06:23:55.636 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-time-interval-minutes - Using default value: 1440
20250211 06:23:55.636 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20250211 06:23:55.637 TRACE:: Config.GetValue(): storage-limit - Using default value: 10737418240
20250211 06:23:55.637 TRACE:: Config.GetValue(): storage-permissions - Using default value: 3
20250211 06:23:55.642 TRACE:: Config.Get(): Configuration key not found. Key: data-channel - Using default value:
20250211 06:23:55.643 TRACE:: Config.Get(): Configuration key not found. Key: python-venv - Using default value:
20250211 06:24:01.170 TRACE:: Config.Get(): Configuration key not found. Key: data-permission-manager - Using default value: DataPermissionManager
20250211 06:24:01.178 TRACE:: Config.GetValue(): streamed-chart-limit - Using default value: 12
20250211 06:24:01.178 TRACE:: Config.GetValue(): streamed-chart-group-size - Using default value: 3
20250211 06:24:01.199 TRACE:: Config.GetValue(): downloader-data-update-period - Using default value: 7
20250211 06:24:02.269 TRACE:: Config.GetValue(): zip-data-cache-provider - Using default value: 10
20250211 06:24:02.272 TRACE:: Config.Get(): Configuration key not found. Key: fundamental-data-provider - Using default value: CoarseFundamentalDataProvider
20250211 06:24:02.277 TRACE:: AlgorithmManager.CreateTokenBucket(): Initializing LeakyBucket: Capacity: 120 RefillAmount: 18 TimeInterval: 1440
20250211 06:24:02.278 TRACE:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20
20250211 06:24:02.291 TRACE:: Engine.Run(): Resource limits '0' CPUs. 2147483647 MB RAM.
20250211 06:24:02.292 TRACE:: TextSubscriptionDataSourceReader.SetCacheSize(): Setting cache size to 71582788 items
20250211 06:24:02.299 TRACE:: Config.GetValue(): algorithm-creation-timeout - Using default value: 90
20250211 06:24:02.304 TRACE:: PythonInitializer.Initialize(): start...
PythonEngine.Initialize(): clr GetManifestResourceStream...
20250211 06:24:02.878 TRACE:: PythonInitializer.Initialize(): ended
20250211 06:24:02.881 TRACE:: AlgorithmPythonWrapper(): Python version 3.11.11 | packaged by conda-forge | (main, Dec  5 2024, 14:35:46) [GCC 13.3.0]: Importing python module main
20250211 06:24:15.013 TRACE:: AlgorithmPythonWrapper(): main successfully imported.
20250211 06:24:15.027 TRACE:: AlgorithmPythonWrapper(): Creating IAlgorithm instance.
20250211 06:24:15.054 TRACE:: Config.Get(): Configuration key not found. Key: databases-refresh-period - Using default value: 1.00:00:00
20250211 06:24:15.335 TRACE:: Config.GetValue(): mute-python-library-logging - Using default value: True
20250211 06:24:15.343 TRACE:: LocalObjectStore.Initialize(): Storage Root: /Storage. StorageFileCount 9999999. StorageLimit 10240MB
20250211 06:24:15.344 TRACE:: LiveTradingDataFeed.GetDataChannelProvider(): will use DataChannelProvider
20250211 06:24:15.347 TRACE:: BrokerageSetupHandler.CreateBrokerage(): creating brokerage 'QuantConnect.Brokerages.InteractiveBrokers.InteractiveBrokersBrokerage'
20250211 06:24:15.356 TRACE:: Config.GetValue(): ib-response-timeout - Using default value: 300
20250211 06:24:15.357 TRACE:: Config.GetValue(): ib-no-submission-orders-response-timeout - Using default value: 10
20250211 06:24:15.357 TRACE:: Config.GetValue(): ib-combo-order-fill-timeout - Using default value: 30
20250211 06:24:16.474 TRACE:: InteractiveBrokersBrokerage.InteractiveBrokersBrokerage(): found no data aggregator instance, creating QuantConnect.Lean.Engine.DataFeeds.AggregationManager
20250211 06:24:16.482 TRACE:: InteractiveBrokersBrokerage.InteractiveBrokersBrokerage(): Starting IB Automater...
20250211 06:24:16.493 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Setting execute permissions on IBAutomater.sh
20250211 06:24:16.512 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): chmod +x IBAutomater.sh: process exit code: 0
20250211 06:24:16.513 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Loading IBGateway - Version: 985 - Path: /root/ibgateway - User: karstoronbot
20250211 06:24:16.515 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Searching for TWS JRE path
20250211 06:24:16.515 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Install4J path: /root/ibgateway/.install4j
20250211 06:24:16.518 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): File found: /root/ibgateway/.install4j/pref_jre.cfg
20250211 06:24:16.524 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Directory found: /opt/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202
20250211 06:24:16.525 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Updating IBGateway ini file: /root/Jts/jts.ini
20250211 06:24:16.536 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Updating IBGateway configuration file: /root/ibgateway/ibgateway.vmoptions
20250211 06:24:16.554 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): IBAutomater process started - Id:189 - Name:IBAutomater.sh - InitializationTimeout:00:15:00
20250211 06:24:16.598 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): UID          PID    PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
20250211 06:24:16.599 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root           1       0 40 68544906 651228 1 06:23 pts/0  00:00:16 dotnet QuantConnect.Lean.Launcher.dll
20250211 06:24:16.599 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root         189       1  0  2572  3484   0 06:24 pts/0    00:00:00   /bin/bash /Lean/Launcher/bin/Debug/IBAutomater.sh /root/ibgateway 
-javaagent:/Lean/Launcher/bin/Debug/IBAutomater.jar=/Lean/Launcher/bin/Debug/IBAutomater.json
20250211 06:24:16.599 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root         190     189  1  3241  3316   0 06:24 pts/0    00:00:00     ps -AFH
20250211 06:24:21.643 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): UID          PID    PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
20250211 06:24:21.644 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root           1       0 37 68544906 652904 1 06:23 pts/0  00:00:17 dotnet QuantConnect.Lean.Launcher.dll
20250211 06:24:21.644 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root         189       1  0  2572  3484   1 06:24 pts/0    00:00:00   /bin/bash /Lean/Launcher/bin/Debug/IBAutomater.sh /root/ibgateway 
-javaagent:/Lean/Launcher/bin/Debug/IBAutomater.jar=/Lean/Launcher/bin/Debug/IBAutomater.json
20250211 06:24:21.644 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): root         194     189  0  3241  3424   0 06:24 pts/0    00:00:00     ps -AFH
20250211 06:24:23.110 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): Aborted (core dumped)
20250211 06:24:23.788 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): No suitable Java Virtual Machine could be found on your system.
20250211 06:24:23.789 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): The version of the JVM must be 1.8.0_202.
20250211 06:24:23.789 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
20250211 06:24:23.792 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): IBGateway process exited
20250211 06:24:23.800 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterExited(): Exit code: 0
20250211 06:24:23.804 TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterExited(): IBGateway close detected, restarting IBAutomater...
20250211 06:24:23.805 TRACE:: InteractiveBrokersBrokerage.Disconnect(): Starting
20250211 06:24:23.805 TRACE:: InteractiveBrokersBrokerage.Disconnect(): ended
@jaredbroad
Copy link
Member

Are you running LEAN or LEAN CLI? I believe given the build success messages this is a LEAN issue not LEAN CLI which runs in a docker container. If a LEAN issue its related to your environment and java install and not something we can debug sorry.

I highly recommend using LEAN CLI as it handles all these environment issues on your behalf

@karstoron
Copy link
Author

karstoron commented Feb 11, 2025

I used lean live deploy ... to start the container, which is also where this happened, this is the output of the docker logs.

@jaredbroad
Copy link
Member

Super thank you we'll try and reproduce and fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants