Amazebot / bbot-rocketchat-boilerplate

bRocket is a bBot boilerplate for building Rocket.Chat bots
MIT License
13 stars 8 forks source link

Asteroid Connect Timeout #3

Closed conman2305 closed 5 years ago

conman2305 commented 5 years ago

Hey guys! Thanks for the awesome adapter! Unfortunately, I'm getting stuck rather early in the development process. It seems invoking npm start causes a timeout trying to connect to my RocketChat server.

For background, I cloned the repo into a node:10.15.0-stretch container, and configured .env as follows:

BOT_LOG_LEVEL=debug
BOT_NAME=testbot
BOT_SHELL_USER_NAME=user
BOT_SHELL_ROOM_NAME=shell
ROCKETCHAT_URL=http://127.0.0.1:3000
ROCKETCHAT_USER=testbot
ROCKETCHAT_PASSWORD='xxxxxxxx'
ROCKETCHAT_AUTH=password
RESPOND_TO_DM=true
RESPOND_TO_EDITED=true
LISTEN_ON_ALL_PUBLIC=false

The container is running on the same host as the RocketChat container, and I verified connectivity by running wget 127.0.0.1. As expected, I get an index.html with the usual login screen.

When I start the bot, I get the following error:

root@1f2596fc038f:/home/buildbot/buildbot# npm start

> buildbot@1.0.0 start /home/buildbot/buildbot
> node index.js

info:   [core] testbot loading  . . . . . ~(0_0)~
debug:  [adapter] loading adapter by name: rocketchat
debug:  [adapter] failed to load module, will try from path
debug:  [adapter] loading adapter by path: ./adapters/rocketchat
info:   [core] testbot starting . . . . . ┌(O_O)┘ bzzzt whirr
info:   [server] listening, see public stats: http://127.0.0.1:3000/public
debug:  [adapter] starting message adapter: rocketchat-message-adapter
info:   [rocketchat] responds to name: testbot
info:   [connect] Connecting
info:   [server] served GET /websocket - 1ms
info:   [server] served GET /websocket - 0ms
info:   [server] served GET /websocket - 0ms
info:   [server] served GET /websocket - 0ms
info:   [server] served GET /websocket - 0ms
info:   [server] served GET /websocket - 1ms
info:   [server] served GET /websocket - 0ms
info:   [server] served GET /websocket - 0ms
info:   [connect] Timeout (20000)
error:  [adapter] startup failed: Asteroid connection timeout
error:  [core] failed to start

Let me know if there's anything else I can add to help debug.

Thanks!

EDIT: Might be something dumb on my end. Checking now.

conman2305 commented 5 years ago

Confirming. Silly issue on my end - the container was running on a different host than I thought. Thanks guys.