Good afternoon,
For the past couple weeks, I’ve been attemping to troubleshoot st2chatops/hubot connected to Mattermost not replying with the output after running a command except for help. I believe that this is caused by the bot not being connected to the event stream, but I am unsure how to fix this.
I have installed StackStorm by following the Centos 7 install guide in your documentation.
Running !help returns the help output as expected.
Running, for example, !pack get docker returns nothing at all. I can see, however, that in the
StackStorm history tab on the web ui, that both the packs.get action and the chatops.post_result action
resulted in a Succeeded status.
The following will contain my config files/log files. If you need any more of them, do let me know.
/opt/stackstorm/chatops/st2chatops.env
export ST2_HOSTNAME="127.0.0.1"
export NODE_TLS_REJECT_UNAUTHORIZED="${NODE_TLS_REJECT_UNAUTHORIZED:-0}"
export EXPRESS_PORT="${EXPRESS_PORT:-8081}"
export HUBOT_LOG_LEVEL="${HUBOT_LOG_LEVEL:-debug}"
export HUBOT_NAME="${HUBOT_NAME:-hubot}"
export HUBOT_ALIAS="${HUBOT_ALIAS:-!}"
export ST2_API_URL="https://${ST2_HOSTNAME}/api"
export ST2_AUTH_URL="https://${ST2_HOSTNAME}/auth"
export ST2_STREAM_URL="https://${ST2_HOSTNAME}/stream"
export ST2_API_KEY="API_KEY"
export ST2_AUTH_USERNAME="st2admin"
export ST2_AUTH_PASSWORD="PASSWORD"
export ST2_WEBUI_URL="https://STACKSTORM"
export HUBOT_ADAPTER=matteruser
export MATTERMOST_HOST=HOST
export MATTERMOST_GROUP=StackStorm
export MATTERMOST_USER=hubot
export MATTERMOST_PASSWORD="PASSWORD"
export MATTERMOST_WSS_PORT=443
export MATTERMOST_HTTP_PORT=443
export MATTERMOST_TLS_VERIFY=false
export MATTERMOST_USE_TLS=true
export MATTERMOST_LOG_LEVEL=debug
export MATTERMOST_REPLY=true
/etc/st2/st2.conf
[api]
host = 127.0.0.1
port = 9101
logging = /etc/st2/logging.api.gunicorn.conf
mask_secrets = True
debug = True
[stream]
logging = /etc/st2/logging.stream.gunicorn.conf
host = 127.0.0.1
port = 9102
debug = True
[sensorcontainer]
logging = /etc/st2/logging.sensorcontainer.conf
[rulesengine]
logging = /etc/st2/logging.rulesengine.conf
[actionrunner]
logging = /etc/st2/logging.actionrunner.conf
virtualenv_opts =
[resultstracker]
logging = /etc/st2/logging.resultstracker.conf
[notifier]
logging = /etc/st2/logging.notifier.conf
[exporter]
logging = /etc/st2/logging.exporter.conf
[garbagecollector]
logging = /etc/st2/logging.garbagecollector.conf
[timersengine]
logging = /etc/st2/logging.timersengine.conf
[auth]
host = 127.0.0.1
port = 9100
use_ssl = True
debug = False
enable = True
cert = /etc/ssl/st2/st2.crt
key = /etc/ssl/st2/st2.key
logging = /etc/st2/logging.auth.gunicorn.conf
debug = True
mode = standalone
backend = flat_file
backend_kwargs = {"file_path": "/etc/st2/htpasswd"}
api_url = http://127.0.0.1:9101/
[system]
base_path = /opt/stackstorm
[webui]
webui_base_url = https://STACKSTORM
[syslog]
host = 127.0.0.1
port = 514
facility = local7
protocol = udp
[log]
excludes = requests,paramiko
redirect_stderr = False
mask_secrets = True
[system_user]
user = stanley
ssh_key_file = /home/stanley/.ssh/stanley_rsa
[messaging]
url = amqp://guest:[email protected]:5672/
[ssh_runner]
remote_dir = /tmp
[workflow_engine]
logging = /etc/st2/logging.workflowengine.conf
[scheduler]
logging = /etc/st2/logging.scheduler.conf
[keyvalue]
encryption_key_path = /etc/st2/keys/datastore_key.json
/etc/nginx/conf.d/st2.conf
output of journalctl after systemctl restart st2chatops
-- Logs begin at Mon 2019-06-24 05:40:30 UTC, end at Tue 2019-06-25 16:04:25 UTC. --
Jun 25 15:54:55 SERVER systemd[1]: Started StackStorm service st2chatops.
-- Subject: Unit st2chatops.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit st2chatops.service has finished starting up.
--
-- The start-up result is done.
Jun 25 15:54:55 SERVER hubot[40886]: Tue, 25 Jun 2019 15:54:55 GMT body-parser deprecated undefined extended: provide extended option at node_modules/hubot/src/robot.js:445:21
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Loading adapter matteruser
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Logging in...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG POST /users/login
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users/login
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Websocket URL: wss://MATTERMOST:443/api/v4/websocket
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Logged in as user "hubot" but not connected yet.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users/me
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users/me
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users/me
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users/me/preferences
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users/me/preferences
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users/me/preferences
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users/me/teams
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users/me/teams
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users/me/teams
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loaded Me...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Found 1 teams.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Testing stackstorm == StackStorm
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Found team! bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users?page=0&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users?page=0&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users?page=0&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users/me/teams/bkt3m3ah3bdb7p4asyoporaafe/channels
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users/me/teams/bkt3m3ah3bdb7p4asyoporaafe/channels
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users/me/teams/bkt3m3ah3bdb7p4asyoporaafe/channels
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Connecting...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loaded Preferences...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Found 5 subscribed channels.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Found 2 profiles.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Adding user 1dwugfdxui8sjfrz7q5a15snah
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Adding user c1tjrej1pibk9xgxnajo3br8rw
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading /users?page=1&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG GET /users?page=1&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO api url:https://MATTERMOST:443/api/v4/users?page=1&per_page=200&in_team=bkt3m3ah3bdb7p4asyoporaafe
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Found 0 profiles.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Connected to Mattermost.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/stackstorm/chatops/scripts
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Loading scripts from /opt/stackstorm/chatops/src/scripts
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Sending challenge...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Starting pinger...
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Mattermost server: 5.9.0.5.9.1.9f13f073fc130ee6975f57c436fabfee.false
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Received unhandled message:
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG { status: 'OK', seq_reply: 1 }
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Using ST2_API_KEY as authentication. Expiry will lead to bot exit.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Using matteruser post data handler.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-stackstorm/scripts/stackstorm.js
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO Loading commands....
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-help/src/help.coffee
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack get <pack> - Get information about installed StackStorm pack.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack get {{ pack }} - Get information about installed StackStorm pack.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack install <pack_name|git_url>[,<pack_name|git_url>] - Install/upgrade StackStorm packs.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack install {{ packs }} - Install/upgrade StackStorm packs.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack search <query> - Search for packs in StackStorm Exchange and other directories.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack search {{ query }} - Search for packs in StackStorm Exchange and other directories.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack show <pack> - Show information about the pack from StackStorm Exchange.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] DEBUG Added command: pack show {{ pack }} - Show information about the pack from StackStorm Exchange.
Jun 25 15:54:55 SERVER hubot[40886]: [Tue Jun 25 2019 15:54:55 GMT+0000 (UTC)] INFO 4 commands are loaded