Sitting on a Starbucks in a Saturday morning (after dropping the kids on PSSA) it felt like a good time to try HuBot (repo is here).
Since I already had NodeJS installed on my test VM, I stated with the Deploying Hubot onto Windows instructions:
Running the installer, downloads a bunch of missing modules:
Which worked but, but when I started Hubot for the first time I had this error
I turned out to be because HuBot defaults to port 8080
… which I already had a server running there.
So after stopping that service, HuBot started with no errors
Since this is the first time I’m running HuBot I don’t really know what to do :)
And the browser didn’t help too:
Weirdly the main HuBot website didn’t had a ‘start here’ article, so I started digging through the documentation and found:
... which implied that /hubot/version was a valid url, which it was :)
So we know the HuBot is alive :)
I googled a bit and found http://server.dzone.com/articles/installing-and-running-hubot which looked like a good place to start:
I skipped the installation bit (since we already have HuBot installed) and started here
...which indicates that we should use the ‘hubot’ prefix to talk with Hubot
Good, HuBot is also alive from there :)
Next step was to install OpenFire and Spark, which you can read how I did it here
It this stage I tried to run the ./bin/hubot script, but I was missing CoffeeScript
After installing coffee-script
… I was able to execute .bin/hubot ok:
… and execute the next instruction from Deploying Hubot onto Windows which is hubot –c ./my-bot
This created a folder called my-bot in the .bin folder (UPDATE: this should had been done of the folder above (i.e. not inside the .bin folder)
... containing what looks like the contents of a Git repo:
The next steps from Deploying Hubot onto Windows are to:
After making the config changes I executed npm install
... which failed because of this error:
... caused by the lack of python:
Here is the script I used to install python 3.3.2:
Here is the python shell being automatically picked up from the command line (which was not the default option in python install (you will need to manually check the box to add Python to system path)
But running npm install still fails because it doesn’t like the python 3.3.2
So I installed Python 2.7 with this script:
After the install I set the PYTHON environment variable to:
And now the npm install worked with just a couple warnings (note: I had to clear the node-gyp compilation cache before):
Trying to run HuBot (the custom my-bot one) gives this error:
.... which says that we need to install the node-stringprep module, which fails to install with this error:
The error above has nothing to do with node-stringprep , and related to the lack of this environment variable:
We’re getting close, now it starts the connection but we get an authentication failure
which I think is caused by the current environment HUBOT environment variables that I have setup
Lets change the authentication values to the credential used to connect to OpenFire directly using Jabber-net (see Using Jabber-net to talk to OpenFire post) :
And just to make sure, I added those values directly to the xmpp.coffee file
But the Authentication failure still happens:
Looking at the logs
in info.log
in jive.audit*.log (which looks like an xml)
So to see it I quickly wrote this script:
...which showed this formated view of the xml content:
... which unfortunately didn't help, because there were no any references to the o2-user account
Note: if I remove the preferredSaaslMechanism value, I get no errors or log messages:
STOPPING FOR NOW
At this stage I can’t spend more time on this, so I’m going to blog as it is and ask for help to the the HuBot community