lichess-bot icon indicating copy to clipboard operation
lichess-bot copied to clipboard

Green light goes off

Open CatalinFrancu opened this issue 6 years ago • 2 comments

Hi,

I'm using lichess-bot for my two antichess bots (written from scratch), @NilatacBot and @CatNail. Things work great with one exception. After some time the green light goes off and the API no longer shows the bots as offline (the key "online":true is missing from the results). Lichess-bot is actually still running, the engines are online and I can challenge them, play them etc.

Is there a fix for this? I would like to keep the green light on for two reasons:

  1. It is a clear indication that the bot is online and accepting challenges. With the green light off, some players might assume the bot is offline.
  2. I monitor my bots with a cron job that fetches that API URL and looks for "online":true.

As a workaround for (2), how else could I monitor the bots' health and be confident that they are still responding to challenges?

Here is a log of the last few restarts, click to expand. There are a couple of 502 errors in one instance, but they seem unrelated.
2020-05-25 10:34:21,473: 
    .   _/|
    .  // o\
    .  || ._)  lichess-bot 1.1.4
    .  //__\
    .  )___(   Play on Lichess with a bot
    
2020-05-25 10:34:21,478: Starting new HTTPS connection (1): lichess.org:443
2020-05-25 10:34:21,688: https://lichess.org:443 "GET /api/account HTTP/1.1" 200 None
2020-05-25 10:34:21,689: Welcome NilatacBot!
2020-05-25 10:34:21,689: You're now connected to https://lichess.org/ and awaiting challenges.
2020-05-25 10:34:21,705: Starting new HTTPS connection (1): lichess.org:443
2020-05-25 10:34:21,891: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 200 None
2020-05-25 15:53:35,003: Starting new HTTPS connection (1): lichess.org:443
2020-05-25 15:53:35,184: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 502 2021
2020-05-25 15:53:35,186: Starting new HTTPS connection (1): lichess.org:443
2020-05-25 15:53:44,218: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 502 2021
2020-05-25 15:53:44,221: Starting new HTTPS connection (1): lichess.org:443
2020-05-25 15:53:54,611: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 200 None
2020-05-26 07:59:24,914: 
    .   _/|
    .  // o\
    .  || ._)  lichess-bot 1.1.4
    .  //__\
    .  )___(   Play on Lichess with a bot
    
2020-05-26 07:59:24,919: Starting new HTTPS connection (1): lichess.org:443
2020-05-26 07:59:25,107: https://lichess.org:443 "GET /api/account HTTP/1.1" 200 None
2020-05-26 07:59:25,107: Welcome NilatacBot!
2020-05-26 07:59:25,107: You're now connected to https://lichess.org/ and awaiting challenges.
2020-05-26 07:59:25,122: Starting new HTTPS connection (1): lichess.org:443
2020-05-26 07:59:25,310: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 200 None
2020-05-26 09:41:56,877: 
    .   _/|
    .  // o\
    .  || ._)  lichess-bot 1.1.4
    .  //__\
    .  )___(   Play on Lichess with a bot
    
2020-05-26 09:41:56,883: Starting new HTTPS connection (1): lichess.org:443
2020-05-26 09:41:57,073: https://lichess.org:443 "GET /api/account HTTP/1.1" 200 None
2020-05-26 09:41:57,074: Welcome NilatacBot!
2020-05-26 09:41:57,074: You're now connected to https://lichess.org/ and awaiting challenges.
2020-05-26 09:41:57,093: Starting new HTTPS connection (1): lichess.org:443
2020-05-26 09:41:57,281: https://lichess.org:443 "GET /api/stream/event HTTP/1.1" 200 None

Thanks!

CatalinFrancu avatar May 26 '20 06:05 CatalinFrancu

This is a bug on the Lichess end and not related to lichess-bot

ShailChoksi avatar May 27 '20 11:05 ShailChoksi

OK, I opened an issue on that side as well. If there is a resolution, I will relay it here. Thanks!

CatalinFrancu avatar May 29 '20 07:05 CatalinFrancu