St2-docker ERROR: ('Connection aborted.', error(104, 'Connection reset by peer'))

(eazysnatch) #1

Describe the problem

root@df160368fa19:/# st2 action list
ERROR: (‘Connection aborted.’, error(104, ‘Connection reset by peer’))

Versions

Host OS: [MacOSX 10.14.4 (18E226) ]
docker: [Docker version 18.09.2, build 6247962]
docker-compose: [docker-compose version 1.23.2, build 1110ad01]
stackstorm/stackstorm image: [stackstorm/stackstorm:latest and I tried with :dev]
To Reproduce

git clone git@github.com:stackstorm/st2-docker
cd st2-docker
make env
docker-compose up -d
docker-compose exec stackstorm bash
root@df160368fa19:/# st2 action list
ERROR: (‘Connection aborted.’, error(104, ‘Connection reset by peer’))
I tried with different image versions without a luck ( latest and dev).
Solution below work for some users but not for me.

~/Desktop/st2-docker(master*) » cat conf/rabbitmq.env
RABBITMQ_DEFAULT_USER=guest
RABBITMQ_DEFAULT_PASS=guest
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672

I found that there is /usr/bin/st2-register-content --config-file /etc/st2/st2.conf --register-all process which spawn every 2-3 sec. it seems its looping and that could be the cause of the issue.

root@52b467771560:/# ps aux | grep regi
root 35462 0.0 0.1 18116 3000 ? S 12:36 0:00 /bin/bash /usr/bin/st2ctl reload --register-all
root 35467 80.5 3.7 328320 75728 ? S 12:36 0:07 /opt/stackstorm/st2/bin/python /usr/bin/st2-register-content --config-file /etc/st2/st2.conf --register-all
root 35533 0.0 0.1 10476 2128 pts/1 S+ 12:37 0:00 grep --color=auto regi
root@52b467771560:/# ps aux | grep regi
root 35626 0.0 0.1 10476 2128 pts/1 S+ 12:37 0:00 grep --color=auto regi
root@52b467771560:/# ps aux | grep regi
root 35628 0.0 0.1 10476 2128 pts/1 S+ 12:37 0:00 grep --color=auto regi
root@52b467771560:/# ps aux | grep regi
root 35634 0.0 0.1 10476 2128 pts/1 S+ 12:37 0:00 grep --color=auto regi
root@52b467771560:/# ps aux | grep regi
root@52b467771560:/# ps aux | grep regi
root 35653 0.0 0.1 18116 2948 ? S 12:37 0:00 /bin/bash /usr/bin/st2ctl reload --register-all
root 35658 69.0 2.6 138976 53660 ? S 12:37 0:00 /opt/stackstorm/st2/bin/python /usr/bin/st2-register-content --config-file /etc/st2/st2.conf --register-all
root 35667 0.0 2.2 137948 45668 ? R 12:37 0:00 /opt/stackstorm/st2/bin/python /usr/bin/st2-register-content --config-file /etc/st2/st2.conf --register-all
root 35669 0.0 0.1 10476 2120 pts/1 S+ 12:37 0:00 grep --color=auto regi

It seems affect just OSX I tried with CentOS and its working fine:

root@dd498610bb42:/# st2 pack list
±---------±---------±---------------------------------------±--------±-----------------+
| ref | name | description | version | author |
±---------±---------±---------------------------------------±--------±-----------------+
| chatops | chatops | ChatOps integration pack | 3.0.0 | StackStorm, Inc. |
| core | core | Basic core actions. | 3.0.0 | StackStorm, Inc. |
| default | default | Default pack where all resources | 3.0.0 | StackStorm, Inc. |
| | | created using the API with no pack | | |
| | | specified get saved. | | |
| examples | examples | Example sensors, triggers, actions and | 3.0.0 | StackStorm, Inc. |
| | | rules. | | |
| linux | linux | Generic Linux actions | 3.0.0 | StackStorm, Inc. |
| packs | packs | Pack management functionality. | 3.0.0 | StackStorm, Inc. |
±---------±---------±---------------------------------------±--------±-----------------+
root@dd498610bb42:/# exit
^LYou have new mail in /var/spool/mail/root
[root@RHCSA-server01 st2-docker]#
[root@RHCSA-server01 st2-docker]# docker version
Client:
Version: 18.09.5
API version: 1.39
Go version: go1.10.8
Git commit: e8ff056
Built: Thu Apr 11 04:43:34 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.5
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: e8ff056
Built: Thu Apr 11 04:13:40 2019
OS/Arch: linux/amd64
Experimental: false

[root@RHCSA-server01 st2-docker]# docker-compose version
docker-compose version 1.24.0, build 0aa5906
docker-py version: 3.7.2
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
[root@RHCSA-server01 st2-docker]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

I raise issue in Github.