Trouble installing gnumed in ubuntu intrepid

Asked by OrthoDoc on 2009-02-07

I am running into trouble installing gnumed in ubuntu intrepid. Need some directions and lots of help.

Did an install of postgresql 8.3 and configured postgres user with my own password. Also made the changes to thte configuration files pg_hba.conf and postgresql.conf and restarted the pg server and cluster.

Made attempts to run the net_install-gnumed_server.sh but failed. Peeped into the server installation folder. Attempted to run the bootstrap files but still failed. All attempts exit at the same point after asking for postgres password. I enter the passwd and it does not proceed any more.

I guess I am not doing the postgres config right somewhere. I tried creating another user in postgres and was able to do so successfully. It would be nice if someone could point out where I was going wrong.

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
GNUmed Edit question
Assignee:
No assignee Edit question
Solved by:
ncq
Solved:
2009-02-10
Last query:
2009-02-10
Last reply:
2009-02-10

This question was reopened

OrthoDoc (indianorthodoc) said : #1

I looke at the installation log file and the following lines are interesting:

2009-02-07 16:03:37 INFO gm.bootstrapper (./bootstrap_gm_db_system.py::connect() #211): successfully connected
2009-02-07 16:03:37 INFO gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #420): template database LC_CTYPE is [en_IN]
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #426): LC_CTYPE does not end in .UTF-8
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #427): cluster encoding incompatible with utf8 encoded databases but
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #428): for GNUmed installation the cluster must accept this encoding
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #429): you may need to re-initdb or create a new cluster
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__bootstrap() #375): Cannot connect to server template database.
2009-02-07 16:03:37 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::bootstrap() #1075): Cannot bootstrap bundle [config]

Now have to try and find out how i can start a postgresql cluster to end in utf8!?

OrthoDoc (indianorthodoc) said : #2

I ran the following in a terminal: sudo /usr/lib/postgresql/8.3/bin/pg_controldata /var/lib/postgresql/8.3/main/

The last two lines reveal it all:
LC_COLLATE: en_IN
LC_CTYPE: en_IN

This must be :
LC_COLLATE: en_IN.UTF8
LC_CTYPE: en_IN.UTF8

Thats what the gnumed installer is reporting.

So i tried:
 sudo locale-gen en_IN.UTF-8

And then did a re install, but thsi did nto help.

Whats the way forward? How do I change the locale settings in postgresql without a system wide change??

OrthoDoc (indianorthodoc) said : #3

I discover from the following bug:

1. 8.3 now forces DB encodings and server locale to match. So there is a way out for those who are upgrading. See this bug(https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/207779).

2. Once the cluster has been created then there is no way of changing the locale settings. See postgres manual for this(http://www.postgresql.org/docs/8.2/static/locale.html).

3. In conclusion, unless your locale setting is set to xx_XX.UTF8 right from the beginning it is not possible to install gnumed.

Hope there is a way out!!

OrthoDoc (indianorthodoc) said : #4

Ok here is what i did further on:
1. #dropped the main cluster
       sudo pg_dropcluster --stop 8.3 main
2. #Create a new cluster with the locale set to en_US.UTF8
      sudo pg_createcluster -d /var/lib/postgresql/8.3/main --locale=en_US --lc-ctype=en_US.UTF8 8.3 main
3. # restarted the cluster

OrthoDoc (indianorthodoc) said : #5

Ok here is what i did further on:
1. #dropped the main cluster
       sudo pg_dropcluster --stop 8.3 main
2. #Create a new cluster with the locale set to en_US.UTF8
      sudo pg_createcluster -d /var/lib/postgresql/8.3/main --locale=en_US --lc-ctype=en_US.UTF8 8.3 main
3. # restarted the cluster
       sudo pg_ctlcluster 8.3 main restart
4. #restarted postgresql
      sudo /etc/init.d/postgresql-8.3 restart
5. #Changed to gnumed directory
       cd /home/bdb/.gnumed/server-installation/GNUmed-v9/server/bootstrap/
6. #ran the net installation script
       bash net_install-gnumed_server.sh

And failure again. The last line sin the log file identifies the changed locale setting but refers to the template server still not being .UTF8:
2009-02-07 18:21:56 INFO gm.database (/home/bdb/.gnumed/server-installation/GNUmed-v9/Gnumed/pycommon/gmPG2.py::get_connection() #1109): PostgreSQL version (string): "PostgreSQL 8.3.5 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real (Ubuntu 4.3.2-1ubuntu11) 4.3.2"
2009-02-07 18:21:56 INFO gm.bootstrapper (./bootstrap_gm_db_system.py::connect() #211): successfully connected
2009-02-07 18:21:56 INFO gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #420): template database LC_CTYPE is [en_US.UTF8]
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #426): LC_CTYPE does not end in .UTF-8
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #427): cluster encoding incompatible with utf8 encoded databases but
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #428): for GNUmed installation the cluster must accept this encoding
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__connect_superuser_to_srv_template() #429): you may need to re-initdb or create a new cluster
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::__bootstrap() #375): Cannot connect to server template database.
2009-02-07 18:21:56 ERROR gm.bootstrapper (./bootstrap_gm_db_system.py::bootstrap() #1075): Cannot bootstrap bundle [config].

Best ncq (karsten-hilbert) said : #6

This has been fixed in the v9.2 server release available now.

OrthoDoc (indianorthodoc) said : #7

Thanks ncq, that solved my question.

OrthoDoc (indianorthodoc) said : #8

The newer version of the server release still does not work for the en_IN locale (read India locale).

Though its still possible to install gnumed through a roundabout way. The instructions in Reply no 5 will work for those users from India with two important changes. Follow the instructions till step 4 and then:

Step 5: Run sudo gm-bootstrap_server

Wait for some time for the bootstrapping process will go through the entire process of creating databases from v2 to v12.

Step 6: After logging into gnumed, follow the instructions at the gnumed wiki: http://wiki.gnumed.de/bin/view/Gnumed/ServerIntoProduction