You may be attempting to log into the console using the Ambari interface and start Sensage for one of your boxes and connect to an ambari-server database, but the console does not allow a connection on port 8443, so you are unable to connect.
When you check the ambari server logs using
/var/log/ambari-server/ambari-server.out, you get a Severe error message similar to the following:
# cat /var/log/ambari-server/ambari-server.out
[EL Info]: 2021-04-13 09:24:14.301--ServerSession(1137945509)--EclipseLink, version: Eclipse Persistence Services - 2.4.0.v20120608-r11652
[EL Severe]: ejb: 2021-04-13 09:24:14.401--ServerSession(1137945509)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Error Code: 0
- The error message presented above indicates that the Postgres database is not up and running.
- Note that Sensage AP 6.X/20XX.X has two Postgres databases: the
sensage_atpgsqlrunning in port 5432 which runs the OAE database for Sensage itself and the system one running in port 5433 which runs the database for ambari-server.
- To check the status of both these databases, run the following commands:
service postgresql status
service sensage_atpgsql status
- . The first command may yield an error message:
# service postgresql statusThis indicates that the postgres database is not up and running.
postmaster dead but pid file exists
- You can confirm this by running
ambari-server start command. You will get an error message similar to the following:
14:44:09 # ambari-server start
Using python /usr/bin/python2.6
Running initdb: This may take upto a minute.
About to start PostgreSQL
ERROR: Unable to start PostgreSQL server. Exiting
- This issue is caused because the systemwide default PostgreSQL instance may have reverted to the default port which is 5432. Since the internal Sensage PostgreSQL is designed to use this default port, it blocks the systemwide Postgres instance from running on this occupied port.
- The systemwide default PostgreSQL instance is used by Sensage to hold the ambari-server database needs to be configured to run on port 5433.
- To accomplish this, you can either:
- Go to the
/etc/init.d/postgresqlfile and in
PGPORTsetting set the port to 5433 and start the service by issuing the following command:
service postgresql restart, or
- You can configure
PGPORTsetting to 5433 as follows and then restart the Postgres server:
echo "PGPORT=5433" > /etc/sysconfig/pgsql/postgresqlservice
- Go to the
The systemwide Postgres database service will resume normal functioning. If these steps do not solve your issue, please contact support.
Please sign in to leave a comment.