CentOS 5, pg8.4.2, could not read time zone file

Started by Wade Hamptonalmost 19 years ago7 messagesgeneral
Jump to latest
#1Wade Hampton
wadehamptoniv@gmail.com

On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the
initial initdb step fails with the error

"WARNING: cold not read time zone file "Default" : permission denied.
FATAL: invalid value for parameter "timezone_abbreviations": "Default"

A search of the mail list and google showed this appearing on Windows,
but I am on Linux.
Anyone have any workaround?

--
Wade Hampton

#2Hannes Dorbath
light@theendofthetunnel.de
In reply to: Wade Hampton (#1)
Re: CentOS 5, pg8.4.2, could not read time zone file

On 09.05.2007 16:51, Wade Hampton wrote:

On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the

Hey, that's what I call bleeding edge ;)

initial initdb step fails with the error

"WARNING: cold not read time zone file "Default" : permission denied.
FATAL: invalid value for parameter "timezone_abbreviations": "Default"

strace initdb -D /foo/bar

see what exactly it tries to read and check if it has permissions to do so.

--
Regards,
Hannes Dorbath

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Wade Hampton (#1)
Re: CentOS 5, pg8.4.2, could not read time zone file

"Wade Hampton" <wadehamptoniv@gmail.com> writes:

On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the
initial initdb step fails with the error

"WARNING: cold not read time zone file "Default" : permission denied.
FATAL: invalid value for parameter "timezone_abbreviations": "Default"

"8.4.2"? Did this message fall through a time warp?

Anyway, having been burnt before I always wonder about SELinux whenever
any strange permission failures turn up on recent RHEL/Fedora systems.
Look in /var/log/messages to see if there's an "avc denied" log entry
corresponding to this, or temporarily turn off SELinux with
/usr/sbin/setenforce and see if it works then.

If it is SELinux preventing the access, you probably need to run
restorecon to fix the SELinux labels on these files. If it still
doesn't work after that, file a bug report against the selinux policy
module.

regards, tom lane

#4Wade Hampton
wadehamptoniv@gmail.com
In reply to: Tom Lane (#3)
Re: CentOS 5, pg8.4.2, could not read time zone file

On 5/9/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Wade Hampton" <wadehamptoniv@gmail.com> writes:

On my CentOS 5.0 box with the RHEL version of Postgresql 8.4.2, the
initial initdb step fails with the error

"WARNING: cold not read time zone file "Default" : permission denied.
FATAL: invalid value for parameter "timezone_abbreviations": "Default"

"8.4.2"? Did this message fall through a time warp?

Oops, 8.2.4, my bad.

Anyway, having been burnt before I always wonder about SELinux whenever
any strange permission failures turn up on recent RHEL/Fedora systems.
Look in /var/log/messages to see if there's an "avc denied" log entry
corresponding to this, or temporarily turn off SELinux with
/usr/sbin/setenforce and see if it works then.

SELinux is off and there were no avc denied messages in /var/log/messages....

If it is SELinux preventing the access, you probably need to run
restorecon to fix the SELinux labels on these files. If it still
doesn't work after that, file a bug report against the selinux policy
module.

I ran strace on it and it dies at the same place each time:

su postgres -c "strace initdb -D /var/lib/pgsql/data"

..
write(4, "insert OID = 1153 (timestampz_"...., 116WARNING: could
not read.....
... = -1 EPIPE (Broken pipe)

/etc/localtime is:
TZif2\0... UTC... UTC0

locale is en_US.UTF-8

I am downloading the source rpm and building RPMS specifically for
CentOS 5 to see if it helps.

Thanks,
--
Wade Hampton

#5Wade Hampton
wadehamptoniv@gmail.com
In reply to: Wade Hampton (#4)
Re: CentOS 5, pg8.4.2, could not read time zone file

The build of rhel src rpm failed due to "This platform is not thread
safe. Check the file 'config.lg' fo rthe exact reason."

For now I am going back to 8.1.8 that came with CentOS 5.

Thanks,
--
Wade Hampton

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Wade Hampton (#4)
Re: CentOS 5, pg8.4.2, could not read time zone file

"Wade Hampton" <wadehamptoniv@gmail.com> writes:

On 5/9/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Anyway, having been burnt before I always wonder about SELinux whenever
any strange permission failures turn up on recent RHEL/Fedora systems.

SELinux is off and there were no avc denied messages in /var/log/messages....

Hmph. Well, then it actually must be a permissions problem on the
timezone file or one of its parent directories ... did you check?

regards, tom lane

#7Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Wade Hampton (#5)
Re: CentOS 5, pg8.4.2, could not read time zone file

Hi,

On Wed, 2007-05-09 at 12:51 -0400, Wade Hampton wrote:

The build of rhel src rpm failed due to "This platform is not thread
safe. Check the file 'config.lg' fo rthe exact reason."

Is this CentOS 5 final? I saw this issue in a beta release of RHEL5, but
I saw that it is fixed in final release.

I could install and use RHEL5 PGDG RPMs on CentOS 5, btw.

Regards,
--
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/