raisedragon / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Reconnect issue #222

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I forgot if I've brought this up before with you. Forgive me if I have. But it 
seems that startBot() is not working properly to reconnect the bot when it gets 
disconnected due to netsplits being annoying.

It does this:
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] org.pircbotx.PircBotX 
- Connected to server.
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.output.OutputRaw - CAP LS
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.output.OutputRaw - NICK WaveTact
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.output.OutputRaw - USER WaveTact 8 * :WaveTact
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - :anarchy.esper.net NOTICE * :*** Looking up your 
hostname...
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - :anarchy.esper.net NOTICE * :*** Checking Ident
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - :anarchy.esper.net NOTICE * :*** No Ident response
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - :anarchy.esper.net NOTICE * :*** Found your hostname
[2014/12/21 01:31:02] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - :anarchy.esper.net CAP * LS :account-notify 
away-notify extended-join multi-prefix sasl tls
, pauses for a bit, then
[2014/12/21 01:31:40] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.InputParser - ERROR :Closing Link: bots.techcavern.com (Connection 
timed out)
[2014/12/21 01:31:40] [ForkJoinPool-1-worker-114] [INFO] org.pircbotx.PircBotX 
- Socket is closed, stopping read loop and shutting down
[2014/12/21 01:32:00] [ForkJoinPool-1-worker-114] [INFO] 
org.pircbotx.output.OutputRaw - PRIVMSG #techcavern :Reconnecting...

Original issue reported on code.google.com by jzhou2...@gmail.com on 21 Dec 2014 at 1:35

GoogleCodeExporter commented 9 years ago
I have the bot set to 20 seconds delay and 5 tries to reconnect I should add. 
After all 5 tries, it stops. until I run the command manually. Although its 40 
seconds before the remote server closes the link, so probably unrelated.

Original comment by jzhou2...@gmail.com on 21 Dec 2014 at 1:38

GoogleCodeExporter commented 9 years ago
19:26 <JZTech101> [19:30:34] TheLQ_ it appears that you broke reconnecting 
somehow
19:26 <JZTech101> [19:30:40] startBot() no longer works :(
19:26 <JZTech101> [19:30:50] (when I use it to reconnect)
19:26 <JZTech101> [19:33:06] hmm
19:26 <JZTech101> [19:33:08] maybe not
19:26 <JZTech101> [19:33:19] TheLQ_ I will note that now I see this [2014/12/18 
00:32:31] [ForkJoinPool-1-worker-43] [INFO] org.pircbotx.PircBotX - ---Starting 
Connect attempt 7/5---
19:26 <JZTech101> [19:33:25] when I see the start bot command
19:26 <JZTech101> [19:33:29] s/ssee/run/
19:26  * TheLQ_ [19:33:30] sighs
19:26 <JZTech101> [19:34:27] and for some reason its jsut not connecting. The 
console shows it starts connecting... then pauses
19:26 <JZTech101> [19:34:53] I blame the servers being dumb
19:26 <TheLQ_> [19:35:16] ?raw quit
19:26 <TheLQ> [19:37:09] It works on my end
19:26 <TheLQ> [19:37:32] .setAutoReconnect(true)
19:26 <TheLQ> [19:37:32] .setAutoReconnectAttempts(2)
19:26 <TheLQ> [19:38:01] Does auto reconnect when quitting, and when I unplug 
the internet tries to connect twice then throws an exception

it appears I have. I'm a little busy to check if its been fixed since the 
commits you've done since then. Close it if you've fixed it :)

Original comment by jzhou2...@gmail.com on 21 Dec 2014 at 4:31

GoogleCodeExporter commented 9 years ago
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.PircBotX - 
---Starting Connect attempt 2/5---
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.PircBotX - Connected 
to server.
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.output.OutputRaw - 
CAP LS
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.output.OutputRaw - 
NICK WaveTactDev
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.output.OutputRaw - 
USER WaveTact 8 * :WaveTactDev
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.InputParser - 
:sinisalo.freenode.net NOTICE * :*** Looking up your hostname...
[2015/01/04 13:10:12] [botPool0-bot0] [INFO] org.pircbotx.InputParser - 
:sinisalo.freenode.net NOTICE * :*** Checking Ident
[2015/01/04 13:10:13] [botPool0-bot0] [INFO] org.pircbotx.InputParser - 
:sinisalo.freenode.net NOTICE * :*** Found your hostname
[2015/01/04 13:10:19] [botPool0-bot0] [INFO] org.pircbotx.InputParser - 
:sinisalo.freenode.net NOTICE * :*** No Ident response
[2015/01/04 13:10:20] [botPool0-bot0] [INFO] org.pircbotx.InputParser - 
:sinisalo.freenode.net CAP * LS :account-notify extended-join identify-msg 
multi-prefix sasl
[2015/01/04 13:11:15] [botPool0-bot0] [INFO] org.pircbotx.InputParser - ERROR 
:Closing Link: c-73-29-90-129.hsd1.nj.comcast.net (Connection timed out)
[2015/01/04 13:11:15] [botPool0-bot0] [INFO] org.pircbotx.PircBotX - Socket is 
closed, stopping read loop and shutting down

Issue reamins and now occurs during all reconnects

Original comment by jzhou2...@gmail.com on 4 Jan 2015 at 6:11

GoogleCodeExporter commented 9 years ago
Whats the output of 

Configuration config = ...;
for(CapHandler curCapHandler : config.getCapHandlers()) {
    System.out.println(curCapHandler);
}

Original comment by Lord.Qua...@gmail.com on 5 Jan 2015 at 8:33

GoogleCodeExporter commented 9 years ago
Oh and of 

System.out.println(config.isCapEnabled())

Original comment by Lord.Qua...@gmail.com on 5 Jan 2015 at 8:35