Skip to content

chatops connect to Slack always fail - st2 3.2.0 #151

@dove-young

Description

@dove-young

Using hubot token

 HUBOT_SLACK_TOKEN=xoxb-my-hubot-token \
> HUBOT_ADAPTER=slack \
> HUBOT_LOG_LEVEL=debug \
> HUBOT_SLACK_RTM_CLIENT_OPTS='{ "logLevel": "debug" }' \
> HUBOT_SLACK_RTM_CLIENT_OPTS='{ "retryConfig": { "retries": 20 } }' \
> HUBOT_SLACK_RTM_START_OPTS='{ "mpim_aware": true }' \
>  ./bin/hubot --adapter slack
body-parser deprecated undefined extended: provide extended option node_modules/hubot/src/robot.js:445:21
[Wed Jun 17 2020 22:25:02 GMT-0700 (Pacific Daylight Time)] DEBUG Loading adapter slack
[Wed Jun 17 2020 22:25:03 GMT-0700 (Pacific Daylight Time)] INFO hubot-slack adapter v4.5.5
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
[Wed Jun 17 2020 22:25:03 GMT-0700 (Pacific Daylight Time)] DEBUG RtmClient initialized with options: {"retryConfig":{"retries":20},"maxRequestConcurrency":1}
[Wed Jun 17 2020 22:25:03 GMT-0700 (Pacific Daylight Time)] DEBUG RtmClient#start() with options: {"mpim_aware":true}
[Wed Jun 17 2020 22:25:04 GMT-0700 (Pacific Daylight Time)] DEBUG SlackBot#authenticated() Found self in RTM start data
[Wed Jun 17 2020 22:25:04 GMT-0700 (Pacific Daylight Time)] INFO Logged in as @hubot in workspace hubot-test-20
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] INFO Connected to Slack RTM
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Loading scripts from /opt/stackstorm/chatops/scripts
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Loading scripts from /opt/stackstorm/chatops/src/scripts
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Loading external-scripts from npm packages
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Using slack adapter
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] INFO Requesting a token...
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-stackstorm/src/stackstorm.js
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-help/src/help.coffee
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] ERROR Failed to authenticate: Invalid or missing credentials
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] ERROR undefined
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] ERROR {"name":"APIError","status":401,"message":"Invalid or missing credentials"}
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] INFO Hubot will shut down ...
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] INFO Disconnected from Slack RTM
[Wed Jun 17 2020 22:25:05 GMT-0700 (Pacific Daylight Time)] INFO Exiting...

Using a bot user token

 HUBOT_SLACK_TOKEN=xoxb-my-bot-token \
> HUBOT_ADAPTER=slack \
> HUBOT_LOG_LEVEL=debug \
> HUBOT_SLACK_RTM_CLIENT_OPTS='{ "logLevel": "debug" }' \
> HUBOT_SLACK_RTM_CLIENT_OPTS='{ "retryConfig": { "retries": 20 } }' \
> HUBOT_SLACK_RTM_START_OPTS='{ "mpim_aware": true }' \
>  ./bin/hubot --adapter slack
body-parser deprecated undefined extended: provide extended option node_modules/hubot/src/robot.js:445:21
[Wed Jun 17 2020 22:19:27 GMT-0700 (Pacific Daylight Time)] DEBUG Loading adapter slack
[Wed Jun 17 2020 22:19:28 GMT-0700 (Pacific Daylight Time)] INFO hubot-slack adapter v4.5.5
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
[Wed Jun 17 2020 22:19:28 GMT-0700 (Pacific Daylight Time)] DEBUG RtmClient initialized with options: {"retryConfig":{"retries":20},"maxRequestConcurrency":1}
[Wed Jun 17 2020 22:19:28 GMT-0700 (Pacific Daylight Time)] DEBUG RtmClient#start() with options: {"mpim_aware":true}
[Wed Jun 17 2020 22:19:29 GMT-0700 (Pacific Daylight Time)] DEBUG SlackBot#authenticated() Found self in RTM start data
[Wed Jun 17 2020 22:19:29 GMT-0700 (Pacific Daylight Time)] INFO Logged in as @ansible-bot in workspace hubot-test-20
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] INFO Connected to Slack RTM
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Loading scripts from /opt/stackstorm/chatops/scripts
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Loading scripts from /opt/stackstorm/chatops/src/scripts
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Loading external-scripts from npm packages
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Using slack adapter
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] INFO Requesting a token...
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-stackstorm/src/stackstorm.js
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] DEBUG Parsing help for /opt/stackstorm/chatops/node_modules/hubot-help/src/help.coffee
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] ERROR Failed to authenticate: Invalid or missing credentials
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] ERROR undefined
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] ERROR {"name":"APIError","status":401,"message":"Invalid or missing credentials"}
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] INFO Hubot will shut down ...
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] INFO Disconnected from Slack RTM
[Wed Jun 17 2020 22:19:30 GMT-0700 (Pacific Daylight Time)] INFO Exiting...

And the hubot token I used here is still working

Here is the env version

[root@ chatops]# st2 --version
st2 3.2.0, on Python 2.7.5
[root@ chatops]#
[root@ chatops]# bin/hubot -v
Must provide HUBOT_ADAPTER ENV variable to start.
See README.md for more information
[root@ chatops]# HUBOT_ADAPTER=slack bin/hubot -v
body-parser deprecated undefined extended: provide extended option node_modules/hubot/src/robot.js:445:21
[Wed Jun 17 2020 22:54:16 GMT-0700 (Pacific Daylight Time)] DEBUG Loading adapter slack
[Wed Jun 17 2020 22:54:17 GMT-0700 (Pacific Daylight Time)] INFO hubot-slack adapter v4.5.5
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.
[Wed Jun 17 2020 22:54:17 GMT-0700 (Pacific Daylight Time)] DEBUG RtmClient initialized with options: undefined
3.1.1
[root@ chatops]#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions