postgres sql 9.3 to 94.14 from 9.2 to 9.4 upgrade failed, as part of the Apigee upgrade from 4.16.05 to 4.17.09

systemunix
Participant I

unable to upgrade postgres sql when we are upgrading Apigee edge from 4.16.05 to 4.17.09. below is the error logs

LOG: skipping missing configuration file "/opt/apigee/data/apigee-postgresql/pgdata/postgresql.auto.conf" 2017-10-30 16:18:53 UTC [79008]: [2-1] user= db= host= FATAL: database files are incompatible with server 2017-10-30 16:18:53 UTC [79008]: [3-1] user= db= host= DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.14.

Solved Solved
0 4 1,229
1 ACCEPTED SOLUTION

systemunix
Participant I

This issue resolved after adding the sudo entry in sudoers file.

View solution in original post

4 REPLIES 4

systemunix
Participant I

below is the error at the command prompt,

[root@apistgpgdb1 ~]# /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql db_upgrade sudo: sorry, you must have a tty to run sudo initdb: directory "/opt/apigee/data/apigee-postgresql/pgdata" exists but is not empty If you want to create a new database system, either remove or empty the directory "/opt/apigee/data/apigee-postgresql/pgdata" or run initdb with an argument other than "/opt/apigee/data/apigee-postgresql/pgdata". The files belonging to this database system will be owned by user "apigee". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. lrwxrwxrwx 1 apigee apigee 46 Oct 30 20:33 pg_hba.conf -> /opt/apigee/apigee-postgresql/conf/pg_hba.conf lrwxrwxrwx 1 apigee apigee 50 Oct 30 20:33 postgresql.conf -> /opt/apigee/apigee-postgresql/conf/postgresql.conf lrwxrwxrwx 1 apigee apigee 52 Oct 30 20:12 recovery_conf.txt -> /opt/apigee/apigee-postgresql/conf/recovery_conf.txt apigee-configutil: apigee-postgresql: # OK apigee-service: apigee-postgresql: Not running (NO_LOCKFILE) apigee-service: apigee-postgresql: status=2, continuing apigee-service: apigee-postgresql: Not running (DEAD) apigee-service: apigee-postgresql: status=3, continuing apigee-service: apigee-postgresql: Not running (DEAD) apigee-service: apigee-postgresql: apigee-postgresql is dead Waiting for postgres to finish start psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/opt/apigee/var/run/apigee-postgresql/.s.PGSQL.5432"? Retrying in 5 sec (1) psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/opt/apigee/var/run/apigee-postgresql/.s.PGSQL.5432"? Retrying in 5 sec (2) psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/opt/apigee/var/run/apigee-postgresql/.s.PGSQL.5432"? Retrying in 5 sec (3) psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/opt/apigee/var/run/apigee-postgresql/.s.PGSQL.5432"? Retrying in 5 sec (4) ^C Session terminated, killing shell...

systemunix
Participant I

This issue resolved after adding the sudo entry in sudoers file.

@Emaratech What was the sudoers entry you added please?

systemunix
Participant I

Defaults:apigee !requiretty

Defaults:postgres !requiretty