hydraplatform / hydra-server

GNU Lesser General Public License v3.0
5 stars 0 forks source link

Problem starting in Docker #8

Open gbasolu opened 6 years ago

gbasolu commented 6 years ago

Scenario

  1. Docker container
  2. Python 3.6
  3. Connecting to Mysql on a different Container
  4. The DB in the container is the copy of the one provided by Stephen as dump file.

Problem

When starting the server, it shows the following error and refuses to start:

Proposing to run: docker run -it --net hydra_net --ip 172.20.0.12 --env-file /home/giovanni/UoM/deployment/scripts/../config/d_hs_1/env.list --name docker-hs-run-1 -p 8180:8080 docker-hs 
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
9 2018-08-10 15:30:32,019 - INFO - Connecting to database: mysql+mysqlconnector://root:Hydra2018!@172.20.0.10/basinit_1
/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/base.py:528: SAWarning: Column 'name' on table <sqlalchemy.sql.selectable.Select at 0x7f6524c1bbe0; Select object> being replaced by Column('name', String(length=60), table=<Select object>, nullable=False), which has the same key.  Consider use_labels for select() statements.
  (key, getattr(existing, 'table', None), value))
Traceback (most recent call last):
  File "run_server.py", line 19, in <module>
    from hydra_server import s
  File "/app/hydra_server/__init__.py", line 277, in <module>
    s = HydraServer()
  File "/app/hydra_server/__init__.py", line 196, in __init__
    hdb.create_default_users_and_perms()
  File "/app/hydra-base/hydra_base/util/hdb.py", line 161, in create_default_users_and_perms
    perms = db.DBSession.query(Perm).all()
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2783, in all
    return list(self)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 98, in instances
    util.raise_from_cause(err)
  File "/usr/local/lib/python3.6/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.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 79, in instances
    rows = [proc(row) for row in fetch]
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 79, in <listcomp>
    rows = [proc(row) for row in fetch]
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 511, in _instance
    loaded_instance, populate_existing, populators)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 622, in _populate_full
    populator(state, dict_, row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 1763, in load_collection_from_joined_new_row
    inst = _instance(row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 511, in _instance
    loaded_instance, populate_existing, populators)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 622, in _populate_full
    populator(state, dict_, row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 1799, in load_scalar_from_joined_new_row
    dict_[key] = _instance(row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 511, in _instance
    loaded_instance, populate_existing, populators)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 622, in _populate_full
    populator(state, dict_, row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 1763, in load_collection_from_joined_new_row
    inst = _instance(row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 511, in _instance
    loaded_instance, populate_existing, populators)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 622, in _populate_full
    populator(state, dict_, row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/strategies.py", line 1799, in load_scalar_from_joined_new_row
    dict_[key] = _instance(row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 511, in _instance
    loaded_instance, populate_existing, populators)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/loading.py", line 611, in _populate_full
    dict_[key] = getter(row)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/sqltypes.py", line 902, in process
    value = bytes(value)
TypeError: string argument without an encoding
knoxsp commented 6 years ago

Run the alembic upgrade script. Alembic upgrade head

On Fri, 10 Aug 2018, 16:38 Giovanni Basolu, notifications@github.com wrote:

Scenario

  1. Docker container
  2. Python 3.6
  3. Connecting to Mysql on a different Container
  4. The DB in the container is the copy of the one provided by Stephen as dump file.

Problem

When starting the server, it shows the following error and refuses to start:

Proposing to run: docker run -it --net hydra_net --ip 172.20.0.12 --env-file /home/giovanni/UoM/deployment/scripts/../config/d_hs_1/env.list --name docker-hs-run-1 -p 8180:8080 docker-hs /usr/local/lib/python3.6/site-packages/psycopg2/init.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: http://initd.org/psycopg/docs/install.html#binary-install-from-pypi. """)9 2018-08-10 15:30:32,019 - INFO - Connecting to database: mysql+mysqlconnector://root:Hydra2018!@172.20.0.10/basinit_1/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/base.py:528: SAWarning: Column 'name' on table <sqlalchemy.sql.selectable.Select at 0x7f6524c1bbe0; Select object> being replaced by Column('name', String(length=60), table=