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

Issue with looping : Gateway session active but not authenticated.. IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart. #163

Closed
greybox1 opened this issue Oct 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@greybox1
Copy link

All was fine then there was a IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart. Now I am looping with Gateway session found but not authenticated, authenticating...

Is this an Interactive Broker issue? Also can't login with 2FA on a real account. Paper trade works fine. Any suggestions?

Thanks!

2023-10-19 03:55:11,354|I| Maintenance
2023-10-19 03:55:11,934|I| Gateway running and authenticated
2023-10-19 03:56:11,354|I| Maintenance
2023-10-19 03:56:11,922|I| Gateway running and authenticated
2023-10-19 03:57:11,355|I| Maintenance
2023-10-19 03:57:11,848|I| Gateway running and authenticated
2023-10-19 03:58:11,354|I| Maintenance
2023-10-19 03:58:11,786|I| Gateway running and authenticated
2023-10-19 03:59:11,354|I| Maintenance
2023-10-19 03:59:11,795|I| Gateway running and authenticated
2023-10-19 04:00:11,354|I| Maintenance
2023-10-19 04:00:11,790|I| Gateway running and authenticated
2023-10-19 04:01:11,354|I| Maintenance
2023-10-19 04:01:11,767|I| Gateway running and authenticated
2023-10-19 04:02:11,355|I| Maintenance
2023-10-19 04:02:11,568|E| IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart.
2023-10-19 04:02:11,813|E| IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart.
2023-10-19 04:02:11,813|I| No active sessions, logging in...
2023-10-19 04:02:11,814|I| Loading auth webpage at https://localhost:5007/sso/Login?forwardTo=22&RL=1&ip2loc=on
2023-10-19 04:02:18,262|I| Gateway auth webpage loaded
2023-10-19 04:02:18,262|I| Login attempt number 1
2023-10-19 04:02:23,479|I| Submitting the form
2023-10-19 04:02:24,303|I| Webpage displayed "Client login succeeds"
2023-10-19 04:02:26,304|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7f53a5a7f6d0> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="0c2619363787d859c464aa7aad6fe2de")>
2023-10-19 04:02:26,333|I| Authentication process succeeded
2023-10-19 04:02:29,561|E| IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart.
2023-10-19 04:02:29,561|I| Attempt number 2
2023-10-19 04:02:29,776|E| IBKR server error: "HTTP Error 500: Internal Server Error". One of reasons for this error is IBKR server restart.
2023-10-19 04:02:29,777|I| Max validate request retries reached after 2 attempts. Consider increasing the retries by setting IBEAM_REQUEST_RETRIES environment variable
2023-10-19 04:02:29,777|E| Gateway running but has no active sessions
2023-10-19 04:03:11,354|I| Maintenance
2023-10-19 04:03:11,828|I| Gateway session found but not authenticated, authenticating...
2023-10-19 04:03:11,828|I| Loading auth webpage at https://localhost:5007/sso/Login?forwardTo=22&RL=1&ip2loc=on
2023-10-19 04:03:18,296|I| Gateway auth webpage loaded
2023-10-19 04:03:18,296|I| Login attempt number 1
2023-10-19 04:03:23,516|I| Submitting the form
2023-10-19 04:03:24,336|I| Webpage displayed "Client login succeeds"
2023-10-19 04:03:26,336|I| Cleaning up the resources. Display: <pyvirtualdisplay.display.Display object at 0x7f53a5a98d50> | Driver: <selenium.webdriver.chrome.webdriver.WebDriver (session="ed9d21aadfd0e0de9e903f8f62217677")>
2023-10-19 04:03:26,378|I| Authentication process succeeded
2023-10-19 04:03:29,575|E| Gateway session active but not authenticated
2023-10-19 04:03:29,583|I| Waiting 15 seconds to reauthenticate before restarting.
2023-10-19 04:03:44,583|I| Logging out and restarting the Gateway
2023-10-19 04:03:44,806|I| Gateway logout successful
2023-10-19 04:03:45,012|I| Gateway session found but not authenticated, authenticating...
2023-10-19 04:03:45,012|I| Loading auth webpage at https://localhost:5007/sso/Login?forwardTo=22&RL=1

@greybox1 greybox1 added the bug Something isn't working label Oct 20, 2023
@Voyz
Copy link
Owner

Voyz commented Oct 25, 2023

Hi @greybox1 thanks for your issue report. It seems to be a duplicate of #152, please read through it and https://github.com/Voyz/ibeam/wiki/Troubleshooting#authentication-loop for more insight on the issue you're facing.

Yes, from what we're understanding this is an IBKR issue. It's not unusual that it would behave differently on paper vs live credentials.

@Voyz
Copy link
Owner

Voyz commented Mar 18, 2024

I'm going to close this issue due to inactivity. Thanks for your contribution and please feel free to request a reopen if you'd like to continue the discussion 👍

@Voyz Voyz closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants