kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 407 forks source link

Hubot only stays online for 1 minute... #345

Open alexhulbert opened 10 years ago

alexhulbert commented 10 years ago

I have to run heroku restart on hubot-kandan-app. I don't even think any commands are working.

scouttyg commented 10 years ago

We just pulled in a few changes to the hubot-kandan-app that might fix what you are talking about. Try pulling down the latest version, and read the updated readme (there is a new Heroku readme that @jangosteve has added)

alexhulbert commented 10 years ago

Now Hubot stays online, but none of the default commands work.

JangoSteve commented 10 years ago

That's probably due to this change needed in the Kandan app itself.

scouttyg commented 10 years ago

This was pulled in a few days ago, @Triforce1 are you still having issues?

alexhulbert commented 10 years ago

What extra do I have to do?

scouttyg commented 10 years ago

You need to pull in the latest changes from this branch, and then push up to heroku again if you are on it.

alexhulbert commented 10 years ago

I did that :/

alexhulbert commented 10 years ago

In the Hubot thing, I set host to *.herokuapp.com and the other thing to my token.

alexhulbert commented 10 years ago

But it still doesn't work...

scouttyg commented 10 years ago

Dammit I didn't mean to close this.

alexhulbert commented 10 years ago

I always close stuff by accident on GitHub

scouttyg commented 10 years ago

Did you follow the guide here (make sure you aren't missing any steps -- we've added a few heroku steps to it):

https://github.com/kandanapp/hubot-kandan-app

If so, did you follow the more detailed guide here:

https://github.com/github/hubot/blob/master/docs/deploying/heroku.md

It's hard to know where people get tripped up -- with the infinite amount of configurable systems out there and a large amount of steps to actually implement hubot/kandan on a system, it could be anything. We need to know what you have tried, what you haven't tried, etc.

alexhulbert commented 10 years ago

What's the difference beetween HUBOT_KANDAN_HOST and HEROKU_URL? I'm assuming the latter is just prefixed with "http://"?

scouttyg commented 10 years ago

Good question!

heroku config:set HEROKU_URL=http://rosemary-britches-123.herokuapp.com

This refers to the same url that you are hosting Hubot on. So if you launched Hubot on rhttp://rosemary-britches-123.herokuapp.com, you'd also set the config variable HEROKU_URL to be the same url. Why? So that way Hubot will ping itself and not shut itself down (which Heroku will do on the free tier).

HUBOT_KANDAN_HOST

Refers to I believe the port, so if you are running on SSL you'd say:

HUBOT_KANDAN_HOST=443
HUBOT_KANDAN_PROTOCOL=https

(Set these on the hubot-kandan-bot heroku instance).

Finally, you may have missed how to setup a bot initially on Kandan. To do so go back to your kandan repo and run

heroku run rake kandan:boot_hubot

After that is successful, run,

heroku run rake kandan:hubot_access_key

That should give you the HUBOT_KANDAN_TOKEN that I believe you set on hubot-kandan-app, ie,

heroku config:set HUBOT_KANDAN_TOKEN= (whatever the access key was)

I think this might put you on the right track, but to be honest I haven't set up Kandan yet with Hubot so I may be missing a step. Try that out though and let me know if that works.

scouttyg commented 10 years ago

Also, if the above doens't work, try these configs for heroku variables

HEROKU_URL:                  http://(where you are hosting hubot).herokuapp.com
HUBOT_KANDAN_CHANNELS:       1
HUBOT_KANDAN_HOST:           (where you are hosting kandan without the http in front).herokuapp.com
HUBOT_KANDAN_PORT:           443 (if ssl, otherwise I don't think you need this one)
HUBOT_KANDAN_PROTOCOL:       https (again, if ssl)
HUBOT_KANDAN_TOKEN:          (token that you got from the process I described above)