Closed
Description
I booted up a fresh container with the postgres:9.6.1-alpine image, but when I connect via JDBC, I get a fatal error. Works fine with the postgres:9.6.1 image though.
FATAL: invalid value for parameter "TimeZone": "America/New_York"
Here's what the container logs are showing.
Unable to find image 'postgres:9.6.1' locally
9.6.1: Pulling from library/postgres
386a066cd84a: Pull complete
e6dd80b38d38: Pull complete
9cd706823821: Pull complete
40c17ac202a9: Pull complete
7380b383ba3d: Pull complete
538e418b46ce: Pull complete
c3b9d41b7758: Pull complete
dd4f9522dd30: Pull complete
920e548f9635: Pull complete
628af7ef2ee5: Pull complete
211678575a06: Pull complete
Digest: sha256:3da198a1846d1fa6cf55978c8326d5c7e801155843c469ce9213cdbb25b5ae33
Status: Downloaded newer image for postgres:9.6.1
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.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....LOG: database system was shut down at 2016-11-18 20:48:08 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
done
server started
ALTER ROLE
/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
waiting for server to shut down....LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
LOG: database system was shut down at 2016-11-18 20:48:09 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
^CLOG: received fast shutdown request
LOG: aborting any active transactions
FATAL: terminating connection due to administrator command
FATAL: terminating connection due to administrator command
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
[guest@rhel72vm postgres]$ vim run.sh
[guest@rhel72vm postgres]$ ./run.sh
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.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... could not open directory "/usr/share/zoneinfo": No such file or directory
ok
running bootstrap script ... LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
ok
performing post-bootstrap initialization ... LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
sh: locale: not found
No usable system locales were found.
Use the option "--debug" to see details.
ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: database system was shut down at 2016-11-18 20:51:04 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
done
server started
ALTER ROLE
/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
waiting for server to shut down....LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
LOG: database system was shut down at 2016-11-18 20:51:05 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
LOG: could not open directory "/usr/share/zoneinfo": No such file or directory
FATAL: invalid value for parameter "TimeZone": "America/New_York"
I interactively loaded this image up and verified that there is no /usr/share/zoneinfo directory. A couple of related solutions online stated that there might have been bad symlinks, but that isn't the case here.
Metadata
Metadata
Assignees
Labels
No labels