[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
Marcos' solution worked for me (https://bugs.launchpad.net/openobject- server/+bug/331065/comments/11) Afterwards do not forget to add a db user of course (for instance: sudo -u postgres createuser --createdb --no-createrole --no-superuser -w openerp) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/331065 Title: "could not create database" on a new installation of ubuntu and postgresql 8.3 To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-server/+bug/331065/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
Or you can simple do the same thing as follows: /etc/init.d/postgresql-8.3 stop pg_dropcluster --stop 8.3 main pg_createcluster --locale en_US.UTF-8 --start 8.3 main /etc/init.d/postgresql-8.3 start -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/331065 Title: "could not create database" on a new installation of ubuntu and postgresql 8.3 To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-server/+bug/331065/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
I've ubuntu 8.04 with postgres 8.3. The locale was en_US in /etc/default/locale, change that to LANG="en_US.UTF-8" and rebooted. The "locale" command return the new value for root, postgres, openerp users etc. Still getting in the postgres log: 2010-08-03 14:01:50 CEST ERROR: encoding UTF8 does not match server's locale en_US 2010-08-03 14:01:50 CEST DETAIL: The server's LC_CTYPE setting requires encoding LATIN1. 2010-08-03 14:01:50 CEST STATEMENT: CREATE DATABASE "sean1" ENCODING 'unicode' TEMPLATE "template0" In /etc/postgresql/8.3/main/postgresql.conf found 4 lc_ settings = 'en_US'. Changed those to en_US.UTF-8 and restarted postgres. Still the same error message as above Next used psql as the postgres user: postgres=# initdb -E en_US.UTF-8 Didn't help either. But the following did work: Stop postgres, kill my current cluster, reinit and restart: /etc/init.d/postgresql-8.3 stop cd /var/lib/postgresql/8.3 mv main main.old mkdir main su - postgres locale (make sure you have en_US.UTF-8) /usr/lib/postgresql/8.3/bin/initdb -D /var/lib/postgresql/8.3/main cd main ln -s /etc/postgresql-common/root.crt root.crt ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem server.crt ln -s /etc/ssl/private/ssl-cert-snakeoil.key server.key /etc/init.d/postgresql-8.3 start # Test: su - postgres psql postgres=# CREATE DATABASE "test3" ENCODING 'unicode' TEMPLATE "template0"; postgres=# drop database test3; chown postgres:postgres main Finally start Openerp, create DBs: all is sweet. So, basically I'd say make sure that locale is right BEFORE installing postgres :-) -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
On Wednesday 28 July 2010, you wrote: > My fix (for Ubuntu 8.04 with postgres 8.3) was as follows, I know it > cannot be the "right" solution but after playing with locales for too > long (where did you change the locale?) > > change /opt/openerp-server/bin/service/web_services.py > > diff web_services.py.ORIG web_services.py > 71c71,74 > < cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' > TEMPLATE "template0" """ % name) --- > > > cr.execute("""CREATE DATABASE "%s" ENCODING 'LATIN1' TEMPLATE > > "template0" """ % name) > unicode is the only encoding that OpenERP can work with. The reason is that all of OpenERP is using utf8 and thus requires full unicode support from the db. Latin1 is thus bound to fail. Please never use it. Initializing the postgres cluster with the correct encoding (for those old versions that have cluster-wide encoding) is a matter of distro + postgres. We can help you, but it certainly is not an OpenERP bug. -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
My fix (for Ubuntu 8.04 with postgres 8.3) was as follows, I know it cannot be the "right" solution but after playing with locales for too long (where did you change the locale?) change /opt/openerp-server/bin/service/web_services.py diff web_services.py.ORIG web_services.py 71c71,74 < cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "template0" """ % name) --- > cr.execute("""CREATE DATABASE "%s" ENCODING 'LATIN1' TEMPLATE > "template0" """ % name) -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
I can confirm that the bug exists - using Lucid and Postgresql 8.4, locale en_GB. Changing locale to "en_US.UTF-8" solves the problem -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
I have verified that this problem exists for a fresh installation of Ubuntu 10.04. Most likely this bug has been present for some time. xrg: can you be more specific, perhaps including what commands to run. I tried the following (as root): locale-gen en_US.UTF-8 update-locale en_US.UTF-8 but that had no effect. -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
** Changed in: openerp-server (Ubuntu) Status: New => Confirmed -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
On Sunday 23 May 2010, you wrote: > I am seeing this problem as well: > > PDT ERROR: encoding UTF8 does not match locale en_US > > What is the best solution? > use "en_US.UTF-8" as your locale. -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
I am seeing this problem as well: PDT ERROR: encoding UTF8 does not match locale en_US What is the best solution? -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 331065] Re: "could not create database" on a new installation of ubuntu and postgresql 8.3
For me it was a authentification problem linked with a bug in the init.d script : https://bugs.launchpad.net/debian/+source/openerp- server/+bug/352299 The solution provided there does not work yet for me, but a workaround is to add the line local all openerp trust!!! where openerp is the name of your dbuser (in /etc/openerp-server) or simply to change local all all ident sameuser to local all all trust and restart postgres -- "could not create database" on a new installation of ubuntu and postgresql 8.3 https://bugs.launchpad.net/bugs/331065 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs