Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari server + REASON: Server not yet listening on http port 8080 after 50 seconds. Exiting.

avatar


hi all


what could be the reason that sometimes we get - REASON: Server not yet listening on http port 8080
when we start the ambari server
and sometimes its start successfully ?

 


ambari-server start
Using python /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start............................................................
DB configs consistency check: no errors and warnings were found.
ERROR: Exiting with exit code 1.
REASON: Server not yet listening on http port 8080 after 50 seconds. Exiting.

 

# ambari-server start
Using python /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start.......................................
Server started listening on 8080

DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@mike_bronson7 

A good explanation for some delay is mentioned in JIRA AMBARI-20220:

The ambari-server start and ambari-server restart commands are currently hard coded to wait a maximum of 50 seconds for the Jetty server to bind to port 8080 (or whatever the configured port is).
Under normal circumstances, this value should be fine. However, since Jetty loads classes from views, the more views which are installed increases the total load time before Jetty binds to the server port.
There could be few other reasons like a slightly high system resource utilisation when ambari was restarting could also cause little delay in opening the ambari api port.

So you should try the following to fix this:

- Edit the "/etc/ambari-server/conf/ambari.properties" and increase the following property value to 120 or 150 seconds.

server.startup.web.timeout=120

- Then restart the ambari-server again.

# ambari-server restart

Reference:
1. https://issues.apache.org/jira/browse/AMBARI-20220
2. https://community.cloudera.com/t5/Support-Questions/change-the-port-for-ambari-server/m-p/214911#M17...

 

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@mike_bronson7 

A good explanation for some delay is mentioned in JIRA AMBARI-20220:

The ambari-server start and ambari-server restart commands are currently hard coded to wait a maximum of 50 seconds for the Jetty server to bind to port 8080 (or whatever the configured port is).
Under normal circumstances, this value should be fine. However, since Jetty loads classes from views, the more views which are installed increases the total load time before Jetty binds to the server port.
There could be few other reasons like a slightly high system resource utilisation when ambari was restarting could also cause little delay in opening the ambari api port.

So you should try the following to fix this:

- Edit the "/etc/ambari-server/conf/ambari.properties" and increase the following property value to 120 or 150 seconds.

server.startup.web.timeout=120

- Then restart the ambari-server again.

# ambari-server restart

Reference:
1. https://issues.apache.org/jira/browse/AMBARI-20220
2. https://community.cloudera.com/t5/Support-Questions/change-the-port-for-ambari-server/m-p/214911#M17...

 

avatar