Skip to content
This repository was archived by the owner on Nov 26, 2018. It is now read-only.
This repository was archived by the owner on Nov 26, 2018. It is now read-only.

botbot-bot connecting to an non-ssl IRC server causes a channel double close #29

Open

Description

@nicholasdavidson

I am deploying on ubuntu-14.04 attempting to target a pretty much default configuration debian hybrid7 irc server. I followed the instructions in botbot-webs Readme.md and created a bot and a channel for our internal IRC server then used honcho to start the various services - I get:

16:19:58 bot.1  | I0711 16:19:58.249738 19447 main.go:25] START. 
                  Use 'botbot -help' for command line options.
16:19:58 bot.1  | I0711 16:19:58.249803 19447 storage.go:60] postgresUrlString:
                  postgres://botbot:botbot@localhost:5432/botbot
16:19:58 bot.1  | I0711 16:19:58.250406 19447 network.go:49] Entering in
                  NetworkManager.RefreshChatbots
16:19:58 bot.1  | I0711 16:19:58.254358 19447 storage.go:121] config.Id: 1
16:19:58 bot.1  | I0711 16:19:58.255236 19447 storage.go:145] config.Channel:
                  [#stingray-eng]
16:19:58 bot.1  | I0711 16:19:58.255315 19447 network.go:68] Connect the bot
                  with the following config: &{1 map[
                  server:gabby.nbttech.com:6667
                  server_password:
                  nick:botbot
                  password:
                  realname:botbot.cam.zeus.com 
                  server_identifier:gabby-nbttech-com-6667.botbot] 
                  [#stingray-eng]}
16:19:58 bot.1  | I0711 16:19:58.255359 19447 network.go:105] Creating chatbot 
                  as:,&{1 map[server:gabby.nbttech.com:6667 server_password:
                  nick:botbot password: realname:botbot.cam.zeus.com
                  server_identifier:gabby-nbttech-com-6667.botbot] 
                  [#stingray-eng]}
16:19:58 bot.1  | I0711 16:19:58.257149 19447 irc.go:299] [Info] Connecting to 
                  IRC server:  gabby.nbttech.com:6667
16:19:58 bot.1  | E0711 16:19:58.594151 19447 irc.go:323] Could not establish a
                  tls connection local error: record overflow
16:19:58 bot.1  | I0711 16:19:58.762515 19447 irc.go:329] Connected: Plain text
                  insecure
16:19:58 bot.1  | I0711 16:19:58.762547 19447 irc.go:245] Init bot botbot on
                  gabby.nbttech.com:6667 (0xc210059270)
16:19:58 bot.1  | I0711 16:19:58.762617 19447 network.go:98] Exiting
                  NetworkManager.RefreshChatbots
16:19:58 bot.1  | I0711 16:19:58.762747 19447 irc.go:228] [RAW botbot on
                  gabby.nbttech.com:6667 (0xc210059270) ] --> PING Bonjour

16:19:58 bot.1  | I0711 16:19:58.930769 19447 irc.go:564] [RAW botbot on
                  gabby.nbttech.com:6667 (0xc210059270) ] <-- ERROR :Trying to
                  reconnect too fast.

16:19:59 bot.1  | I0711 16:19:59.762986 19447 irc.go:228] [RAW botbot on
                  gabby.nbttech.com:6667 (0xc210059270) ] --> USER botbot 0 *
                  :botbot.cam.zeus.com

16:19:59 bot.1  | E0711 16:19:59.763049 19447 irc.go:232] Error writing to conn
                  to botbot on gabby.nbttech.com:6667 (0xc210059270) :  write 
                  tcp 10.16.0.33:6667: connection reset by peer
16:19:59 bot.1  | E0711 16:19:59.763080 19447 irc.go:553] An Error occured while
                  reading from conn  EOF
16:20:00 bot.1  | I0711 16:20:00.763198 19447 irc.go:228] [RAW botbot on
                  gabby.nbttech.com:6667 (0xc210059270) ] --> NICK botbot
16:20:00 bot.1  | process terminated
16:20:00 system | sending SIGTERM to all processes
16:20:00 system | sending SIGTERM to pid 19435
16:20:00 system | sending SIGTERM to pid 19437
16:20:00 system | sending SIGTERM to pid 19439

16:20:00 bot.1  | E0711 16:20:00.763272 19447 irc.go:232] Error writing to conn
                  to botbot on gabby.nbttech.com:6667 (0xc210059270) :  write 
                  tcp 10.16.0.33:6667: broken pipe
16:20:00 bot.1  | panic: runtime error: close of closed channel

The entire log is at https://gist.github.com/nicholasdavidson/d75c385f19b0a4e365e3

Activity

  1. changed the title [-]botbot-bot connecting to an non-ssl IRC server causes a socket double close[/-] [+]botbot-bot connecting to an non-ssl IRC server causes a channel double close[/+] on Jul 11, 2014
  2. yml commented on Jul 11, 2014

    @yml
    Member

    @nicholasdavidson interesting.

    I have not try this setup in a long time and it was working at some point. This is not very helpful for you :-( . I will try to setup something similar to see what is happening.

    Thank you for your report.

  3. self-assigned this
    on Jul 11, 2014
  4. yml commented on Jul 13, 2014

    @yml
    Member

    I have "rediscover" that the default debian/ubuntu config for ircd-hybrid is very conservative:

        /*                                                                                                                                                                          
         * throttle_time: the minimum amount of time required between                                                                                                               
         * connections from the same IP address. exempt {} blocks are excluded                                                                                                      
         * from this throttling.                                                                                                                                                    
         * Offers protection against flooders who reconnect quickly.                                                                                                                
         * Set to 0 to disable.                                                                                                                                                     
         */                                                                                                                                                                         
         /*                                                                                                                                                                         
          * throttle_time = 10;                                                                                                                                                     
          * changed by yml                                                                                                                                                          
          */                                                                                                                                                                        
          throttle_time = 0;    
    

    So disabling the throttle_time will let the bot connect multiple times to find out whether or not we need to use a TLS connection.

    @nicholasdavidson could you please let me know if this is working for you ?

    I am not sure if we need to change anything on the bot side to make it work out of the box. I do not want to add a sleep between the connection attempts. We could eventually avoid the connection degradation from TLS to plain text by adding a BooleanField in botbot-web.

  5. nicholasdavidson commented on Jul 14, 2014

    @nicholasdavidson
    Author

    I can certainly try, it may take a few days as I don't have admin rights to the box where ircd-hybrid is hosted.

  6. tomsherrod commented on Sep 18, 2014

    @tomsherrod

    I'm having the same issue. Changing the irc server for this may not be allowed. Other options?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions