我已经在stackstorm中成功创建了一个Webhook,它在Webhook列表中可见。
[centos@ip- ~]$ sudo st2 webhook list
+------------+------------------+-------------+
| url | type | description |
+------------+------------------+-------------+
| wfcreation | core.st2.webhook | |
+------------+------------------+-------------+
[centos@ip- ~]$
我触发了webhook,以提供有效负载并使用stackstorm api密钥设置适当的标头。该Webhook会被触发并返回状态码200。但是,基本的Stackstorm工作流程无法给出以下错误。
{
"traceback": " File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2actions/container/base.py\", line 119, in _do_run
(status, result, context) = runner.run(action_params)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 206, in call
return attempt.get(self._wrap_exception)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/retrying.py\", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File \"/opt/stackstorm/runners/mistral_v2/mistral_v2/mistral_v2.py\", line 247, in run
result = self.start_workflow(action_parameters=action_parameters)
File \"/opt/stackstorm/runners/mistral_v2/mistral_v2/mistral_v2.py\", line 284, in start_workflow
**options)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/v2/executions.py\", line 65, in create
return self._create('/executions', data)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/base.py\", line 100, in _create
self._raise_api_exception(resp)
File \"/opt/stackstorm/st2/lib/python2.7/site-packages/mistralclient/api/base.py\", line 160, in _raise_api_exception
error_message=error_data)
",
"error": "AccessRefused: 403"
}
stakstorm官方文档没有任何故障排除此错误的参考。
任何帮助都将不胜感激,因为我现在被封锁。
答案 0 :(得分:0)
最后,我能够确定问题出在stackstorm主机上运行的mistral-server服务。
问题是由于stackstorm安装过程中的配置错误,导致mistral-server服务无法连接到rabbitmq服务。但是误导性错误消息“ AccessRefused:403”没有指出与rabbitmq连接问题有关。
这就是我在日志中找到的内容。
错误日志(/ var / log / mistral /)中的错误消息:
2018-06-25 15:30:19.309 10767 ERROR oslo_service.service AccessRefused: (0,0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
在挖出Rabbitmq日志(/ var / log / rabbitmq /):
=ERROR REPORT==== 25-Jun-2018::16:34:23 ===
closing AMQP connection <0.5118.0> (127.0.0.1:41248 -> 127.0.0.1:5672):
{handshake_error,starting,0,
{amqp_error,access_refused,
"AMQPLAIN login refused: user 'st2' - invalid credentials",
'connection.start_ok'}}
很明显,在安装过程中错误地配置了st2用户凭据,这导致了整个问题。
希望这对将来有帮助的人。
答案 1 :(得分:0)
可能导致此问题的另一件事是未配置NGinx,在这种情况下,系统希望您使用本地端口。这是一个可能对您有帮助的示例:https://github.com/StackStorm/st2/tree/master/conf/st2.conf.sample和nginx config。