[ckan-dev] problem installing dataset extensions on CKAN 2.2.1

Romano Trampus trampus at units.it
Thu Jan 29 17:36:10 UTC 2015


Hi all!

Ubuntu 14.01, Python 2.7, Postgresql 9.3.
Install from sources.
All fine, until trying to install dataset extension. I get:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(default)root at romano:/var/log/postgresql# paster --plugin=ckan datastore 
set-permissions --config /etc/ckan/default/development.ini
Traceback (most recent call last):
   File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
     load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", 
line 104, in run
     invoke(command, command_name, options, args[1:])
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", 
line 143, in invoke
     exit_code = runner.run(args)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", 
line 238, in run
     result = self.command()
   File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/commands.py", 
line 41, in command
     self._load_config()
   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 98, in 
_load_config
     load_environment(conf.global_conf, conf.local_conf)
   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", 
line 232, in load_environment
     p.load_all(config)
   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, 
in load_all
     load(*plugins)
   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 167, 
in load
     plugins_update()
   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 116, 
in plugins_update
     environment.update_config()
   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", 
line 357, in update_config
     plugin.configure(config)
   File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/plugin.py", 
line 59, in configure
     self.legacy_mode = _is_legacy_mode(self.config)
   File "/usr/lib/ckan/default/src/ckan/ckanext/datastore/plugin.py", 
line 27, in _is_legacy_mode
     connection = engine.connect()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", 
line 2472, in connect
     return self._connection_cls(self, **kwargs)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", 
line 878, in __init__
     self.__connection = connection or engine.raw_connection()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", 
line 2558, in raw_connection
     return self.pool.unique_connection()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 183, in unique_connection
     return _ConnectionFairy(self).checkout()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 387, in __init__
     rec = self._connection_record = pool._do_get()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 741, in _do_get
     con = self._create_connection()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 188, in _create_connection
     return _ConnectionRecord(self)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 270, in __init__
     self.connection = self.__connect()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", 
line 330, in __connect
     connection = self.__pool._creator()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", 
line 80, in connect
     return dialect.connect(*cargs, **cparams)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", 
line 281, in connect
     return self.dbapi.connect(*cargs, **cparams)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/psycopg2/__init__.py", 
line 179, in connect
     connection_factory=connection_factory, async=async)
sqlalchemy.exc.OperationalError: (OperationalError) FATAL:  password 
authentication failed for user "ckan_default"
FATAL:  password authentication failed for user "ckan_default"
  None None
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I've double checked the password, of course:

(default)root at romano:/usr/lib/ckan/default/src/ckan# psql -h localhost 
ckan_default ckan_default
Password for user ckan_default:
psql (9.3.5)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

ckan_default=>
ckan_default=>

-----------------------------------
In the postgres log file I found:

2015-01-29 17:07:34 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:07:34 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"
2015-01-29 17:07:34 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:07:34 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"
2015-01-29 17:07:34 CET LOG:  could not receive data from client: 
Connection reset by peer
2015-01-29 17:28:54 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:28:54 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"
2015-01-29 17:28:54 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:28:54 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"
2015-01-29 17:28:54 CET LOG:  could not receive data from client: 
Connection reset by peer
2015-01-29 17:31:01 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:31:01 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"
2015-01-29 17:31:01 CET FATAL:  password authentication failed for user 
"ckan_default"
2015-01-29 17:31:01 CET DETAIL:  Connection matched pg_hba.conf line 92: 
"host    all             all             127.0.0.1/32 md5"


So, it seems to a problem with parsing the config file. But, when 
installing the tables the first time there where no errors:

(default)root at romano:/usr/lib/ckan/default/src/ckan# paster db init -c 
/etc/ckan/default/development.ini
Initialising DB: SUCCESS

Then, the following commands issued where:

(default)root at romano:/usr/lib/ckan/default/src/ckan# sudo -u postgres 
createuser -S -D -R -P -l datastore_default
Enter password for new role:
Enter it again:
(default)root at romano:/usr/lib/ckan/default/src/ckan# sudo -u postgres 
createdb -O ckan_default datastore_default -E utf-8
(default)root at romano:/usr/lib/ckan/default/src/ckan# vi 
/etc/ckan/default/development.ini (changes in datastore urls)
(default)root at romano:/usr/lib/ckan/default/src/ckan# sudo -u postgres psql
psql (9.3.5)
Type "help" for help.

postgres=# exit
postgres-# \q
could not save history to file "/var/lib/postgresql/.psql_history": No 
such file or directory
(default)root at romano:/usr/lib/ckan/default/src/ckan#

Then the error AND the submitting again the command to init the tables 
now give me the same error:

sqlalchemy.exc.OperationalError: (OperationalError) FATAL:  password 
authentication failed for user "ckan_default"
FATAL:  password authentication failed for user "ckan_default"
  None None



Sorry for the long mail. But what's wrong?

Thank you,

romano






-- 

Romano Trampus
Servizi informativi
Centracon - Centro servizi di Ateneo per il trasferimento delle conoscenze
Università di Trieste
Via Edoardo Weiss, 21 - ed. W - I-34128 Trieste, Italia
Tel. +39 040 5586106




More information about the ckan-dev mailing list