TWS cannot recognize username or password after restart twice #258
-
Describe the bugI use tws and it will fail after the 2nd restart. When auto restart at the end of each day, it will have the error that cannot input the password at the second day. This can also be simulated with click the restart button in file menu. When I login with xfreerdp, The error are as shown: ![]() ![]() It seems it fail to input the password here. To Reproduce
Click the Restart as shown in the figure: ![]() After It restart successfully, click the Restart button again. It will show the error above. I have tried bothe the latest and stable. Both of them have the same problem. Taking the stable as example: Please provide the output of
ExpectedExpect it can restart more than twice. Container logsIf applicable, add the container logs VersionsPlease complete the following information:
Additional contextIt seems after 2nd restart, it fail to input the password. I guess it may be caused that my user id is not 1000. Therefor, the config file save on the host machine is the user id 1000 which is not me. Then, it may have some trouble modify that file to store the password? Then, I set the uid as a parameter in the cimpose file. Howwver, anorher problem happens. The docker begin loop to open a lot of tws windows and cannot login. Any thoughts about this? Hope this can help to solve this bug. Previously, I didn't see this bug. So, it may be introduced in recent updates. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
Please test with a clean /config and clean /tmp mount By clean I mean a dir that's empty. If you're having user id mapping issues this might help to finger point the issue |
Beta Was this translation helpful? Give feedback.
-
@gnzsnz Thanks for your kind help. I removed the tmp and config folder and do it again. the problem still exists. |
Beta Was this translation helpful? Give feedback.
-
you mentioned the user id issue. run command |
Beta Was this translation helpful? Give feedback.
-
Thank you for the feedback. My user ID is 1005, but the configuration appears to belong to the first user (ID 1000), which is not me. I believe this is because the tool enforces the user ID to be 1000, causing a mismatch with the file. When I set the PUID and GUID to 1005, the program enters a loop and continuously opens IB windows without stopping. I’m not sure what’s causing this behavior. I just wanted to check—have you experienced this issue, particularly when using a paper account? |
Beta Was this translation helpful? Give feedback.
-
the default id is 911, so the fact that shows 1000 means that the uid/gid update is working. Everything points to docker with uid 1000 trying to write to your file-system with uid 1005 and having problems. |
Beta Was this translation helpful? Give feedback.
-
For the second restart failing problem, can this problem be replicated in your machine? I have tried in different VPS in different locations and different paper accounts. The problem always exists. But when I try live account, it seems good. Any difference in handling paper/live accounts? For the uid problem. I don't know whether current way of dumping files with a fixed user id (1000) is good. It may have some problems when reading the files that not belong to me. I tried to set the uid to mine (1005). Then, the program enters a dead loop and continuously opens more and more IB windows without stopping. I’m not sure what’s causing this behavior. |
Beta Was this translation helpful? Give feedback.
-
please start TWS on paper, do the double restart, and send the logs. the logs that you sent are for 40 minutes of execution, is difficult to undertand what's going on. most of what i see in the log looks OK, except a JAVA crash, that does not look good. but is unlikely to be a problem with the container. do you have enough RAM? |
Beta Was this translation helpful? Give feedback.
-
I can confirm I have enough ram. I tried to migrate this on a new machine and see the following errors:
I still suspect the way of saving the file have the permission problem. Did you see this error before? |
Beta Was this translation helpful? Give feedback.
-
this explains your problem https://forums.docker.com/t/user-ids-not-lining-up-and-permission-woes/122515
and this one explains how linux server docker images (the base for TWS image) manages UID and GID https://docs.linuxserver.io/general/understanding-puid-and-pgid/ that should solve your problem. |
Beta Was this translation helpful? Give feedback.
-
EDIT: This might be an upstream issue: IbcAlpha/IBC#267 In any case, I can reproduce this problem in 2 ways - for paper trading. I have not tested live trading.
These are my Gateway logs: _ib_gateway-ib-gateway-1_logs.txt Note that at the end of the logs it says |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce the issue with TWS moving this to discussion. as it's not something that can be fixed here |
Beta Was this translation helpful? Give feedback.
EDIT: This might be an upstream issue: IbcAlpha/IBC#267
On the off-chance that this issue is something that might be solved from the docker side of things, below you can find my original message.
In any case, I can reproduce this problem in 2 ways - for paper trading. I have not tested live trading.
These are my Gateway logs:
_ib_gateway-ib-gateway-1_logs.txt
Note that at the end of the logs it says
Click button: Re-login
2 times. Tho…