If a host's dns resolution fails for any reason (ISP DNS temporarily down, network issues, etc.) when the bot tries to connect, it will try only once to connect instead of trying repeatedly.
I had a switch changeover and my host lost network connectivity for a bit. Bot got disconnected, tried to reconnect while the connection was still down, and was met with:
Server Not Connected! Let's try again!
Traceback (most recent call last):
File "pierc.py", line 200, in <module>
main()
File "pierc.py", line 192, in main
mysql_settings["password"] )
File "pierc.py", line 61, in __init__
self.connect(self.server, self.port, self.nick, self.password, self.username, self.ircname, self.localaddress, self.localport, self.ssl, self.ipv6)
File "/var/www/private-services/pierc/bot/irclib.py", line 1084, in connect
localaddress, localport, ssl, ipv6)
File "/var/www/private-services/pierc/bot/irclib.py", line 439, in connect
raise ServerConnectionError, "Couldn't connect to socket: %s" % x
irclib.ServerConnectionError: Couldn't connect to socket: [Errno -3] Temporary failure in name resolution
Where it happily stayed disconnected until the channel folks noticed and complained, and I manually restarted it.
If a host's dns resolution fails for any reason (ISP DNS temporarily down, network issues, etc.) when the bot tries to connect, it will try only once to connect instead of trying repeatedly.
I had a switch changeover and my host lost network connectivity for a bit. Bot got disconnected, tried to reconnect while the connection was still down, and was met with:
Where it happily stayed disconnected until the channel folks noticed and complained, and I manually restarted it.