SMA ChatOps Forum
cancel

SM in SMA suite to be integrated with SM Chatops 2.0

Highlighted
Micro Focus Contributor
Micro Focus Contributor

SM in SMA suite to be integrated with SM Chatops 2.0

Hi all,

After the set-up I see that SM-Chatops-bot.service keeps failing within few seconds post starting it.

I see the below error in the log:

May 02 06:14:33 sm-bot.modom.net run.sh[1502]: 2018-05-02T10:14:33.405Z - error: Unable to load /opt/microfocus/SM-Chatops-bot/scripts/install-slackapp: Error: EACCES: permission denied, mkdir '/data'
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Error (native)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Object.fs.mkdirSync (fs.js:932:18)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Function.sync (/opt/microfocus/SM-Chatops-bot/node_modules/mkdirp/index.js:71:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at new Store (/opt/microfocus/SM-Chatops-bot/node_modules/jfs/lib/Store.js:307:16)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Object.<anonymous> (/opt/microfocus/SM-Chatops-bot/scripts/install-slackapp.coffee:6:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Object.<anonymous> (/opt/microfocus/SM-Chatops-bot/scripts/install-slackapp.coffee:1:1)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Module._compile (module.js:577:32)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Object.loadFile (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at tryModuleLoad (module.js:453:12)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Function.Module._load (module.js:445:3)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Module.require (module.js:504:17)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at require (internal/module.js:20:19)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at EnterpriseRobot.Robot.loadFile (/opt/microfocus/SM-Chatops-bot/node_modules/hubot/src/robot.coffee:355:18)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at EnterpriseRobot.Robot.load (/opt/microfocus/SM-Chatops-bot/node_modules/hubot/src/robot.coffee:377:10)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at UnifiedMattermostAdapterImpl.<anonymous> (/opt/microfocus/SM-Chatops-bot/hubot.coffee:173:11)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at UnifiedMattermostAdapterImpl.g (events.js:292:16)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at emitNone (events.js:86:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at UnifiedMattermostAdapterImpl.emit (events.js:185:7)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Matteruser.<anonymous> (/opt/microfocus/SM-Chatops-bot/lib/adapters/mattermost/unified_mattermost.coffee:83:11)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Matteruser.g (events.js:292:16)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at emitNone (events.js:86:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Matteruser.emit (events.js:185:7)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Matteruser.onConnected (/opt/microfocus/SM-Chatops-bot/node_modules/hubot-matteruser/src/matteruser.coffee:64:10)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Client.<anonymous> (/opt/microfocus/SM-Chatops-bot/node_modules/hubot-matteruser/src/matteruser.coffee:1:1)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at emitNone (events.js:86:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at Client.emit (events.js:185:7)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at WebSocket.<anonymous> (/opt/microfocus/SM-Chatops-bot/node_modules/mattermost-client/src/client.coffee:184:14)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at emitNone (events.js:86:13)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at WebSocket.emit (events.js:185:7)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at WebSocket.establishConnection (/opt/microfocus/SM-Chatops-bot/node_modules/ws/lib/WebSocket.js:887:8)
May 02 06:14:33 sm-bot.modom.net run.sh[1502]: at ClientRequest.upgrade (/opt/microfocus/SM-Chatops-bot/node_modules/ws/lib/WebSocket.js:778:25)

4 REPLIES
Micro Focus Contributor
Micro Focus Contributor

Re: SM in SMA suite to be integrated with SM Chatops 2.0

Hi,

For this error,  you should check the following points.

1) access https://api.slack.com/slack-apps to check app configure information.

2) check you SM Chatops configure file: /etc/opt/SM-Chatops-bot/slack.env

Detail information please refer to ChatOps_admin_user_guide.pdf document.
.

Micro Focus Contributor
Micro Focus Contributor

Re: SM in SMA suite to be integrated with SM Chatops 2.0

The collaboratoin tool I am using is Mattermost.

I have followed the instructions as in the guide.

Micro Focus Contributor
Micro Focus Contributor

Re: SM in SMA suite to be integrated with SM Chatops 2.0

In addition,  permission denied error will be appeared if you used root to start bot,  please check it. 

The right way to start bot:  Used chatopsbot user to operator the command:  nohup ./start.sh &

 

Micro Focus Contributor
Micro Focus Contributor

Re: SM in SMA suite to be integrated with SM Chatops 2.0

Thanks Zhoug. That solved the issue