Question: Error on postgres db setting
0
gravatar for jarod_v6
2.7 years ago by
jarod_v60
Italy
jarod_v60 wrote:

Hi All!

I try to use postgress database but I have this errors:

migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0120_dataset_collections.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0120_dataset_collections.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0121_workflow_uuids.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0121_workflow_uuids.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0124_job_state_history.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0124_job_state_history.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0126_password_reset.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0126_password_reset.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0128_session_timeout.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0128_session_timeout.py loaded successfully
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Loading script lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py...
migrate.versioning.script.base DEBUG 2016-03-30 10:37:40,873 Script lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py loaded successfully
migrate.versioning.repository DEBUG 2016-03-30 10:37:40,873 Repository lib/galaxy/model/migrate loaded successfully
migrate.versioning.repository DEBUG 2016-03-30 10:37:40,874 Config: OrderedDict([('db_settings', OrderedDict([('__name__', 'db_settings'), ('repository_id', 'Galaxy'), ('version_table', 'migrate_version'), ('required_dbs', '[]')]))])
galaxy.model.migrate.check DEBUG 2016-03-30 10:37:40,876 psycopg2 egg successfully loaded for postgresql dialect
Traceback (most recent call last):
  File "/opt/galaxy/lib/galaxy/webapps/galaxy/buildapp.py", line 65, in paste_app_factory
    app = galaxy.app.UniverseApplication( global_conf=global_conf, **kwargs )
  File "/opt/galaxy/lib/galaxy/app.py", line 54, in __init__
    self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file )
  File "/opt/galaxy/lib/galaxy/config.py", line 843, in _configure_models
    create_or_verify_database( db_url, config_file, self.config.database_engine_options, app=self )
  File "/opt/galaxy/lib/galaxy/model/migrate/check.py", line 71, in create_or_verify_database
    Table( "dataset", meta, autoload=True )
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/sql/schema.py", line 416, in __new__
    metadata._remove_table(name, schema)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/sql/schema.py", line 411, in __new__
    table._init(name, metadata, *args, **kw)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/sql/schema.py", line 484, in _init
    self._autoload(metadata, autoload_with, include_columns)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/sql/schema.py", line 508, in _autoload
    self, include_columns, exclude_columns
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/base.py", line 1971, in run_callable
    with self.contextual_connect() as conn:
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/base.py", line 2039, in contextual_connect
    self._wrap_pool_connect(self.pool.connect, None),
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/base.py", line 2078, in _wrap_pool_connect
    e, dialect, self)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception_noconnection
    exc_info
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/base.py", line 2074, in _wrap_pool_connect
    return fn()
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 376, in connect
    return _ConnectionFairy._checkout(self)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 713, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 480, in checkout
    rec = pool._do_get()
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 1060, in _do_get
    self._dec_overflow()
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 1057, in _do_get
    return self._create_connection()
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 323, in _create_connection
    return _ConnectionRecord(self)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 449, in __init__
    self.connection = self.__connect()
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/pool.py", line 607, in __connect
    connection = self.__pool._invoke_creator(self)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/strategies.py", line 97, in connect
    return dialect.connect(*cargs, **cparams)
  File "/opt/galaxy/eggs/SQLAlchemy-1.0.8-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/default.py", line 385, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/opt/galaxy/eggs/psycopg2-2.5.1_9.2.4_static-py2.6-linux-x86_64-ucs4.egg/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: (psycopg2.OperationalError) FATAL:  Ident authentication failed for user "galaxy

I use this

-bash-4.1$ lsb_release -d
Description:    CentOS release 6.7 (Final)

and I have check the connection using comand line:

[galaxy@qui ~]$ psql -d galaxydb -U galaxy
psql (8.4.20)
Type "help" for help.

This is how encode on the setup:

database_connection = postgresql://galaxypassword@localhost/galaxydb

Could you please help me?

galaxy postgres • 1.1k views
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by jarod_v60
0
gravatar for Hotz, Hans-Rudolf
2.7 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi

The the 'database_connection' setting should look like:

database_connection = postgresql://username:password@localhost/mydatabase

-see also: https://wiki.galaxyproject.org/Admin/Config/Performance/ProductionServer

-maybe the missing ":" is just a typo in your post?

I am still learning the inner works of PostgreSQL, but this looks also like a problem with the "pg_hba.conf" file to me. Do you have the required lines with METHOD = "md5" in your "pg_hba.conf" file.

Regards, Hans-Rudolf

ADD COMMENTlink written 2.7 years ago by Hotz, Hans-Rudolf1.8k
0
gravatar for jarod_v6
2.7 years ago by
jarod_v60
Italy
jarod_v60 wrote:

Thanks so much for the help! It is a typo error:

database_connection = postgresql://user:password@localhost/galaxydb

I have this "pg_hba.conf"

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident
# IPv6 local connections:
host    all             all             ::1/128                 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            ident
#host    replication     postgres        ::1/128                 ident

Another information could be usefull

galaxydb=> \l
                                  List of databases
   Name    |  Owner   | Encoding |  Collation  |    Ctype    |   Access privilege
s   
-----------+----------+----------+-------------+-------------+-------------------
----
 galaxydb  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres
                                                             : postgres=CTc/postg
res
                                                             : galaxy=CTc/postgre
s
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                             : postgres=CTc/postg
res
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                             : postgres=CTc/postg
res
(4 rows)
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by jarod_v60

Hi

Comparing your "pg_hba.conf" with our set-up you probably need to add:

# IPv4 local connections:

host all all 127.0.0.1/32 md5

tough, you might want to replace "all" with the database names ("galaxydb") and users ("galaxy"), and check the IP address of your galaxy server.

Changes in "pg_hba.conf" requires a re-start of the PostgreSQL server (as far as I know)

Hans-Rudolf

ADD REPLYlink modified 2.7 years ago • written 2.7 years ago by Hotz, Hans-Rudolf1.8k
0
gravatar for jarod_v6
2.7 years ago by
jarod_v60
Italy
jarod_v60 wrote:

So Unfortunately I did not resolve

sh run.sh --daemon --log-file=paster.log

WARNING:galaxy.eggs:Warning: pbr (a dependent egg of sqlalchemy-migrate) cannot b
e fetched
2016-04-01 14:43:39,068 INFO sqlalchemy.engine.base.Engine select version()
INFO:sqlalchemy.engine.base.Engine:select version()
2016-04-01 14:43:39,068 INFO sqlalchemy.engine.base.Engine {}
INFO:sqlalchemy.engine.base.Engine:{}
2016-04-01 14:43:39,069 INFO sqlalchemy.engine.base.Engine select current_schema(
)
INFO:sqlalchemy.engine.base.Engine:select current_schema()
2016-04-01 14:43:39,069 INFO sqlalchemy.engine.base.Engine {}
INFO:sqlalchemy.engine.base.Engine:{}
2016-04-01 14:43:39,069 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plai
n returns' AS VARCHAR(60)) AS anon_1
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test plain returns' AS VARCHAR(60
)) AS anon_1
2016-04-01 14:43:39,069 INFO sqlalchemy.engine.base.Engine {}
INFO:sqlalchemy.engine.base.Engine:{}
2016-04-01 14:43:39,070 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unic
ode returns' AS VARCHAR(60)) AS anon_1
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test unicode returns' AS VARCHAR(
60)) AS anon_1
2016-04-01 14:43:39,070 INFO sqlalchemy.engine.base.Engine {}
INFO:sqlalchemy.engine.base.Engine:{}
2016-04-01 14:43:39,070 INFO sqlalchemy.engine.base.Engine show standard_conformi
ng_strings
INFO:sqlalchemy.engine.base.Engine:show standard_conforming_strings
2016-04-01 14:43:39,070 INFO sqlalchemy.engine.base.Engine {}
INFO:sqlalchemy.engine.base.Engine:{}
2016-04-01 14:43:39,071 INFO sqlalchemy.engine.base.Engine 
            SELECT c.oid
            FROM pg_catalog.pg_class c
            LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
            WHERE (pg_catalog.pg_table_is_visible(c.oid))
            AND c.relname = %(table_name)s AND c.relkind in ('r', 'v', 'm', 'f')

INFO:sqlalchemy.engine.base.Engine:
            SELECT c.oid
            FROM pg_catalog.pg_class c
            LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
            WHERE (pg_catalog.pg_table_is_visible(c.oid))
            AND c.relname = %(table_name)s AND c

Use sqlite...why? I modify using this code:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust
host    all         all         0.0.0.0/0             trust
host    all         all            127.0.0.1/32          trust
host    galaxydb    galaxy  127.0.0.1/32          md5

Something happend inside the database psql

galaxydb=# \d
                                   List of relations
 Schema |                           Name                           |   Type   | Owner  
--------+----------------------------------------------------------+----------+--------
 public | dataset                                                  | table    | galaxy
 public | dataset_id_seq                                           | sequence | galaxy
 public | dataset_permissions                                      | table    | galaxy
 public | dataset_permissions_id_seq                               | sequence | galaxy
 public | default_history_permissions                              | table    | galaxy
 public | default_history_permissions_id_seq                       | sequence | galaxy
 public | default_user_permissions                                 | table    | galaxy
 public | default_user_permissions_id_seq                          | sequence | galaxy
 public | event                                                    | table    | galaxy
 public | event_id_seq                                             | sequence | galaxy
 public | galaxy_group                                             | table    | galaxy
 public | galaxy_group_id_seq                                      | sequence | galaxy
 public | galaxy_session                                           | table    | galaxy
 public | galaxy_session_id_seq                                    | sequence | galaxy
 public | galaxy_session_to_history                                | table    | galaxy
 public | galaxy_session_to_history_id_seq                         | sequence | galaxy
 public | galaxy_user                                              | table    | galaxy
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by jarod_v60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 175 users visited in the last hour