I have a fresh docker udata install. When I try to run init or create user command, I'm getting a mongodb error:
pymongo.errors.ServerSelectionTimeoutError: mongodb:27017: [Errno -2] Name or service not known
Any ideas?
thanks,
alan
sudo docker-compose ps
Name Command State Ports
docker-udata_elasticsearch_1 /docker-entrypoint.sh elas ... Up (healthy) 0.0.0.0:9200->9200/tcp, 9300/tcp
docker-udata_mongodb_1 docker-entrypoint.sh mongod Up 0.0.0.0:27017->27017/tcp
docker-udata_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
docker-udata_udata_1 /udata/entrypoint.sh uwsgi Up (healthy) 0.0.0.0:7000->7000/tcp, 7001/tcp
sudo docker run -it --rm udata/udata init
➢ Apply DB migrations if needed
Traceback (most recent call last):
File "/usr/local/bin/udata", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/init.py", line 248, in main
return super(UdataGroup, self).main(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 569, in main
return super(FlaskGroup, self).main(args, kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
return ctx.invoke(f, *args, kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/init.py", line 24, in init
ctx.invoke(migrate, record=True)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
return ctx.invoke(f, *args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/db.py", line 66, in migrate
if migration.record.ok or not success:
File "/usr/local/lib/python3.7/site-packages/udata/migrations/init.py", line 176, in record
data = get_db().migrations.find_one(specs)
File "/usr/local/lib/python3.7/site-packages/pymongo/collection.py", line 1273, in find_one
for result in cursor.limit(-1):
File "/usr/local/lib/python3.7/site-packages/pymongo/cursor.py", line 1156, in next
if len(self.data) or self._refresh():
File "/usr/local/lib/python3.7/site-packages/pymongo/cursor.py", line 1050, in _refresh
self.session = self.collection.database.client._ensure_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1810, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1763, in start_session
server_session = self._get_server_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1796, in _get_server_session
return self._topology.get_server_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 485, in get_server_session
None)
File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 209, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: mongodb:27017: [Errno -2] Name or service not known
Hi,
I have a fresh docker udata install. When I try to run init or create user command, I'm getting a mongodb error:
pymongo.errors.ServerSelectionTimeoutError: mongodb:27017: [Errno -2] Name or service not known
Any ideas?
thanks, alan
sudo docker-compose ps Name Command State Ports
docker-udata_elasticsearch_1 /docker-entrypoint.sh elas ... Up (healthy) 0.0.0.0:9200->9200/tcp, 9300/tcp docker-udata_mongodb_1 docker-entrypoint.sh mongod Up 0.0.0.0:27017->27017/tcp
docker-udata_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
docker-udata_udata_1 /udata/entrypoint.sh uwsgi Up (healthy) 0.0.0.0:7000->7000/tcp, 7001/tcp
sudo docker run -it --rm udata/udata init ➢ Apply DB migrations if needed Traceback (most recent call last): File "/usr/local/bin/udata", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/init.py", line 248, in main
return super(UdataGroup, self).main(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 569, in main
return super(FlaskGroup, self).main(args, kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
return ctx.invoke(f, *args, kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/init.py", line 24, in init
ctx.invoke(migrate, record=True)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
return ctx.invoke(f, *args, *kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/udata/commands/db.py", line 66, in migrate
if migration.record.ok or not success:
File "/usr/local/lib/python3.7/site-packages/udata/migrations/init.py", line 176, in record
data = get_db().migrations.find_one(specs)
File "/usr/local/lib/python3.7/site-packages/pymongo/collection.py", line 1273, in find_one
for result in cursor.limit(-1):
File "/usr/local/lib/python3.7/site-packages/pymongo/cursor.py", line 1156, in next
if len(self.data) or self._refresh():
File "/usr/local/lib/python3.7/site-packages/pymongo/cursor.py", line 1050, in _refresh
self.session = self.collection.database.client._ensure_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1810, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1763, in start_session
server_session = self._get_server_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1796, in _get_server_session
return self._topology.get_server_session()
File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 485, in get_server_session
None)
File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 209, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: mongodb:27017: [Errno -2] Name or service not known