Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in ubuntu 20 and python 3.7 user creation with docker #283

Open
johnfelipe opened this issue Jun 17, 2022 · 1 comment
Open

error in ubuntu 20 and python 3.7 user creation with docker #283

johnfelipe opened this issue Jun 17, 2022 · 1 comment

Comments

@johnfelipe
Copy link

docker run -it --rm udata/udata user create


First name: felipe
Last name: urrego
Email: [email protected]
Password:
Confirm Password:
Traceback (most recent call last):
  File "/usr/local/bin/udata", line 8, in <module>
    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 586, 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 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 426, 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/core/user/commands.py", line 36, in create
    if form.validate():
  File "/usr/local/lib/python3.7/site-packages/flask_security/forms.py", line 419, in validate
    if not super(RegisterForm, self).validate():
  File "/usr/local/lib/python3.7/site-packages/flask_security/forms.py", line 378, in validate
    if not super(ConfirmRegisterForm, self).validate():
  File "/usr/local/lib/python3.7/site-packages/wtforms/form.py", line 310, in validate
    return super(Form, self).validate(extra)
  File "/usr/local/lib/python3.7/site-packages/wtforms/form.py", line 152, in validate
    if not field.validate(self, extra):
  File "/usr/local/lib/python3.7/site-packages/wtforms/fields/core.py", line 206, in validate
    stop_validation = self._run_validation_chain(form, chain)
  File "/usr/local/lib/python3.7/site-packages/wtforms/fields/core.py", line 226, in _run_validation_chain
    validator(form, self)
  File "/usr/local/lib/python3.7/site-packages/flask_security/forms.py", line 144, in unique_user_email
    if _datastore.get_user(field.data) is not None:
  File "/usr/local/lib/python3.7/site-packages/flask_security/datastore.py", line 594, in get_user
    return self.user_model.objects(id=identifier).first()
  File "/usr/local/lib/python3.7/site-packages/mongoengine/queryset/manager.py", line 37, in __get__
    queryset = queryset_class(owner, owner._get_collection())
  File "/usr/local/lib/python3.7/site-packages/mongoengine/document.py", line 215, in _get_collection
    if cls._meta.get("auto_create_index", True) and db.client.is_primary:
  File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1005, in is_primary
    return self._server_property('is_writable')
  File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 830, in _server_property
    writable_server_selector)
  File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 235, in select_server
    address))
  File "/usr/local/lib/python3.7/site-packages/pymongo/topology.py", line 193, in select_servers
    selector, server_timeout, address)
  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

and list of docker ps

CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS                    PORTS                                                 NAMES
bbdfba238904   docker-udata_udata    "/udata/entrypoint.s…"   15 minutes ago   Up 15 minutes (healthy)   0.0.0.0:7000->7000/tcp, :::7000->7000/tcp, 7001/tcp   docker-udata_udata_1
94e24a8fbf63   udata/elasticsearch   "/docker-entrypoint.…"   15 minutes ago   Up 15 minutes (healthy)   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp   docker-udata_elasticsearch_1
18e862766c94   redis                 "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes             0.0.0.0:6379->6379/tcp, :::6379->6379/tcp             docker-udata_redis_1
98048a16e4e3   mongo:3.6             "docker-entrypoint.s…"   15 minutes ago   Up 15 minutes             0.0.0.0:27017->27017/tcp, :::27017->27017/tcp         docker-udata_mongodb_1

@johnfelipe
Copy link
Author

anyone
can u share me exactly version of python, docker, docker compose
stay alert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant