FAQ常见问题解答---搭建hubot

 一、node

[root@test160 ~]# npm install -g n npm 
ERR! Error: CERT_UNTRUSTED

证书不受信任的web

解决办法:redis

npm config set strict-ssl false

 

 二、shell

npm install -g hubot coffee-script yo generator-hubot

查看日志报错信息 npm

...
14980 silly addNameRange number 2 { name: 'sindresorhus/is',
14980 silly addNameRange   range: '>=0.7.0-0 <0.8.0-0',
14980 silly addNameRange   hasData: true }
14981 silly addNameRange versions [ undefined, [] ]
14982 error TypeError: Cannot read property 'latest' of undefined
14982 error     at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
14982 error     at /usr/lib/node_modules/npm/lib/cache.js:675:5
14982 error     at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
...

缘由:gcc版本过低,须要升级到4.9以上json

 

 三、服务器

Error: CERT_NOT_YET_VALID

缘由:服务器时间设置错误session

 

四、app

Your hubot-scripts.json is empty, so you just need to remove it. 
[Tue Apr 03 2018 18:18:50 GMT+0800 (CST)] ERROR hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web.url | cut -d= -f2)` 
[Tue Apr 03 2018 18:18:50 GMT+0800 (CST)] INFO hubot-redis-brain: Using default redis on localhost:6379

  

出现的错误信息是由于默认状况下,hubot使用redis作持久化存储,并支持heroku部署。tcp

咱们能够去掉redis和heroku配置,在./external-scripts.json文件中找到"hubot-heroku-keepalive"和"hubot-redis-brain"并删除便可。

 

五、

xiaojiang> xiaojiang shellcmd update 

xiaojiang> spawn!

缘由待查

 

六、 

ERROR Error: listen EADDRINUSE 0.0.0.0:8080  

上面提示 8080 端口被占用了    

[www@test160 handlers]$ netstat -ntlp|grep node
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8100                0.0.0.0:*                   LISTEN      8008/node           
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      11651/node

能够指定端口执行,好比换 8100 端口:

[www@test160 hubot]$ PORT=8100 ./bin/hubot

 

七、tmux里执行报错

sessions should be nested with care, unset $TMUX to force 

  

解决: 杀掉进程后执行unset TMUX,而后再执行tmux attach就能够了

相关文章
相关标签/搜索