[Cubicweb] installing CubicWeb 3.14 with a PostgreSQL 8.3 db on Ubuntu 8.10

Roland Reumerman roland.reumerman at gmail.com
Thu Apr 23 15:30:12 CEST 2009

My sources file contains:

# cubicweb manager account's login (this user will be created)

# cubicweb manager account's password


# database driver (postgres or sqlite)

# database host

# database name

# database user

# database password

# database encoding

# adapter for this source (YOU SHOULD NOT CHANGE THIS)

I can connect with psql to my postgres instance using the specified
host/username/password. Then I run 'cubicweb-ctl db-create myinstance'
with the same result:

**** connecting to postgres database template1 at localhost as postgres
database cubicweb created
**** connecting to postgres database cubicweb at localhost as postgres
Traceback (most recent call last):
  File "./cubicweb-ctl", line 4, in <module>
  File "/home/roland/cubicweb/cubicweb/cwctl.py", line 810, in run
    main_run(args, __doc__)
  File "/home/roland/cubicweb/cubicweb/toolsutils.py", line 255, in main_run
    base_main_run(args, doc)
  File "/home/roland/cubicweb/logilab/common/clcommands.py", line 136,
in main_run
    cmd_run(arg, *args)
  File "/home/roland/cubicweb/logilab/common/clcommands.py", line 119,
in cmd_run
  File "/home/roland/cubicweb/cubicweb/server/serverctl.py", line 331, in run
    cnx = system_source_cnx(source, special_privs='LANGUAGE C',
  File "/home/roland/cubicweb/cubicweb/server/serverctl.py", line 67,
in system_source_cnx
    return source_cnx(source, special_privs=special_privs, verbose=verbose)
  File "/home/roland/cubicweb/cubicweb/server/serverctl.py", line 54,
in source_cnx
  File "/home/roland/cubicweb/logilab/common/db.py", line 677, in get_connection
    return adapted_module.connect('localhost', database, user,
password, port=port)
  File "/home/roland/cubicweb/logilab/common/db.py", line 273, in connect
    cnx = self._native_module.connect(cnx_string)
psycopg2.OperationalError: FATAL:  database "cubicweb" does not exist

On 4/23/09, Sylvain Thénault <sylvain.thenault at logilab.fr> wrote:
> On 23 avril 14:30, Roland Reumerman wrote:
>> I'm using ident sameuser for my Postgres auth. I'm using it with user
>> postgres with the db running on my local machine (so the same
>> machine). I ran into trouble earlier with IDENT auth failures when
>> trying to connect to postgres via psql, so what I have to do is always
>> specify host 'localhost' specifically. I didn't see a similar option
>> in cubicweb-ctl, so for the init phase I hard-coded 'localhost' as my
>> host in /cubicweb/logilab/common/db.py, but that is not the real
>> solution of course. I'm not sure if that issue is related to my
>> current problem.
> you can set postgres host in the /etc/cubicweb.d/<your instance>/sources
> file. You should try to connect to postgres using the same
> host/user/password
> as specified in this file.
> Once that work, retry "cubicweb-ctl db-create <your instance>"
> We should also try to find what error has not been detected, leading to the
> "database created" message while it obviously wasn't...
> --
> Sylvain Thénault                               LOGILAB, Paris (France)
> Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
> Développement logiciel sur mesure:       http://www.logilab.fr/services
> CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list