apigee onpremise not able to install postgres server

Hi Everyone, I am installing(aio) Apigee Edge on priavte cloud(cent os v7.2) with root user, I am able to install all the componets successfully except postgres server. but able to start postgres server successfully.please find below date for your inputs and suggestions. can one one help me getting resolve this issue. [root@/ application]# /opt/apigee/apigee-setup/bin/setup.sh -p ps -f /tmp/repos/config.txt INFO: running setup as root INFO: changing log location to /tmp/setup-root.log Using defaults from /tmp/repos/v_14.18/repos/EdgeConfig-aio-v4.18.txt setup.sh: Info: Check for system requirements is not enabled. setup.sh: Proceeding with HOSTIP 10.X.X.X Service setup apigee-postgresql calling sudo on downgrade Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: mirror.hmc.edu * epel: fedora-epel.mirror.lstn.net * extras: bay.uchicago.edu * updates: centos.aol.com 72 packages excluded due to repository priority protections No packages marked for update Validating setup variables Checking for required variables Checking required variable HOSTIP...OK Checking required variable RUN_USER...OK Checking required variable RUN_GROUP...OK Checking for optional variables apigee-service: apigee-postgresql: OK Postgres is running...looks like the setup is already done, Skipping setup apigee-service: apigee-postgresql: OK apigee-configutil: apigee-postgresql: # OK apigee-service: apigee-postgresql: Not running (NO_LOCKFILE) apigee-service: apigee-postgresql: status=2, continuing apigee-service: apigee-postgresql: OK apigee-service: apigee-postgresql: apigee-postgresql is running Waiting for postgres to finish start psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (1) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (2) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (3) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (4) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (5) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (6) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (7) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (8) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (9) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (10) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (11) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (12) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (13) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (14) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (15) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (16) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (17) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (18) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (19) psql: symbol lookup error: psql: undefined symbol: PQsetErrorContextVisibility Retrying in 5 sec (20) Error starting postgres Continue anyhow? y/n (y): y Error: setup.sh: /opt/apigee/apigee-service/bin/apigee-service exited with unexpected status 127 ---------------------------------------------------------------------------------------------------------------- [root@/]# curl -u opdk@wmlab.ms.com:Secret123 http://10.167.30.123:8080/v1/servers?pod=analytics { "code" : "registration.PodDoesNotExist", "message" : "Pod{name='analytics', region='dc-1', tags=null} does not exist", "contexts" : [ ] ---------------------------------------------------------------------------------------------------------------- apigee-all status + apigee-service apigee-cassandra status apigee-service: apigee-cassandra: OK + apigee-service apigee-openldap status apigee-service: apigee-openldap: OK + apigee-service apigee-postgresql status apigee-service: apigee-postgresql: OK + apigee-service apigee-qpidd status apigee-service: apigee-qpidd: OK + apigee-service apigee-zookeeper status apigee-service: apigee-zookeeper: OK + apigee-service edge-management-server status apigee-service: edge-management-server: OK + apigee-service edge-message-processor status apigee-service: edge-message-processor: OK + apigee-service edge-qpid-server status apigee-service: edge-qpid-server: OK + apigee-service edge-router status apigee-service: edge-router: OK + apigee-service edge-ui status apigee-service: edge-ui: OK ----------------------------------------------------------------------------------------------------------------

0 8 1,327
8 REPLIES 8

Hi Team,

followed this refernce url(https://community.apigee.com/questions/49107/error-during-apigee-installation-41709-postgresql-1.html) and did steps but I am facing below issues.

/opt/apigee/apigee-setup/bin/setup.sh -p ps -f /tmp/repos/v_14.18/repos/EdgeConfig-aio-v4.18.txt INFO: running setup as root INFO: changing log location to /tmp/setup-root.log Using defaults from /tmp/repos/v_14.18/repos/EdgeConfig-aio-v4.18.txt setup.sh: Info: Check for system requirements is not enabled. setup.sh: Proceeding with HOSTIP 10.x.x.x Service setup apigee-postgresql calling sudo on downgrade Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: mirror.hmc.edu * epel: fedora-epel.mirror.lstn.net * extras: bay.uchicago.edu * updates: centos.aol.com 72 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package apigee-postgresql.noarch 0:9.4.11-0.0.1092 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: apigee-postgresql noarch 9.4.11-0.0.1092 apigee-release 31 k Transaction Summary ================================================================================ Install 1 Package Total download size: 31 k Installed size: 79 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction cp: cannot stat ‘pg_hba.conf’: No such file or directory cp: cannot stat ‘postgresql.conf’: No such file or directory error: %pre(apigee-postgresql-9.4.11-0.0.1092.noarch) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package apigee-postgresql-9.4.11-0.0.1092.noarch Verifying : apigee-postgresql-9.4.11-0.0.1092.noarch 1/1 Failed: apigee-postgresql.noarch 0:9.4.11-0.0.1092 Complete! Error: setup.sh: /opt/apigee/apigee-service/bin/apigee-service exited with unexpected status 1

Looks like you are trying to reinstall on a box which already had apigee components. I recommend doing clean install again. Please follow these steps to uninstall - https://docs.apigee.com/private-cloud/latest/uninstalling-edge .

Hi @rajeshmishra,

I have tried with clean installation still I am facing issue with postgres component.

Service setup apigee-postgresql Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: centos.mirror.lstn.net * epel: fedora-epel.mirrors.tds.net * extras: mirror.ancl.hawaii.edu * updates: bay.uchicago.edu 72 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package apigee-postgresql.noarch 0:9.4.11-0.0.1092 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: apigee-postgresql noarch 9.4.11-0.0.1092 apigee-release 31 k Transaction Summary ================================================================================ Install 1 Package Total download size: 31 k Installed size: 79 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction cp: cannot stat ‘pg_hba.conf’: No such file or directory cp: cannot stat ‘postgresql.conf’: No such file or directory error: %pre(apigee-postgresql-9.4.11-0.0.1092.noarch) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package apigee-postgresql-9.4.11-0.0.1092.noarch Verifying : apigee-postgresql-9.4.11-0.0.1092.noarch 1/1 Failed: apigee-postgresql.noarch 0:9.4.11-0.0.1092 Complete! [2018-02-14 12:56:16 AM] Error: setup.sh: /opt/apigee/apigee-service/bin/apigee-service exited with unexpected status 1

---------------------------------------------------------------------------postgres logs------------------------------------ apigee-configutil: apigee-postgresql: # OK # in pid 15657, pgrp=15321 -> 15657 2018-02-13 16:24:40 UTC [15657]: [1-1] user= db= host= LOG: could not bind IPv4 socket: Address already in use 2018-02-13 16:24:40 UTC [15657]: [2-1] user= db= host= HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2018-02-13 16:24:40 UTC [15657]: [3-1] user= db= host= LOG: could not bind IPv6 socket: Address already in use 2018-02-13 16:24:40 UTC [15657]: [4-1] user= db= host= HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2018-02-13 16:24:40 UTC [15657]: [5-1] user= db= host= WARNING: could not create listen socket for "*" 2018-02-13 16:24:40 UTC [15657]: [6-1] user= db= host= FATAL: could not create any TCP/IP sockets ~ ~

I could see could not bind IPv4 socket: Address already in use 5432. I recommend doing following steps :

/opt/apigee/apigee-service/bin/apigee-all stop

ps -aef | grep apigee

(Get the list of all apigee process)

kill -9 <pid>

check if there any process listening on 5432. netstat -anp | grep 5432

Run the setup again.

Thanks! @Rajesh Mishra,

I have tried that solution previoulsy but no luck.

from other sources and suggest I have down the follwoing steps to resolve this issue.

1) Go to path /opt/apigee/data

2) rename the folder apigee-postgresql to apigee_postgresql_orig

3) I have excuted command(/opt/apigee/apigee-setup/bin/setup.sh -p ps -f /tmp/repos/v_14.18/repos/EdgeConfig-aio-v4.18.txt) to install post gres server component.

4) Now the component got succesfully installed without any issues.

Thank you!

Thanks for sharing the resolution. As I had mentioned earlier, clean install would have helped. Clean install meant completely removing /opt/apigee and /opt/nginx directory as well as removing all rpms.

giridharj
Participant I

While this post did help me, I wanted to update the thread with an issue i faced. You have to remove all RPMs related to Postgress installed in your machine. The Above post or Apigee documentation wont clearly/explicitly say this.

rpm -qa | grep postgres

until you are confident the rpms are not used by other products in your machine, go ahead and remove these as well and retry your installation