gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] bootstrap error on Mandriva 2010 - solved


From: Michael Schütt
Subject: Re: [Gnumed-devel] bootstrap error on Mandriva 2010 - solved
Date: Sun, 25 Jul 2010 15:51:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100628 Mandriva/3.0.5-1mdv2010.1 (2010.1) Thunderbird/3.0.5

The most things from your tip are okay, but something by the bootstrap
going wrong.
Do you have any hint?

Michael

Vorbereiten …
############################################################################################################################################################################
      1/7: libpq8.4_5
############################################################################################################################################################################
      2/7: postgresql8.4
############################################################################################################################################################################
      3/7: postgresql8.4-server
############################################################################################################################################################################
      4/7: postgresql8.4-plpython

############################################################################################################################################################################
      5/7: python-egenix-mx-base
############################################################################################################################################################################
      6/7: python-psycopg2
############################################################################################################################################################################
      7/7: gnumed-server
############################################################################################################################################################################
----------------------------------------------------------------------
Mehr Informationen über das Paket postgresql8.4-server-8.4.4-1mdv2010.1.i586
You just installed or updated postgresql server.
You can find important information about mandriva postgresql rpms and
database
management in:

/usr/share/doc/postgresql8.4-server/postgresql.mdv.releasenote

Please read it.

----------------------------------------------------------------------
address@hidden Downloads]# mkdir /var/lib/pgsql/data1
address@hidden Downloads]# chown postgres /var/lib/pgsql/data1
address@hidden Downloads]# cd /var/lib/pgsql/data1/
address@hidden data1]# su postgres
address@hidden data1]$ /usr/bin/initdb --locale=de_DE.UTF-8 -D
/var/lib/pgsql/data1
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale de_DE.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "german".

fixing permissions on existing directory /var/lib/pgsql/data1 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 28MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data1/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /usr/bin/postgres -D /var/lib/pgsql/data1
or
    /usr/bin/pg_ctl -D /var/lib/pgsql/data1 -l logfile start

address@hidden data1]$ cd /var/lib/pgsql/data1/
address@hidden data1]$ ls
PG_VERSION  base  global  pg_clog  pg_hba.conf  pg_ident.conf
pg_multixact  pg_stat_tmp  pg_subtrans  pg_tblspc  pg_twophase  pg_xlog
postgresql.conf
address@hidden data1]$ mc
#### here I set the line #port = 5432 to port = 5433
address@hidden data1]$ exit
address@hidden data1]# su postgres
address@hidden data1]$ pg_ctl -D /var/lib/pgsql/data1 start
server starting
address@hidden data1]$ LOG:  Datenbanksystem wurde am 2010-07-25
09:37:30 CEST heruntergefahren
LOG:  Datenbanksystem ist bereit um Verbindungen anzunehmen
LOG:  Autovacuum-Launcher startet
^C
address@hidden data1]$ pg_ctl -D /var/lib/pgsql/data1 stop
LOG:  intelligentes Herunterfahren verlangt
LOG:  Autovacuum-Launcher f?hrt herunter
waiting for server to shut down....LOG:  fahre herunter
LOG:  Datenbanksystem ist heruntergefahren
 done
server stopped
address@hidden data1]$ exit
exit

address@hidden Gnumed]# ./gm-bootstrap_server
psql: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis
nicht gefunden
        Läuft der Server lokal und akzeptiert er Verbindungen
        auf dem Unix-Domain-Socket »/tmp/.s.PGSQL.5432«?
Your PostgreSQL installation seems not to have lc_ctype UTF-8 or C.
This will most probably lead to failures of the GNUmed server installation.
address@hidden Gnumed]# su postgres
address@hidden Gnumed]$ pg_ctl -D /var/lib/pgsql/data1 start
server starting
address@hidden Gnumed]$ LOG:  Datenbanksystem wurde am 2010-07-25
09:44:43 CEST heruntergefahren
LOG:  Datenbanksystem ist bereit um Verbindungen anzunehmen
LOG:  Autovacuum-Launcher startet
^C
address@hidden Gnumed]$ exit
exit
address@hidden Gnumed]# ./gm-bootstrap_server
psql: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis
nicht gefunden
        Läuft der Server lokal und akzeptiert er Verbindungen
        auf dem Unix-Domain-Socket »/tmp/.s.PGSQL.5432«?
Your PostgreSQL installation seems not to have lc_ctype UTF-8 or C.
This will most probably lead to failures of the GNUmed server installation.

address@hidden bootstrap]# service postgresql restart
Stopping postgresql service:

                                               [FAILED]
Initializing database:

                                               [  OK  ]
Starting postgresql service:

                                               [  OK  ]
address@hidden bootstrap]# ./gm-bootstrap_server
-bash: ./gm-bootstrap_server: Datei oder Verzeichnis nicht gefunden
address@hidden bootstrap]# cd..
address@hidden server]# ./gm-bootstrap_server
===========================================================
Bootstrapping latest GNUmed database.

This will set up a GNUmed database of version v11
with the name "gnumed_v11".
Adjusting PYTHONPATH ...
/usr/lib/GNUmed-server/Gnumed/pycommon/gmTools.py:13:
DeprecationWarning: the MimeWriter module is deprecated; use the email
package instead
  import urllib2 as wget, decimal, StringIO, MimeWriter, mimetypes,
mimetools
=======================================
Bootstrapping GNUmed database system...
=======================================
You are about to install the following parts of GNUmed:
-------------------------------------------------------
bundle "config" in <gnumed_v2> (or overridden) on <>
bundle "reference" in <gnumed_v2> (or overridden) on <>
bundle "demographics" in <gnumed_v2> (or overridden) on <>
bundle "clinical" in <gnumed_v2> (or overridden) on <>
bundle "documents" in <gnumed_v2> (or overridden) on <>
bundle "office" in <gnumed_v2> (or overridden) on <>
-------------------------------------------------------
This will set up a monolithic GNUmed backend with all bundles
in one database named [gnumed]. It will contain the core schema
without country or language-specific components. Those will
have to be added by using one of the bootstrap-XX.conf file
where XX represents the ISO country code.

Currently this file will also import the test accounts which
MUST be removed prior to real use.

==> bootstrapping "config" ...
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 768, in emit
    msg = self.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 648, in format
    return fmt.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 448, in format
    s = s + record.exc_text
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
611: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 768, in emit
    msg = self.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 648, in format
    return fmt.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 448, in format
    s = s + record.exc_text
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
1238: ordinal not in range(128)
Cannot bootstrap bundles.
Please check the log file for details.
Bootstrapping "gnumed_v11" did not finish successfully. Aborting.
address@hidden server]#


Am 11.03.2010 09:13, schrieb Sebastian Hilbert:
> Am Samstag 06 März 2010 20:06:15 schrieb Michael Schütt:
>>     return _cursor.execute(self, query, vars, async)
>> DataError: new encoding (UTF8) is incompatible with the encoding of the
>> template database (SQL_ASCII)
>> TIP:  Use the same encoding as in the template database, or use
>> template0 as template. 
> 
> This report indicates that for some reason an SQL_ASCII cluster gets created.
> My tests indicate that it should be safe to remove it and replace it by an 
> UTF-8 cluster.
> 
> However if you need your SQL_ASCII cluster see below.
> To initialize a second cluster in another directory issue these commands as 
> root
> 
> mkdir /var/lib/pgsql/data1
> chown postgres /var/lib/pgsql/data1
> 
> - as user postgres (via 'su postgres' ) do:
> 
> /us/bin/initdb --locale=de_DE.UTF-8 -D /var/lib/pgsql/data1
> 
> - Now change into that directory
> 
> cd /var/lib/pgsql/data1/ 
> 
> - and edit postgresql.conf and set the line #port = 5432 to
> port = 5433 
> - make sure to strip away the # in front
> - now you have to tell the bootstrap script that postgres is listening on 
> port 
> 5433
> 
> - go to /usr/lib/gnumed-server/bootstrap and edit bootstrap-latest.sh
> 
> - find the line '#export GM_DB_PORT=5433' and 
> - remove the # to activate it.
> 
> - to start the second cluster on port 5433 as user postgres run
> 
> 'pg_ctl -D /var/lib/pgsql/data1 start'
> 
> -- to stop it run as postgres
> 
> 'pg_ctl -D /var/lib/pgsql/data1 stop' 
> 
> - now run as root
> 
> gm-boostrap_server
> 
> This is tested and works. You can verify that the second server is running on 
> port 5433 by running as user postgres:
> 
> 'psql -p 5433 -l'
> 
> What is left is a way to automatically cater for the above situation. I 
> recommend to extend the script 'postgresql 'in /etc/init.d' but this exercise 
> is left to the user.
> 
> Don't forget to edit your config file to tell the client that the server is 
> on 
> port 5433. One way to do this is to edit /etc/gnumed/gnumed-client.conf. Find 
> the line port in the profile of your choice and replace 5432 by 5433.
> 
> I would be glad if anyone could post all this to the Mandriva page in our 
> Wiki 
> 
> Best regards,
> Sebastian
> 
> 
> _______________________________________________
> Gnumed-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnumed-devel

Attachment: bootstrap-latest.log
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]