Support Questions
Find answers, ask questions, and share your expertise

postgresql + ambari server failed to open port 8080

Solved Go to solution

Re: postgresql + ambari server failed to open port 8080

Super Mentor

@mike_bronson7

Usually we find Postgres Db logs inside "

/var/lib/pgsql/data/pg_log/" dir

Re: postgresql + ambari server failed to open port 8080

more *
LOG: database system was interrupted; last known up at 2020-01-22 23:31:37 UTC
LOG: redo starts at 39/C7000080
LOG: consistent recovery state reached at 39/C70474A8
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
LOG: could not open file "pg_xlog/000000010000003A00000023" (log file 58, segment 35): No such file or directory
LOG: redo done at 3A/22036568
LOG: last completed transaction was at log time 2020-01-30 10:41:43.937312+00
FATAL: the database system is starting up
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress
WARNING: there is already a transaction in progress

Michael-Bronson

Re: postgresql + ambari server failed to open port 8080

Dear jay

 

we restart the postgreSQL 3 times but ambari still failed on port 8080  ( include the setting ) 

server.startup.web.timeout=150

 

Michael-Bronson

Re: postgresql + ambari server failed to open port 8080

Super Mentor

@mike_bronson7 

Ambari is not listening on port 8080 because before starting to listen on that port it has to be able to connect to the DB successfully.

 

But in your case Postgres itself is not starting successfully that why we see these errors

FATAL: the database system is starting up
LOG: could not open file "pg_xlog/000000010000003A00000023" (log file 58, segment 35): No such file or directory

 

Please consult with your Postgres DB admin to get the Postgres fixed first it should ot be showing those FATAL errors (if those are the latest errors after postgres restart) then that needs to be fixed first.

 

 

 

 

Re: postgresql + ambari server failed to open port 8080

Super Mentor

@mike_bronson7 
Usually Postgres writesinflight data and peristent data files inside the following dir "

/var/lib/pgsql/data/pg_xlog"

 

# ls -lart /var/lib/pgsql/data/pg_xlog

Do you see this file "000000010000003A00000023" there int he above output ...any permission issue .. Or has anyone deleted that file by mistake ?  

 

So the previously mentioned error indicates that Postgres is not starting successfully because of that missing  file.

FATAL: the database system is starting up
LOG: could not open file "pg_xlog/000000010000003A00000023" (log file 58, segment 35): No such file or directory

 

 

 

 

Re: postgresql + ambari server failed to open port 8080

yes I add permissions to the file

 

seems the permissions added successfully 

 

and the fresh  log is like that

 


LOG: shutting down
LOG: database system is shut down
LOG: database system was shut down at 2020-01-30 14:23:23 UTC
LOG: autovacuum launcher started
LOG: database system is ready to accept connections

Michael-Bronson

Re: postgresql + ambari server failed to open port 8080

after I fixed the permissions

 

I restart the PostgreSQL and ambari server

 

 

but still get

 

 


Waiting for server start.................................ERROR: Exiting with exit code -1.
REASON: Ambari Server java process has stopped. Please check the logs for more information.

Michael-Bronson

Re: postgresql + ambari server failed to open port 8080

Super Mentor

@mike_bronson7 

What is the latest error in the "ambari-server.log" ?

Also what is the output of the Test Connection command ?

Re: postgresql + ambari server failed to open port 8080

yes - the same problem 

 

ERROR [main] DBAccessorImpl:119 - Error while creating database accessor
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Michael-Bronson

Re: postgresql + ambari server failed to open port 8080

/usr/jdk64/jdk1.8.0_112/bin/java -cp /var/lib/ambari-server/resources/DBConnectionVerification.jar:/usr/lib/ambari-server/postgresql-9.3-1101-jdbc4.jar org.apache.ambari.server.DBConnectionVerification jdbc:postgresql://`hostname -f`:5432/ambari ambari bigdata org.postgresql.Driver


Connected to DB Successfully!

Michael-Bronson