*SOLVED* Problem with PostgreSQL on CentOS VPS [message #7211] |
Fri, 06 October 2006 17:21 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Greetings,
I have verified that I do not have this problem on a non-VPS CentOS 4.4 install. This is a fresh vps creation and none of the system files have been altered.
I installed postgresql-server in a VPS. I attempt to start it for the first time (service postgresql start) and it goes through the initdb to create all of the runtime files... but then it fails to start. In an effort to get more info, looking at the /etc/init.d/postgresql script, it turns off logging... so I turned logging on to have it log to /var/log/postgresql so I can at least see what the problem is.
During the initdb and the start, it appears that there is a locale problem. Here's the error I get:
- - -
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 en_US.UTF-8.
fixing permissions on existing directory /var/lib/pgsql/data... ok
creating directory /var/lib/pgsql/data/base... ok
creating directory /var/lib/pgsql/data/global... ok
creating directory /var/lib/pgsql/data/pg_xlog... ok
creating directory /var/lib/pgsql/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /var/lib/pgsql/data/base/1... FATAL: XX000: failed to initialize lc_messages to ""
LOCATION: InitializeGUCOptions, guc.c:1881
initdb: failed
FATAL: XX000: failed to initialize lc_messages to ""
LOCATION: InitializeGUCOptions, guc.c:1881
- - -
Yes, I did some googling but only found one reported fix (unrelated to OpenVZ, and it didn't work). Anyone know how to successfully get postgresql working on a CentOS 4.4 VPS?
--
TYL, Scott Dowdle
Belgrade, Montana, USA
[Updated on: Thu, 26 October 2006 11:45] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Problem resolved by re-installing glibc-common [message #7693 is a reply to message #7673] |
Fri, 20 October 2006 15:58 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Ok, I verified the glibc-common package
rpm -V glibc-common
...and nothing was missing... but yes indeed, I had no /usr/lib/locale/en_US.utf8/ directory. I did a force install of a stock CentOS 4.4 glibc-common package and it did include the directory in question.
Then I removed postgresql-server... restarted the vps... reinstalled postgresql-server, set it to run in runlevel 3, and started it and it worked fine.
- - - - -
So does this mean that the package installed by vzcreate from the distro template cache is a subset of glibc-common? And if so, how can I fix that? How can I rebuild my template cache with the full package rather than the minimal one?
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
|
Re: Problem with PostgreSQL on CentOS VPS [message #7804 is a reply to message #7211] |
Thu, 26 October 2006 07:50 |
victorskl
Messages: 28 Registered: September 2006
|
Junior Member |
|
|
- My VPS is live and already serving a few sites and users
- When i yum remove glibc-common, there are a lot other packages that set to remove for deps
- If so, i did these:
Just remove glibc-common from rpm db
[root@localhost ~]# rpm -e --justdb --nodeps glibc-common
So reinstall stock glibc-common;
Perhaps, this yum will just add those additional locales which stripped away in original template.
Now test again:
[root@localhost ~]# ls /usr/lib/locale/en_US.utf8/
LC_ADDRESS LC_IDENTIFICATION LC_MONETARY LC_PAPER
LC_COLLATE LC_MEASUREMENT LC_NAME LC_TELEPHONE
LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME
Now as normal:
yum install postgresql postgresql-*
Start service:
/usr/sbin/service postgresql start
Woop!
p.s.. is this might applicable to other RHEL flavour VEs?
[Updated on: Thu, 26 October 2006 08:00] Report message to a moderator
|
|
|
|
|