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

First-time setup: installation issues #42

Open
Johnnywang92 opened this issue Jan 8, 2019 · 12 comments
Open

First-time setup: installation issues #42

Johnnywang92 opened this issue Jan 8, 2019 · 12 comments
Assignees

Comments

@Johnnywang92
Copy link

when I run the install command on MAC Mojave (Python 2.7.10), get error message as following:

Starting metadome_redis_1 ... done
Starting metadome_rabbitmq_1 ... done
Creating metadome_db_1 ... error

ERROR: for metadome_db_1 Cannot create container for service db: b"error while mounting volume with options: type='none' device='' o='bind': no such file or directory"

ERROR: for db Cannot create container for service db: b"error while mounting volume with options: type='none' device='' o='bind': no such file or directory"
ERROR: Encountered errors while bringing up the project.

Any suggestion?

@Johnnywang92 Johnnywang92 changed the title install error install error,for db Cannot create container for service db Jan 8, 2019
@laurensvdwiel
Copy link
Member

laurensvdwiel commented Jan 8, 2019

Dear @Johnnywang92 ,

I believe you have not configured the <absolute path > in the docker-compose.yml file.
I have seen that this was incorrectly specified in the installation part of the readme.md, I have changed this to point to the correct line numbers in f7797f0. Can you verify it now works?

@Johnnywang92
Copy link
Author

screen shot 2019-01-09 at 9 58 54 am
Thank you for your answer. I tried a lot of times to modify the docker-compose.yml file, and re-run the install script, but still not work.The error message is [ERROR: for metadome_db_1 Cannot create container for service db: b"error while mounting volume with options: type='none' device='</Users/yifanwang/Test/data/meta_data/>' o='bind': no such file or directory"]

@laurensvdwiel
Copy link
Member

Dear @Johnnywang92 ,

The device folders are incorrectly specified in your docker-compose.yml, please remove the '<' and '>'.
Here is an example of my local test docker-compose:

volumes:
   data: 
      driver_opts:
        type: none
        # Please set the 'device' here to a local folder you are okay with MetaDome to create additional files and folders
        device: /usr/data
        o: bind

@Johnnywang92
Copy link
Author

Thank you so much Laurens van de Wiel, it worked.

Another error message: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: role "metadom_user" does not exist.

Is that means I need create a user "metadom_user" in mysql?

@laurensvdwiel
Copy link
Member

Dear @Johnnywang92

Is the first command you executed the one specified at https://github.com/cmbi/metadome/blob/master/README.md#first-time-set-up ?

If not, please tear down the existing architecture via the command docker-compose down followed by the command specified in the first time set up: docker-compose run app python install.py

@laurensvdwiel laurensvdwiel changed the title install error,for db Cannot create container for service db First-time setup: installation issues Jan 10, 2019
@Johnnywang92
Copy link
Author

Dear @laurensvdwiel
Yes it is. I run the docker-compose run app python install.py for the first time set up.

@laurensvdwiel
Copy link
Member

@cbaakman , could you attempt to replicate this issue?

@cbaakman
Copy link
Contributor

When I run this on my desktop:

docker-compose run app python install.py

I get the following output:

Creating network "metadome_default" with the default driver
Creating metadome_db_1
Creating metadome_redis_1
Creating metadome_rabbitmq_1
Creating metadome_celery_1
2019-01-11 09:03:36,143 - WARNING - MAILSERVER is not set in default_settings.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1122, in _do_get
    return self._pool.get(wait, self._timeout)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/queue.py", line 145, in get
    raise Empty
sqlalchemy.util.queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
    return fn()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 387, in connect
    return _ConnectionFairy._checkout(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 516, in checkout
    rec = pool._do_get()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1138, in _do_get
    self._dec_overflow()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
    raise value
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1135, in _do_get
    return self._create_connection()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 651, in __connect
    connection = pool._invoke_creator(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 393, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/usr/local/lib/python3.5/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  role "metadom_user" does not exist


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "install.py", line 6, in <module>
    from metadome.application import app
  File "/usr/src/app/metadome/application.py", line 3, in <module>
    app = create_app()
  File "/usr/src/app/metadome/factory.py", line 72, in create_app
    db.create_all()
  File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py", line 963, in create_all
    self._execute_for_all_tables(app, bind, 'create_all')
  File "/usr/local/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py", line 955, in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 3949, in create_all
    tables=tables)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1928, in _run_visitor
    with self._optional_conn_ctx_manager(connection) as conn:
  File "/usr/local/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1921, in _optional_conn_ctx_manager
    with self.contextual_connect() as conn:
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2112, in contextual_connect
    self._wrap_pool_connect(self.pool.connect, None),
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2151, in _wrap_pool_connect
    e, dialect, self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1465, in _handle_dbapi_exception_noconnection
    exc_info
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
    return fn()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 387, in connect
    return _ConnectionFairy._checkout(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 516, in checkout
    rec = pool._do_get()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1138, in _do_get
    self._dec_overflow()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
    raise value
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 1135, in _do_get
    return self._create_connection()
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/pool.py", line 651, in __connect
    connection = pool._invoke_creator(self)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
    return dialect.connect(*cargs, **cparams)
  File "/usr/local/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 393, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/usr/local/lib/python3.5/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  role "metadom_user" does not exist

@cbaakman
Copy link
Contributor

It looks like "db.create_all" is called twice. Once in the app creation and once in the install procedure.

@laurensvdwiel
Copy link
Member

@cbaakman : is this issue resolved?

@cbaakman
Copy link
Contributor

Unfortunately not, it's still happening!

@laurensvdwiel
Copy link
Member

Duplicate issue at #69

Am looking into this from my end the coming weeks

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

No branches or pull requests

3 participants