Closed pkaramol closed 4 years ago
This is a recurring error when performing tail -f /var/log/st2/*.log
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/models/db/__init__.py", line 155, in db_ensure_indexes
model_class.ensure_indexes()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/document.py", line 808, in ensure_indexes
collection = cls._get_collection()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/document.py", line 206, in _get_collection
cls.ensure_indexes()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/mongoengine/document.py", line 836, in ensure_indexes
collection.create_index(fields, background=background, **opts)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 1754, in create_index
self.__create_index(keys, kwargs, session, **cmd_options)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 1642, in __create_index
with self._socket_for_writes() as sock_info:
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/collection.py", line 194, in _socket_for_writes
return self.__database.client._socket_for_writes()
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 968, in _socket_for_writes
server = self._get_topology().select_server(writable_server_selector)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/topology.py", line 224, in select_server
address))
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/topology.py", line 183, in select_servers
selector, server_timeout, address)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
self._error_message(selector))
ServerSelectionTimeoutError: No servers found yet
It looks like MongoDB is not running / can't be reached.
I would check that MongoDB is running in that container.
It seems that I CAN perform a test connection to mongo
from the st2
container
root@6d38dc3431e1:/# python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymongo import MongoClient
>>> client = MongoClient('mongo', 27017)
>>> db = client.database_name
>>> collection = db.collection_name
>>> collection.find_one({"name":"name1"})
>>> print collection
Collection(Database(MongoClient(host=['mongo:27017'], document_class=dict, tz_aware=False, connect=True), u'database_name'), u'collection_name')
>>> print client
MongoClient(host=['mongo:27017'], document_class=dict, tz_aware=False, connect=True)
What is more, data seem to be created from st2
to mongo;
check this gist;
root@b30c2277e1bd:/# st2ctl status
st2actionrunner PID: 3129
st2actionrunner PID: 3131
st2actionrunner PID: 3154
st2actionrunner PID: 3164
st2api PID: 57
st2api PID: 3096
st2stream PID: 59
st2stream PID: 3086
st2auth PID: 48
st2auth PID: 3091
st2garbagecollector PID: 3074
st2notifier PID: 3111
st2resultstracker PID: 3062
st2rulesengine PID: 3176
st2sensorcontainer PID: 3105
st2chatops is not running.
mistral-server PID: 407
mistral.api PID: 399
mistral.api PID: 435
mistral.api PID: 436
@pkaramol ,
Have you resolved issue, am facing same issue in cluster environment.
and have started all st2 instances and ran /opt/stackstorm/st2/bin/pip install redis, postgres, rabbitmq, ..all of them showing requirement satisfied
Nope...it has been blocking me big time...
have you got any help form stackstorm community, can i go ahead and put t there.
by all means...! go ahead. any help / feedback on this would be highly valuable.
Describe the problem Communication with stackstorm when trying to authenticate fails with
504 Gateway Timeout
nginx error.We have set up stackstorm as per the official image but when trying to authenticate it fails with timeout.
Versions
st2:latest
To Reproduce Just setting up the docker version in a remote machine and try to log;
The weird thing is that when setting up the
docker-compose
locally it works.Here is the effective
nginx
configuration from within the container;