This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

St2 apikey create - connection aborted

Running Ansible to install StackStorm on an AWS instance. Suddenly having trouble.
Original command:

ansible-playbook stackstorm.yml -i 'localhost,' --connection=local

which results in

TASK [StackStorm.st2chatops : Generate "st2_api_key" if not provided with the "role" or in "defaults/main.yml"] ***
fatal: [ec2-<ip>.***.compute.amazonaws.com]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": true}```

changed no_log: false and got a complain about not reaching port 9101 to create the key. Added 9101 to my security group and now still getting connection issues. Ports open to all, 80/443/9100-9103

fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["st2", "apikey", "create", "-k"], "delta": "0:00:04.156206", "end": "2021-07-01 21:21:20.928591", "msg": "non-zero return code", "rc": 2, "start": "2021-07-01 21:21:16.772385", "stderr": "", "stderr_lines": [], "stdout": "ERROR: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))", "stdout_lines": ["ERROR: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))"]}

even running by hand:

$ st2 apikey create -k
ERROR: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

What am I missing?

Got some help via slack. The ansible playbooks are not up to date to match the 3.5 release, but pulls the 3.5 release.

Check your /var/log/st2/st2api.log and if you see lots of
tooz.coordination.ToozConnectionError: Error 111 connecting to 127.0.0.1:6379. ECONNREFUSED. means its looking for redis, that doesnt exist.

They are working on updating the galaxy bits and 3.5 compatibilities. You can point galaxy to master to get the latest
ansible-galaxy install git+https://github.com/StackStorm/ansible-st2

if you use latest master then:

  • you can specify 3.4.1 version and install that
  • OR if you go for 3.5.0 then I think the only things you don’t get are:
  • a) it will still use node.js 10 instead of 14
  • b) it won’t have Focal support`

so it was suggested to use specific versions in the playbook:

So to use a specific version you need to set: st2_Version, st2web_version, and st2chatops_version

so your ansible command would be something like:

ansible-playbook stackstorm.yml --extra-vars='st_version=3.4.1-1 st2web_version=3.4.1-1 st2chatops_version=3.4.1-1'

if you are running ubuntu. if not ubuntu, you can drop the -1

Testing the pointing directly to master branch, but might end up doing the 3.4.1-1 option until the ansible bits are updated.

Thanks for updating the forum - that’s really useful for others in future.

little tweak to the actual commands I used:

ansible-galaxy install git+https://github.com/StackStorm/ansible-st2.git

and then cd into ansible-st2

ansible-playbook stackstorm.yml --extra-vars='st2_auth_username=st2admin st2_auth_password=CHANGEME st2_version=3.4.1-2 st2web_version=latest st2chatops_version=3.4.1-1' -i 'localhost,' --connection=local

using 3.4.1-1 for st2web_version caused the error:

fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'st2web_package_name' is undefined\n\nThe error appears to have been in '/home/ubuntu/ansible-st2/roles/StackStorm.st2web/tasks/main.yml': line 26, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Install pinned st2web package\n  ^ here\n"}```

I’ve recently used the latest released ansible playbooks to install 3.4.1. YOu also have to declare the variable st2web_package_name and set to value “st2web”. This got around the error above.

With the stackstorm ansible playbooks v3.1.0 it will be setup for st2 3.5.0, but can be used for 3.4.1 as long as you specify nodejs_major_version parameter to be 10 (so that nodejs 14 is not installed).