[OPENIDM-4905] Querying info/ping returns 503 UnavailableException: Servlet not initialized Created: 17/Dec/15  Updated: 10/Nov/16  Resolved: 10/Nov/16

Status: Closed
Project: OpenIDM
Component/s: Module - Info and Health
Affects Version/s: OpenIDM 4.0.0
Fix Version/s: OpenIDM 5.0.0

Type: Bug Priority: Major
Reporter: Gary Williams Assignee: andi
Resolution: Fixed Votes: 0
Labels: release-notes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to OPENIDM-4110 Multiple servlets map to path stacktr... Closed

 Description   

Starting OpenIDM wait for "OpenIDM ready" and then query info/ping sometimes get a 503 from Jetty which causes IDM not to be available afterwards.

20151217 12:18:01.201 - INFO - /external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openidm_self_registration/openidm/startup.sh

20151217 12:18:01.210 - DEBUG - Looking for "OpenIDM ready" in stdout
20151217 12:18:01.210 - DEBUG - "OpenIDM ready" not found in stdout, waiting for 5 sec
20151217 12:18:06.215 - DEBUG - Looking for "OpenIDM ready" in stdout
20151217 12:18:06.216 - DEBUG - "OpenIDM ready" not found in stdout, waiting for 5 sec
20151217 12:18:11.221 - DEBUG - Looking for "OpenIDM ready" in stdout
20151217 12:18:11.221 - DEBUG - Substring "OpenIDM ready" found 1 times in string "Executing /external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openidm_self_registration/openidm/startup.sh...
Using OPENIDM_HOME:   /external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openidm_self_registration/openidm
Using PROJECT_HOME:   /external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openidm_self_registration/openidm
Using OPENIDM_OPTS:   -Xmx1024m -Xms1024m
Using LOGGING_CONFIG: -Djava.util.logging.config.file=/external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openidm_self_registration/openidm/conf/logging.properties
Using boot properties at /external/testuser/jenkins/workspace/IDM-Stress-Tests-Managed-Users-Registration/results/20151217-121735/idm/ManUsersSelfRegistration/openi
[...]"
20151217 12:18:11.221 - INFO - Ping http://cantal.internal.forgerock.com:8080/openidm/info/ping
20151217 12:18:11.222 - INFO - Headers {'content-type': 'application/json', 'X-OpenIDM-Password': 'openidm-admin', 'X-OpenIDM-Username': 'openidm-admin'}
20151217 12:18:11.223 - INFO - Starting new HTTP connection (1): cantal.internal.forgerock.com
20151217 12:18:11.254 - DEBUG - "GET /openidm/info/ping HTTP/1.1" 503 2235
20151217 12:18:11.255 - INFO - Result = <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 503 Service Unavailable</title>
</head>
<body><h2>HTTP ERROR 503</h2>
<p>Problem accessing /openidm/info/ping. Reason:
<pre>    Service Unavailable</pre></p><h3>Caused by:</h3><pre>javax.servlet.UnavailableException: Servlet not initialized
	at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:761)
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:748)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:267)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:497)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
</pre>
<hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>


 Comments   
Comment by Laurent Bristiel [X] (Inactive) [ 17/Dec/15 ]

I face this issue in the automated functional tests as well.
Maybe this could be fixed/analysed while working on OPENIDM-4110
(which I hope we do at the start of 4.1 release)

Comment by Laurent Bristiel [X] (Inactive) [ 25/Oct/16 ]

This problem did not appear for a while.
Was certainly fixed in some refactoring done on startup.

Comment by Lana Frost [ 10/Nov/16 ]

Reopen to add to release notes

Generated at Thu Aug 22 01:54:17 BST 2019 using Jira 7.13.5#713005-sha1:8d78f1047b9cca7d35d4d13f706b37e27d869e07.