nandub / hubot-irc

IRC adapter for Hubot
MIT License
299 stars 128 forks source link

Will not run on Heroku or OpenShift #119

Closed CodisRedding closed 7 years ago

CodisRedding commented 10 years ago

I can hubot from my machine, but no luck when I deploy it to Heroku or OpenShift. my profile is:

web: bin/hubot -a irc -n mybotsname

When I ssh into heroku/openshift and manually run hubot the console output only shows that it's successfully connected to Redis and nothing more. My local hubot will connect to Redis and then connect to IRC. I've checked the env vars and they are correct on all platforms.

Any ideas>

jgable commented 10 years ago

How did you set it up?

The fact that it works locally but not on the server makes me think it's an environment issue.

CodisRedding commented 10 years ago
  1. created heroku app
  2. added redis
  3. pushed hubot to heroku
  4. set heroku to a web process (tried as an app process too)
  5. ran heroku logs --tail to see that everything was fine during deployment.
  6. setup all environment variables via script (I have the same on my machine)
  7. restarted heroku process with heroku restart
  8. checked IRC for bot's nick. (never joined network/chan)
  9. ran heroku run bash and manually ran bin/hubot -a irc -n mybotname (i set the debug env var too)
  10. logs only show that redis was successfully connected and nothing else happens.

I ran these same steps on my local box and openshift. local works like a pal, others not so much. I cannot seem to find any log that shows that something is wrong. I can run this exact code as a hipchat bot without any problems.

jgable commented 10 years ago

I mean how did you setup the bot initially, did you do something like

  1. npm install hubot -g
  2. mkdir mybotname && cd mybotname
  3. hubot --create
  4. npm install hubot-irc --save

Or did you clone a repo somewhere? What instructions did you follow to setup the bot initially?

CodisRedding commented 10 years ago

Ahh sorry. Yeah I followed the readme instructions at https://github.com/nandub/hubot-irc#installation-and-setup.

CodisRedding commented 10 years ago

These are my env vars on heroku

BREWERYDB_API_KEY:           xxxxxxxxxxxxx
HEROKU_URL:                  http://xxxxxxxxxxxxx.herokuapp.com
HUBOT_AUTH_ADMIN:            xxxxxxxxxxxxx
HUBOT_FORECAST_API_KEY:      xxxxxxxxxxxxx
HUBOT_HIPCHAT_JID:           xxxxxxxxxxxxx@chat.hipchat.com
HUBOT_HIPCHAT_PASSWORD:      xxxxxxxxxxxxx
HUBOT_IRC_NICK:              xxxxxxxxxxxxx
HUBOT_IRC_NICKSERV_PASSWORD: xxxxxxxxxxxxx
HUBOT_IRC_PORT:              6697
HUBOT_IRC_PRIVATE:           true
HUBOT_IRC_ROOMS:             #xxxxxxxxxxxxx xxxxxxxxxxxxx
HUBOT_IRC_SERVER:            irc.freenode.net
HUBOT_IRC_UNFLOOD:           true
HUBOT_LOG_LEVEL:             debug
HUBOT_WUNDERGROUND_API_KEY:  xxxxxxxxxxxxx
PATH:                        bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin
REDISTOGO_URL:               redis://xxxxxxxxxxxxx@tarpon.redistogo.com:9147/
jgable commented 10 years ago

Everything seems right, not sure what could be the issue. I don't have a lot of experience with deploying to Heroku.

CodisRedding commented 10 years ago

Thanks for taking the time to look.

chrisdotcode commented 7 years ago

@CodisRedding, #160 seems to imply that freenode requires SASL auth when connecting from Heroku IPs.

Try that and see if it works, if your problem was not already solved.