muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.27k stars 320 forks source link

Discord does not reliabily connect #321

Open Zykino opened 4 years ago

Zykino commented 4 years ago

I have beehive on my PI, connected on WIFI to my router. The WIFI is shut down at night, but not the PI. When the WIFI is down, beehive does not update the watchdogs and die (why? Should I open an issue just for that?).
When reconnecting to internet, beehive restart with everything, but Discord bot is making 3 really quick try to connect, and then stay off until I go to the admin interface and manually :cry: start it again. A delay between restart (1s, 5s, 10s ?) should fix this.

Not sure why there is a call to google's dns 8.8.8.8. This is not the configured DNS in my router.

Also the restart does not remember that I asked for an other bee to be stopped. (Again an other issue for that ?)

juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Worker bee ready: Discord Bot - Discord Bot
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Starting discord bee with apiToken ***
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Done!
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: PANI[0000] [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Fatal bee event: &{0x3424200 map[] 2020-06-09 07:00:32.492465669 +0200 CEST m=+0.024941211 panic <nil> [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable <nil> <nil> } 0
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Starting discord bee with apiToken ***
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Done!
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: PANI[0000] [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Fatal bee event: &{0x3424200 map[] 2020-06-09 07:00:32.493689092 +0200 CEST m=+0.026164726 panic <nil> [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable <nil> <nil> } 1
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Starting discord bee with apiToken ***
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: DEBU[0000] [Discord Bot]: Done!
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: PANI[0000] [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Fatal bee event: &{0x3424200 map[] 2020-06-09 07:00:32.494476375 +0200 CEST m=+0.026951990 panic <nil> [Discord Bot]: Error opening websocket:  Get "https://discordapp.com/api/v6/gateway": dial tcp: lookup discordapp.com on 8.8.8.8:53: dial udp 8.8.8.8:53: connect: network is unreachable <nil> <nil> } 2
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Terminating evil bee Discord Bot after 3 failed tries!
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Discord Bot stopping gracefully!
juin 09 07:00:32 zykino-smartipi2 beehive[28101]: INFO[0000] Discord Bot stopped gracefully!