Skip to content

Docker st2chatops will not start rocketchat adapter #167

Open
@MrDiba

Description

@MrDiba

When I try to use the st2chatops docker container configured for using Rocket Chat the container will give an error that it can't find ddp.js and exits.

st2chatops log:

st2api is ready, starting hubot...
Testing hubot configuration...
Mon, 19 Jul 2021 11:56:11 GMT body-parser deprecated undefined extended: provide extended option at node_modules/hubot/src/robot.js:445:21
[Mon Jul 19 2021 13:56:11 GMT+0200 (Central European Summer Time)] DEBUG Loading adapter rocketchat
[Mon Jul 19 2021 13:56:11 GMT+0200 (Central European Summer Time)] ERROR Cannot load adapter rocketchat - Error: Cannot find module 'ddp.js'
Require stack:
- /opt/stackstorm/chatops/node_modules/@rocket.chat/sdk/node_modules/asteroid/dist/asteroid.node.js
- /opt/stackstorm/chatops/node_modules/@rocket.chat/sdk/dist/lib/driver.js
- /opt/stackstorm/chatops/node_modules/@rocket.chat/sdk/dist/index.js
- /opt/stackstorm/chatops/node_modules/hubot-rocketchat/index.js
- /opt/stackstorm/chatops/node_modules/hubot/src/robot.js
- /opt/stackstorm/chatops/node_modules/hubot/es2015.js
- /opt/stackstorm/chatops/node_modules/hubot/index.js
- /opt/stackstorm/chatops/node_modules/hubot/bin/hubot.js
- /opt/stackstorm/chatops/node_modules/hubot/bin/hubot
WARNING: hubot --config-check failed, are your adapter variables configured properly?

.env configuration:

T2_VERSION=3
ST2_CHATOPS_ENABLE=1
ST2_API_KEY=<generated api key>
TZ=Europe/Amsterdam
######################################################################
# Chat service adapter settings

# RocketChat settings (https://github.com/RocketChat/hubot-rocketchat):
#
HUBOT_ADAPTER=rocketchat
ROCKETCHAT_URL=<rocketchat url>
ROCKETCHAT_USER=<bot name>
ROCKETCHAT_PASSWORD=<bot password>
ROCKETCHAT_ROOM=<default room>

docker-compose.yml from https://github.com/stackstorm/st2-docker

...
  st2chatops:
    image: ${ST2_IMAGE_REPO:-stackstorm/}st2chatops:${ST2_VERSION:-latest}
    restart: on-failure:5
    depends_on:
      - st2api
      - st2auth
      - st2stream
    command: /st2chatops-startup.sh
    networks:
      - private
    environment:
      ST2_AUTH_URL: ${ST2_AUTH_URL:-http://st2auth:9100/}
      ST2_API_URL: ${ST2_API_URL:-http://st2api:9101/}
      ST2_STREAM_URL: ${ST2_STREAM_URL:-http://st2stream:9102/}
      ST2_API_KEY: ${ST2_API_KEY:-change-to-your-st2-api-key}
      TZ: ${TZ:-UTC}
      # enable chatops by setting this variable to any non-zero value
      # and enable/set your hubot adapter specific variables below
      ST2_CHATOPS_ENABLE: ${ST2_CHATOPS_ENABLE:-0}
      # Custom hubot adapter ENV variables to pass through which will override st2chatops.env defaults.
      # See https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env
      # for the full list of supported adapters and example ENV variables.
      HUBOT_ADAPTER: ${HUBOT_ADAPTER:-slack}
      HUBOT_LOG_LEVEL: ${HUBOT_LOG_LEVEL:-debug}
      HUBOT_SLACK_TOKEN: ${HUBOT_SLACK_TOKEN:-}
    volumes:
      - ./scripts/st2chatops-startup.sh:/st2chatops-startup.sh
    dns_search: .
...

How can I solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions