Git Product home page Git Product logo

ib-gateway-docker's Introduction

Interactive Brokers Gateway Docker

IB Gateway running in Docker with IB Controller and VNC

  • TWS Gateway: v974.4g
  • IB Controller: v3.2.0

Docker Hub image

Getting Started

> git clone
> cd ib-gateway-docker
> docker build .
> docker-compose up

Expected output

Creating ibgatewaydocker_tws_1 ...
Creating ibgatewaydocker_tws_1 ... done
Attaching to ibgatewaydocker_tws_1
tws_1  | Starting virtual X frame buffer: Xvfb.
tws_1  | find: '/opt/IBController/Logs': No such file or directory
tws_1  | stored passwd in file: /.vnc/passwd
tws_1  | Starting x11vnc.
tws_1  |
tws_1  | +==============================================================================
tws_1  | +
tws_1  | + IBController version 3.2.0
tws_1  | +
tws_1  | + Running GATEWAY 960
tws_1  | +
tws_1  | + Diagnostic information is logged in:
tws_1  | +
tws_1  | + /opt/IBController/Logs/ibc-3.2.0_GATEWAY-960_Tuesday.txt
tws_1  | +
tws_1  | +
tws_1  | Forking :::4001 onto 0.0.0.0:4003\n

You will now have the IB Gateway app running on port 4003 and VNC on 5901.

See docker-compose.yml for configuring VNC password, accounts and trading mode.

Please do not open your box to the internet.

Testing VNC

  • localhost:5901

vnc

Demo Accounts

It seems that all of the demo accounts are dead for good:

  • edemo
  • fdemo
  • pmdemo

Troubleshooting

Sometimes, when running in non-daemon mode, you will see this:

Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

You will have to remove the container docker rm container_id and run docker-compose up again.

ib-gateway-docker's People

Contributors

krumware avatar mvberg avatar zhongdai avatar zhongdai813 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ib-gateway-docker's Issues

Connection refused after it has been working after many reboots

After having worked for some time, now it seems I cannot shake this off:

socat[537] E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused                                                                    

I think that I have logged in to TWS once and then afterwards it started working again, but at other times it did not have an effect. It actually seems quite random? Did anyone experience something like this?

Oracle-java-installer ppa is discontinued

I got this mistake when I tried to build the docker image:

Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'oracle-java8-installer' has no installation candidate
The command '/bin/sh -c echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&   add-apt-repository -y ppa:webupd8team/java &&   apt-get update &&   apt-get install -y oracle-java8-installer &&   apt-get install -y dos2unix &&   rm -rf /var/lib/apt/lists/* &&   rm -rf /var/cache/oracle-jdk8-installer' returned a non-zero code: 100

I have found that oracle-java8-instaler ppa is discontinued, due to a recent modification of Oracle licenses. The following can be read on the webupd8 website (http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html):

The Oracle JDK License has changed for releases starting April 16, 2019.

The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from prior Oracle JDK licenses. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. An FAQ is available here.

Oracle Java downloads now require logging in to an Oracle account to download Java updates, like the latest Oracle Java 8u211 / Java SE 8u212. Because of this I cannot update the PPA with the latest Java (and the old links were broken by Oracle).

For this reason, THIS PPA IS DISCONTINUED (unless I find some way around this limitation).

Is it possible to find a solution to this problem?

Thank you.

Force disconnecting a client connection inside IB gateway

Hi,

Thanks for updating the IBG version! Does anyone encounter a scenario where a client connection does not disconnect when you close the application? Then the next time I restart the application I could not connect properly because I am using the same client Id. I don't want to change the client Id. The client application which is connecting to IBG is asp.net core web api. The connection will happen automatically during the start of the application.

My setup was -

  1. ib-gateway-docker is run in Linux VM, expose the port. Access is limited to specific IP only.
  2. asp.net core web api deploy separately in Azure (using docker-compose). This web api can connect to ib-gateway-docker
  3. web application deployed in Azure (using docker-compose together with #2). This web application accessing ther web api (#2)

Everything is working fine on the first deployment. Then web api to IB gateway just stop functioning even if it shows the client id still connected in VNC. Then later on VNC will hang and couldn't reconnect.

Is there any way I can see the full logs inside the docker? Is there a way to forcefully disconnect the client id without shutting down the docker container?

Thanks,
Marvin

error when trying to connect to the api

ERROR -1 502 Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket EClients" 
is enabled and connection port is the same as "Socket Port" on the 
TWS "Edit->Global Configuration...->API->Settings" menu. Live Trading ports: 
TWS: 7496; IB Gateway: 4001. Simulated Trading ports for new installations 
of version 954.1 or newer:  TWS: 7497; IB Gateway: 4002
using this code:
from ibapi.client import EClient
from ibapi.wrapper import EWrapper  
class IBapi(EWrapper, EClient):
     def __init__(self):
         EClient.__init__(self, self) 

app = IBapi()
app.connect('127.0.0.1', 4002,123)
app.run()

tried all 4 ports with no luck...

raspberry pi

When trying to run on an raspberry pi I get the following error on docker build .

Step 14/24 : RUN yes n | /opt/TWS/ibgateway-latest-standalone-linux-x64-v974.4g.sh
---> Running in 0aeccaa85527
Unpacking JRE ...
bin/unpack200: 1: bin/unpack200: ELF: not found
bin/unpack200: 2: bin/unpack200: �: not found
bin/unpack200: 3: bin/unpack200: Q�t/lib64/ld-linux-x86-64.so.2GNU: not found
bin/unpack200: 8: bin/unpack200: Syntax error: ")" unexpected
Error unpacking jar files. The architecture or bitness (32/64)
of the bundled JVM might not match your machine.
The command '/bin/sh -c yes n | /opt/TWS/ibgateway-latest-standalone-linux-x64-v974.4g.sh' returned a non-zero code: 1

uname -a
Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux

I´m running the latest Raspbian Buster Lite.

Can the trading mode set to live?

Hi @mvberg,
Thanks for this and this is very helpful. I successfully build the image, run a container and view it in VNC, all perfectly well as documented.
Now, I'm wondering how to use the live trading mode? As you know, in live trading mode, we need to supply additional info in 2-fac mode, e.g. code sent in mobile or the printed card random numbers.
I know once we started a container, run vnc, do some modification in IB gateway settings, then wen can build a new image with these changes. But I still don't see how entering of 2-fac code can be done.
Thanks,
Marvin

Vnc viewer process 100% CPU

I just noticed that the X11vnc process goes crazy after a while and uses 100% of the CPU. I use the VNC connection maybe once.
Is there a way to fix that?

Screenshot_20191107-064214~2

Docker container logging

Hi folks.
I can see the logs via the VNC client, but I'm wondering if there's a way these logs can be sent to STDOUT/STDERR, so that a standard docker logging provider can be used.
Anyone had any success getting something like this to work?

Reducing CPU and memory usage by using ubuntu:19.04 image

Hi folks, I am performing some intensive reads (300 streaming tickers) off the IB gateway and I was hitting a high level of CPU usage (100%) with the image as-is. I confirmed that all the CPU usage was being used by the java executable within the image also.

I managed to reduce this to about 50% by using ubuntu:19.04 as the base image instead of 16.04. I'll raise a pull request with the change.

SECURITY ISSUE: Ports are accessible from anyone on the same network and can make trades on your account

Port mapping with docker-compose exposes ports not only on your local machine but also to others on your network.
So you're vulnerable to people making API calls to IB Gateway or accessing VNC whenever you're at a coffee shop or any other local network.

See article:
https://vccolombo.github.io/blog/how-to-stop-docker-exposing-your-containers-to-the-world/

Fix:
Change docker-compose ports from

ports:
  - "4003:4003"
  - "5901:5900"

To

ports:
  - "127.0.0.1:4003:4003"
  - "127.0.0.1:5901:5900"

OCI runtime create failed: container_linux.go:345

ERROR: for tws Cannot start service tws: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused "process_linux.go:413: running prestart hook 0 caused \"error running hook: exit status 2, stdout: , stderr: fatal error: runtime: out of memory\\n\\nruntime stack:\\nruntime.throw(0x557a04e0bac1, 0x16)\\n\\t/usr/local/go/src/runtime/panic.go:617 +0x74 fp=0x7ffee10f59b0 sp=0x7ffee10f5980 pc=0x557a034f61a4\\nruntime.sysMap(0xc000000000, 0x4000000, 0x557a072e3378)\\n\\t/usr/local/go/src/runtime/mem_linux.go:170 +0xc9 fp=0x7ffee10f59f0 sp=0x7ffee10f59b0 pc=0x557a034e06e9\\nruntime.(*mheap).sysAlloc(0x557a072c6960, 0x2000, 0x557a072c6970, 0x1)\\n\\t/usr/local/go/src/runtime/malloc.go:633 +0x1cf fp=0x7ffee10f5a98 sp=0x7ffee10f59f0 pc=0x557a034d358f\\nruntime.(*mheap).grow(0x557a072c6960, 0x1, 0x0)\\n\\t/usr/local/go/src/runtime/mheap.go:1222 +0x44 fp=0x7ffee10f5af0 sp=0x7ffee10f5a98 pc=0x557a034edaf4\\nruntime.(*mheap).allocSpanLocked(0x557a072c6960, 0x1, 0x557a072e3388, 0x0)\\n\\t/usr/local/go/src/runtime/mheap.go:1150 +0x381 fp=0x7ffee10f5b28 sp=0x7ffee10f5af0 pc=0x557a034ed9e1\\nruntime.(*mheap).alloc_m(0x557a072c6960, 0x1, 0x2a, 0x6e43a318)\\n\\t/usr/local/go/src/runtime/mheap.go:977 +0xc6 fp=0x7ffee10f5b78 sp=0x7ffee10f5b28 pc=0x557a034ed036\\nruntime.(*mheap).alloc.func1()\\n\\t/usr/local/go/src/runtime/mheap.go:1048 +0x4e fp=0x7ffee10f5bb0 sp=0x7ffee10f5b78 pc=0x557a03521dfe\\nruntime.(*mheap).alloc(0x557a072c6960, 0x1, 0x557a0301002a, 0x7ffee10f5c50)\\n\\t/usr/local/go/src/runtime/mheap.go:1047 +0x8c fp=0x7ffee10f5c00 sp=0x7ffee10f5bb0 pc=0x557a034ed30c\\nruntime.(*mcentral).grow(0x557a072c7760, 0x0)\\n\\t/usr/local/go/src/runtime/mcentral.go:256 +0x97 fp=0x7ffee10f5c48 sp=0x7ffee10f5c00 pc=0x557a034e0167\\nruntime.(*mcentral).cacheSpan(0x557a072c7760, 0x7f911b4fc000)\\n\\t/usr/local/go/src/runtime/mcentral.go:106 +0x301 fp=0x7ffee10f5ca8 sp=0x7ffee10f5c48 pc=0x557a034dfc71\\nruntime.(*mcache).refill(0x7f911b4fc008, 0x2a)\\n\\t/usr/local/go/src/runtime/mcache.go:135 +0x88 fp=0x7ffee10f5cc8 sp=0x7ffee10f5ca8 pc=0x557a034df708\\nruntime.(*mcache).nextFree(0x7f911b4fc008, 0x557a072bc12a, 0x7f911b4fc008, 0x7f911b4fc000, 0x8)\\n\\t/usr/local/go/src/runtime/malloc.go:786 +0x8a fp=0x7ffee10f5d00 sp=0x7ffee10f5cc8 pc=0x557a034d3dca\\nruntime.mallocgc(0x180, 0x557a05e3cb80, 0x1, 0x557a072e33e0)\\n\\t/usr/local/go/src/runtime/malloc.go:939 +0x780 fp=0x7ffee10f5da0 sp=0x7ffee10f5d00 pc=0x557a034d4700\\nruntime.newobject(0x557a05e3cb80, 0x4000)\\n\\t/usr/local/go/src/runtime/malloc.go:1068 +0x3a fp=0x7ffee10f5dd0 sp=0x7ffee10f5da0 pc=0x557a034d4b0a\\nruntime.malg(0x8f00008000, 0x557a072c8fd0)\\n\\t/usr/local/go/src/runtime/proc.go:3220 +0x33 fp=0x7ffee10f5e10 sp=0x7ffee10f5dd0 pc=0x557a034ff653\\nruntime.mpreinit(...)\\n\\t/usr/local/go/src/runtime/os_linux.go:311\\nruntime.mcommoninit(0x557a072c1420)\\n\\t/usr/local/go/src/runtime/proc.go:618 +0xc6 fp=0x7ffee10f5e48 sp=0x7ffee10f5e10 pc=0x557a034f8fc6\\nruntime.schedinit()\\n\\t/usr/local/go/src/runtime/proc.go:540 +0x78 fp=0x7ffee10f5ea0 sp=0x7ffee10f5e48 pc=0x557a034f8c58\\nruntime.rt0_go(0x7ffee10f5fa8, 0x4, 0x7ffee10f5fa8, 0x0, 0x7f911a3feb97, 0x0, 0x7ffee10f5fa8, 0x400000000, 0x557a03523ee0, 0x0, ...)\\n\\t/usr/local/go/src/runtime/asm_amd64.s:195 +0x11e fp=0x7ffee10f5ea8 sp=0x7ffee10f5ea0 pc=0x557a0352400e\\n\""": unknown
ERROR: Encountered errors while bringing up the project.

Default demo accounts currently are not working

The fdemo and edemo users do not seem to work at the moment. I have contacted IB support and it was indicated that the accounts "are being updated, and it could be at a few business days until the update is completed".

This is not a problem with ib-gateway-docker, but with IB. Just wanted to raise the flag in case anyone is having trouble. Will try to update this if things are resolved.

Using multiple containers on different ports

Hi,

I was able to create multiple containers using different ports but R only accepts the default port (4003), all other ports R states "Error in if (curMsg == .twsIncomingMSG$ERR_MSG) { :
argument is of length zero"
while the container is active (it is listed in docker ps)

Also, I cannot connect to any other port using VNCViewer other than the default 5901. How can I view other containers that are not using the default ports?

TWS Version 974 is not installed

Hi thanks for sharing this repo, I may have down something wrong as I'm pretty new to Docker however when I start the image I get a warning that an error has occured.

I install VIM and take a look and it tells me that TWS version 974 is not installed: can't find /root/Jts/974/jars

In my /root/Jts/ folder I have a folder called ibgateway and jts.ini

The build process itself works fine with no errors. Any idea where I'm going wrong?

VNC viewer connection closed unexpectedly

Hi @mvberg ,
I'm encountering an issue to view the IB from VNC. But this problem only appears in windows. I tried several vnc viewer such as tightvnc, tigervnc, and realvnc. In MacOS I just use tightvnc and it's working fine.
Here is an error I got in realvnc connecting to localhost:5901. Have you encountered this problem in Windows?

image

Update:
I noticed the some errors on docker-compose up --build
image

"No demo user account available"?

Hi mvberg,
Have you seen an issue where there is "No demo user account available"?
I have tried manually specifying the user credentials in IBController.ini, but no luck.

For reference, I cloned the repo, built the container with docker-compose build and ran with docker-compose up. We tried this on both windows and linux machines, but each place prompts with "No demo user account available" upon connecting via VNC. A little bit lost here as to whether this should be working out of the box, some direction would be greatly appreciated! TIA!

Running docker without docker-compose

I'm a bit new to docker, so this might be a silly question.

I would like to run and stop this docker container from a python code (this code handles an HTTP server, so I can turn on/off the gateway when I want for security). I tried docker official library for python, but it does not handle docker-compose, which is the recommended method here to run the container instead of docker run.

Is it possible to do this? Or is there any limitation here, due to a stacked nature of this container?

Running container requires the use of env variables

This issue is for tracking and explanation:
Currently, running this container requires the use of env variables. This is due to the need to bypass launching the IB Gateway using the original internal script /IBController/IBControllerGatewayStart.sh.
If we didn't bypass this script, our environmental variables would be overwritten by the defaults, so we must bypass this script in order to be able to use the env vars.

In future releases of the IB Gateway, either through QuantConnect's fork or otherwise, the original maintainers of IB Gateway may choose to add env var support to this script, but (opinion incoming) that is outside the responsibility of this repo.

⚠️ Needs to be updated to latest version of IB Gateway or will stop functioning 12/29/2021 ⚠️

From IB:

"We are contacting you because you or one of your sub-accounts has logged in to our systems during the past 7 days using an older version of the Trader Workstation that is still not patched against a global vulnerability in Apache's Log4j software library, commonly known as 'Log4Shell'.

To secure your environment, it is important for you to download and install the latest 'TWS Latest' version of Trader Workstation.

Due to the high risk nature of the vulnerability, we will discontinue operation of non-upgraded TWS installs on Wednesday, December 29.

second vnc connection is rejected

I usually use vncviewer to monitor the ib-gateway in the container. The first vncviewer connection is fine, but second is always rejected. I got an 'End of stream' error for second connection.

For other vnc containers, I usually use 'vncviewer -shared' to solved this problem. but it does not work for this container. any idea?

error after stop and rerun docker-compose up

the first start works fine but if I kill the process with ctrl + C and rerun docker-compose up I have the following error:

co@ub  ~/project/IBproject/ib-gateway-docker   master ●  docker-compose up
Starting ibgatewaydocker_tws_1 ... done
Attaching to ibgatewaydocker_tws_1
tws_1  | Starting virtual X frame buffer: Xvfb.
tws_1  | 22:55:36:156 IBController: detected frame entitled: IB Gateway; event=Activated
tws_1  | 22:55:36:163 IBController: detected frame entitled: IB Gateway; event=Opened
tws_1  | 22:55:36:165 IBController: Setting Trading mode = paper
tws_1  | 22:55:36:196 IBController: Click button: Login
tws_1  | 22:55:37:518 IBController: detected frame entitled: IB Gateway.  API Account: fdemo; event=Activated
tws_1  | 22:55:37:523 IBController: detected frame entitled: IB Gateway.  API Account: fdemo; event=Opened
tws_1  | 22:55:37:524 IBController: Found Gateway main window
tws_1  | 22:55:37:734 IBController: detected frame entitled: IB Gateway; event=Activated
tws_1  | 22:55:37:736 IBController: detected dialog entitled: IB Gateway; event=Opened
tws_1  | 22:55:37:738 IBController: detected dialog entitled: IB Gateway; event=Activated
tws_1  | mkdir: cannot create directory '/.vnc': File exists
tws_1  | stored passwd in file: /.vnc/passwd
tws_1  | Starting x11vnc.
tws_1  |
tws_1  | +==============================================================================
tws_1  | +
tws_1  | + IBController version 3.2.0.5
tws_1  | +
tws_1  | + Running GATEWAY 974
tws_1  | +
tws_1  | + Diagnostic information is logged in:
tws_1  | +
tws_1  | + /opt/IBController/Logs/ibc-3.2.0.5_GATEWAY-974_Friday.txt
tws_1  | +
tws_1  | +
tws_1  |
tws_1  | ================================================================================
tws_1  |
tws_1  | Starting IBController version 3.2.0.5 on 2019-05-24 at 23:00:36
tws_1  |
tws_1  | Operating system: Linux 5c7438496b9a 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
tws_1  |
tws_1  | Arguments:
tws_1  |
tws_1  | TWS version = 974
tws_1  | Entry point = ibcontroller.IBGatewayController
tws_1  | --tws-path = /root/Jts
tws_1  | --tws-settings-path = /root/Jts
tws_1  | --ibc-path = /opt/IBController
tws_1  | --ibc-ini = /root/IBController/IBController.ini
tws_1  | --mode = paper
tws_1  | --java-path = /opt/i4j_jres/1.8.0_152/bin
tws_1  | --user = ***
tws_1  | --pw = ***
tws_1  | --fix-user =
tws_1  | --fix-pw =
tws_1  |
tws_1  | =================================
tws_1  | Generating the classpath
tws_1  | Classpath=/root/Jts/ibgateway/974/jars/jts4launch-974.jar:/root/Jts/ibgateway/974/jars/locales.jar:/root/Jts/ibgateway/974/jars/log4j-api-2.5.jar:/root/Jts/ibgateway/974/jars/log4j-core-2.5.jar:/root/Jts/ibgateway/974/jars/total-2018.jar:/root/Jts/ibgateway/974/jars/twslaunch-974.jar:/root/Jts/ibgateway/974/jars/twslaunch-install4j-1.9.jar:/opt/IBController/IBController.jar
tws_1  |
tws_1  | Generating the JAVA VM options
tws_1  | Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70
tws_1  |
tws_1  | Determining the location of java executable
tws_1  | Location of java executable=/opt/i4j_jres/1.8.0_152/bin
tws_1  |
tws_1  | Starting IBGateway with this command:
tws_1  | /opt/i4j_jres/1.8.0_152/bin/java -cp /root/Jts/ibgateway/974/jars/jts4launch-974.jar:/root/Jts/ibgateway/974/jars/locales.jar:/root/Jts/ibgateway/974/jars/log4j-api-2.5.jar:/root/Jts/ibgateway/974/jars/log4j-core-2.5.jar:/root/Jts/ibgateway/974/jars/total-2018.jar:/root/Jts/ibgateway/974/jars/twslaunch-974.jar:/root/Jts/ibgateway/974/jars/twslaunch-install4j-1.9.jar:/opt/IBController/IBController.jar -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 ibcontroller.IBGatewayController /root/IBController/IBController.ini *** *** paper
tws_1  |
tws_1  | System Properties
tws_1  | ------------------------------------------------------------
tws_1  | java.runtime.name = Java(TM) SE Runtime Environment
tws_1  | sun.boot.library.path = /opt/i4j_jres/1.8.0_152/lib/amd64
tws_1  | java.vm.version = 25.152-b16
tws_1  | java.vm.vendor = Oracle Corporation
tws_1  | java.vendor.url = http://java.oracle.com/
tws_1  | path.separator = :
tws_1  | java.vm.name = Java HotSpot(TM) 64-Bit Server VM
tws_1  | file.encoding.pkg = sun.io
tws_1  | user.country = US
tws_1  | sun.java.launcher = SUN_STANDARD
tws_1  | sun.os.patch.level = unknown
tws_1  | java.vm.specification.name = Java Virtual Machine Specification
tws_1  | user.dir = /root/Jts
tws_1  | java.runtime.version = 1.8.0_152-b16
tws_1  | java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
tws_1  | java.endorsed.dirs = /opt/i4j_jres/1.8.0_152/lib/endorsed
tws_1  | os.arch = amd64
tws_1  | java.io.tmpdir = /tmp
tws_1  | line.separator =
tws_1  |
tws_1  | java.vm.specification.vendor = Oracle Corporation
tws_1  | os.name = Linux
tws_1  | sun.jnu.encoding = ANSI_X3.4-1968
tws_1  | java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
tws_1  | java.specification.name = Java Platform API Specification
tws_1  | java.class.version = 52.0
tws_1  | sun.management.compiler = HotSpot 64-Bit Tiered Compilers
tws_1  | os.version = 4.15.0-48-generic
tws_1  | user.home = /root
tws_1  | user.timezone = America/Chicago
tws_1  | java.awt.printerjob = sun.print.PSPrinterJob
tws_1  | file.encoding = ANSI_X3.4-1968
tws_1  | java.specification.version = 1.8
tws_1  | java.class.path = /root/Jts/ibgateway/974/jars/jts4launch-974.jar:/root/Jts/ibgateway/974/jars/locales.jar:/root/Jts/ibgateway/974/jars/log4j-api-2.5.jar:/root/Jts/ibgateway/974/jars/log4j-core-2.5.jar:/root/Jts/ibgateway/974/jars/total-2018.jar:/root/Jts/ibgateway/974/jars/twslaunch-974.jar:/root/Jts/ibgateway/974/jars/twslaunch-install4j-1.9.jar:/opt/IBController/IBController.jar
tws_1  | user.name = root
tws_1  | java.vm.specification.version = 1.8
tws_1  | sun.java.command = ibcontroller.IBGatewayController /root/IBController/IBController.ini fdemo demouser paper
tws_1  | java.home = /opt/i4j_jres/1.8.0_152
tws_1  | sun.arch.data.model = 64
tws_1  | user.language = en
tws_1  | java.specification.vendor = Oracle Corporation
tws_1  | awt.toolkit = sun.awt.X11.XToolkit
tws_1  | java.vm.info = mixed mode
tws_1  | java.version = 1.8.0_152
tws_1  | java.ext.dirs = /opt/i4j_jres/1.8.0_152/lib/ext:/usr/java/packages/lib/ext
tws_1  | sun.boot.class.path = /opt/i4j_jres/1.8.0_152/lib/resources.jar:/opt/i4j_jres/1.8.0_152/lib/rt.jar:/opt/i4j_jres/1.8.0_152/lib/sunrsasign.jar:/opt/i4j_jres/1.8.0_152/lib/jsse.jar:/opt/i4j_jres/1.8.0_152/lib/jce.jar:/opt/i4j_jres/1.8.0_152/lib/charsets.jar:/opt/i4j_jres/1.8.0_152/lib/jfr.jar:/opt/i4j_jres/1.8.0_152/classes
tws_1  | java.vendor = Oracle Corporation
tws_1  | file.separator = /
tws_1  | java.vendor.url.bug = http://bugreport.sun.com/bugreport/
tws_1  | sun.io.unicode.encoding = UnicodeLittle
tws_1  | sun.cpu.endian = little
tws_1  | sun.cpu.isalist =
tws_1  | ------------------------------------------------------------
tws_1  | 23:00:37:155 IBController: using default settings provider: ini file is /root/IBController/IBController.ini
tws_1  | 23:00:37:156 IBController: using default login manager: getting username and password from args
tws_1  | 23:00:37:156 IBController: using default config dialog manager: constructor parameter isGateway=true
tws_1  | 23:00:37:156 IBController: using default trading mode manager: constructor parameter args: tradingMode=paper
tws_1  | 23:00:37:158 IBController: using default config dialog manager
tws_1  | 23:00:37:167 IBController: IBControllerServer is started.
tws_1  | 23:00:37:304 IBController: IBControllerServer listening on address: 5c7438496b9a/172.18.0.2 port: 7462
tws_1  | Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
tws_1  |        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
tws_1  |        at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
tws_1  |        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
tws_1  |        at java.security.AccessController.doPrivileged(Native Method)
tws_1  |        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
tws_1  |        at java.lang.Class.forName0(Native Method)
tws_1  |        at java.lang.Class.forName(Class.java:264)
tws_1  |        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
tws_1  |        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
tws_1  |        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
tws_1  |        at java.lang.Class.forName0(Native Method)
tws_1  |        at java.lang.Class.forName(Class.java:264)
tws_1  |        at java.awt.Toolkit$2.run(Toolkit.java:860)
tws_1  |        at java.awt.Toolkit$2.run(Toolkit.java:855)
tws_1  |        at java.security.AccessController.doPrivileged(Native Method)
tws_1  |        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
tws_1  |        at ibcontroller.IBController.createToolkitListener(Unknown Source)
tws_1  |        at ibcontroller.IBController.load(Unknown Source)
tws_1  |        at ibcontroller.IBGatewayController.main(Unknown Source)
tws_1  | Forking :::4001 onto 0.0.0.0:4003\n

Is it normal? What should I do to stop the container and relaunch it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.