StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.08k stars 747 forks source link

winrm or requests is not installed: No module named six #4822

Open sadanand25 opened 4 years ago

sadanand25 commented 4 years ago

SUMMARY

we have created stacktstorm rule for to start a process.

But we are facing below error while executing

FAILED! => {"msg": "winrm or requests is not installed: No module named six"}

root@*****:~# curl --noproxy -v -k -X POST https://127.0.0.1/api/v1/webhooks/hpom -H "St2-Api-Key:Yjk1NjEyMTZkMjVhZTYwZWI4ZWUwZDM4Yjc5MTFlNzU4M2ZjMmUwYjZiM2M1ZTQxMjhhZTVhNGQ5NWY4OWI4Mw" -H "Content-Type: application/json" --data '{"alert": "win_process_failed", "service":"Spooler", "hosts": "hostanme"}'

ISSUE TYPE

root@ubuntu16:~#

FAILED! => {"msg": "winrm or requests is not installed: No module named six"}

STACKSTORM VERSION

[root@** ~]# st2 --version

st2 3.0.1, on Python 2.7.5

OS / ENVIRONMENT / INSTALL METHOD

Red Hat Enterprise Linux Server release 7.6 (Maipo)

STEPS TO REPRODUCE

curl --noproxy -v -k -X POST https://127.0.0.1/api/v1/webhooks/hpom -H "St2-Api-Key:ODcyNGM3ZDdiZjg1YTUyYmRjNmIxY2UzZjQxZGI2NjNlNmNiNTc1ZTI0ZjFkNmYzYzc3NzdmYmYwZGU4NzcyOA" -H "Content-Type: application/json" --data '{"alert": "win_process_failed", "service":"Spooler", "hosts": "hostname"}'

EXPECTED RESULTS

stackstrom rule should execute without error.

ACTUAL RESULTS

[root@------ ~]# st2 execution get 5dd7c3aee8182dacec89db78 id: 5dd7c3aee8182dacec89db78 status: failed (2s elapsed) parameters: cmd: ansible-playbook /etc/ansible/pb-win-restart-service.yml -e 'service=Spooler hosts=hostname' result: failed: true return_code: 2 stderr: ' [WARNING]: Found variable using reserved name: hosts' stdout: " PLAY [-------] **

TASK [Restart a service] *** fatal: [----]: FAILED! => {"msg": "winrm or requests is not installed: No module named six"}

PLAY RECAP ***** ---------- : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 " succeeded: false [root@----- ~]#

blag commented 4 years ago

Does executing that action via the st2 command work?

How did you install this instance of StackStorm?

If you have the full traceback, can you post that (after removing any sensitive values)?

sadanand25 commented 4 years ago

hello team,

Thanks for giving reply.

Does executing that action via the st2 command work? I am unable to find command to run st2 CLI

How did you install this instance of StackStorm?

we follow ling for installation https://docs.stackstorm.com/install/rhel7.html

If you have the full traceback, can you post that (after removing any sensitive values)?

[root@ ~]# st2 execution get 5dd7c3aee8182dacec89db78 id: 5dd7c3aee8182dacec89db78 status: failed (2s elapsed) parameters: cmd: ansible-playbook /etc/ansible/pb-win-restart-service.yml -e 'service=Spooler hosts=.com' result: failed: true return_code: 2 stderr: ' [WARNING]: Found variable using reserved name: hosts' stdout: " PLAY [___] **

TASK [Restart a service] *** fatal: [_____]: FAILED! => {"msg": "winrm or requests is not installed: No module named six"}

PLAY RECAP ***** ____ : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 " succeeded: false

Please help to solve issue.

blag commented 4 years ago

It looks like the ST2 installation got messed up somehow. I would recommend using the quick install on a new and clean RHEL 7 VM, which will run through the installation steps for you. You can configure ST2 once it is installed.

Quick install instructions are here: https://docs.stackstorm.com/install/index.html#ref-one-line-install

stale[bot] commented 4 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.