Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployed on Heroku, app is running, no IRC connection #481

Closed
Sharaal opened this issue Oct 4, 2016 · 5 comments
Closed

Deployed on Heroku, app is running, no IRC connection #481

Sharaal opened this issue Oct 4, 2016 · 5 comments

Comments

@Sharaal
Copy link

Sharaal commented Oct 4, 2016

Hey,

I have a small chatbot using the "irc" package. I just initialize the irc client and add an error handler to it. The project also have a "Procfile" for Heroku with "bot: npm start".
Locally all works, but after deploy on Heroku the app is running, but the IRC connection seems not to work. There is no chatbot coming online and also no errors are emitted.

Someone already have experience with that and maybe I miss something?

Some ressources:

2016-10-04T11:48:53.094809+00:00 app[bot.1]: begin to start maxdome-irc

2016-10-04T11:48:53.096420+00:00 app[bot.1]: REDIS_URL: ...

2016-10-04T11:48:53.239506+00:00 app[bot.1]: IRC_HOST: irc.freenode.net

2016-10-04T11:48:53.239511+00:00 app[bot.1]: IRC_NICK: maxdome

2016-10-04T11:48:53.481301+00:00 app[bot.1]: end of starting maxdome-irc

2016-10-04T11:48:54.482561+00:00 app[bot.1]: ping

2016-10-04T11:48:55.484043+00:00 app[bot.1]: ping
@sh1omi
Copy link

sh1omi commented Oct 4, 2016

Add "debug: true, showErrors: true", it will show more info about the problem.

@Sharaal
Copy link
Author

Sharaal commented Oct 4, 2016

Thx, that output looks a bit better to find a solution:

2016-10-04T13:55:21.643299+00:00 app[bot.1]: 4 Oct 13:55:21 - Sending irc NICK/USER

2016-10-04T13:55:21.643454+00:00 app[bot.1]: 4 Oct 13:55:21 - SEND: NICK maxdome

2016-10-04T13:55:21.643716+00:00 app[bot.1]: 4 Oct 13:55:21 - SEND: USER nodebot 8 * :nodeJS IRC client

2016-10-04T13:55:30.451033+00:00 app[bot.1]: 4 Oct 13:55:30 - GOT NOTICE from the server: "*** Notice -- You need to identify via SASL to use this server"

2016-10-04T13:55:30.451537+00:00 app[bot.1]: 4 Oct 13:55:30 - �[01;31mUnhandled message: { command: 'ERROR',

2016-10-04T13:55:30.451539+00:00 app[bot.1]:   rawCommand: 'ERROR',

2016-10-04T13:55:30.451540+00:00 app[bot.1]:   commandType: 'normal',

2016-10-04T13:55:30.451541+00:00 app[bot.1]:   args: [ 'Closing Link: ec2-54-216-9-66.eu-west-1.compute.amazonaws.com (SASL access only)' ] }�[0m

2016-10-04T13:55:30.452175+00:00 app[bot.1]: 4 Oct 13:55:30 - Connection got "end" event

2016-10-04T13:55:30.452254+00:00 app[bot.1]: 4 Oct 13:55:30 - Connection got "close" event

2016-10-04T13:55:30.452330+00:00 app[bot.1]: 4 Oct 13:55:30 - Disconnected: reconnecting

2016-10-04T13:55:30.452369+00:00 app[bot.1]: 4 Oct 13:55:30 - Waiting 2000ms before retrying

@Sharaal
Copy link
Author

Sharaal commented Oct 4, 2016

I will try it with an own account for the bot and the sasl true option like descriped here:
http://stackoverflow.com/questions/18687947/how-to-join-password-protected-irc-server-using-nodejs-irc-module

@Sharaal
Copy link
Author

Sharaal commented Oct 4, 2016

But it seems I miss something, set SASL to true and set username/password to an existing freenode account:

2016-10-04T14:17:28.222465+00:00 app[bot.1]: 4 Oct 14:17:28 - SEND: CAP REQ sasl
...
2016-10-04T14:17:36.419150+00:00 app[bot.1]: 4 Oct 14:17:36 - �[01;31mUnhandled message: { prefix: 'card.freenode.net',

2016-10-04T14:17:36.419161+00:00 app[bot.1]:   server: 'card.freenode.net',

2016-10-04T14:17:36.419162+00:00 app[bot.1]:   command: '904',

2016-10-04T14:17:36.419163+00:00 app[bot.1]:   rawCommand: '904',

2016-10-04T14:17:36.419163+00:00 app[bot.1]:   commandType: 'normal',

2016-10-04T14:17:36.419164+00:00 app[bot.1]:   args: [ 'maxdome', 'SASL authentication failed' ] }�[0m

@Sharaal
Copy link
Author

Sharaal commented Oct 4, 2016

I found the issue.

In the stackoverflow answer is said the options are:
options: {sasl:true, username: "myBotName", password: "myBotPasswordHere"}
But the attribute "username" must be written as "userName". So this options are needed:
options: {sasl:true, userName: "myBotName", password: "myBotPasswordHere"}

Now my bot connects to freenode. Thx for the hint how to debug. :)

@Sharaal Sharaal closed this as completed Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants