Using the log file isn't 100% reliable.

Would recommend looking at the bin/jetty.sh that comes with the jetty-home
tarball.

https://github.com/eclipse/jetty.project/blob/jetty-9.4.27.v20200227/jetty-home/src/main/resources/bin/jetty.sh

It uses the org.eclipse.jetty.util.component.FileNoticeLifeCycleListener
(started via the etc/jetty-started.xml) to know the state of the startup of
Jetty.

https://github.com/eclipse/jetty.project/blob/jetty-9.4.27.v20200227/jetty-util/src/main/java/org/eclipse/jetty/util/component/FileNoticeLifeCycleListener.java
https://github.com/eclipse/jetty.project/blob/jetty-9.4.27.v20200227/jetty-home/src/main/resources/etc/jetty-started.xml

Joakim Erdfelt / [email protected]


On Tue, Apr 7, 2020 at 5:52 PM Yicheng Wang <[email protected]>
wrote:

> Hi team,
>
> We integrate Jetty as a component of our system, and there's another
> component which would monitor and operate Jetty. The monitoring component
> would use jetty.sh to start/stop Jetty. And it looks for Jetty process and
> periodically requests ack from the web app that Jetty starts to check the
> liveness of Jetty. Besides, we're using the built-in logging module from
> Jetty to capture the stdout/stderr. For now the trace level is set to INFO
>
> We've been observing that under some cases the monitoring component is
> complaining that Jetty doesn't start up successfully. Looking at the
> Jetty's
> log, I do see the log entries corresponding to the failed startup. But
> there're 2 things that I cannot understand
>
> 1. The logs of the failed startup seems "incomplete" compared with a normal
> one.
> 2. The Jetty is not stopped before the failed startup.
>
> What's the root cause here? Or how can I add extra debug information to
> help
> troubleshoot this? Any help is highly appreciated!
>
> Best,
> Yicheng
>
>
> FYI, I attach the logs here. It contains the failed startup trial and the
> one before it.
>
> 2020-04-05 19:21:18.500:INFO:oejs.Server:main: jetty-9.4.26.v20200117;
> built: 2020-01-17T12:35:33.676Z; git:
> 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 1.8.0_232-b09
> 2020-04-05 19:21:18.534:INFO:oejdp.ScanningAppProvider:main: Deployment
> monitor [file:/some path] at interval 1
> 2020-04-05 19:21:18.891:INFO:oejw.StandardDescriptorProcessor:main: NO JSP
> Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
> 2020-04-05 19:21:18.933:WARN:oejs.SecurityHandler:main:
> [email protected]@704921a5{WebApp,/,file:/some
> path,STARTING}{some war file} has uncovered http methods for path: /*
> 2020-04-05 19:21:19.875:INFO:oejsh.ContextHandler:main: Started
> o.e.j.w.WebAppContext@704921a5{WebApp,/,file:/some path,AVAILABLE}{some
> war
> file}
> 2020-04-05 19:21:19.875:INFO:oejs.session:main: DefaultSessionIdManager
> workerName=node0
> 2020-04-05 19:21:19.876:INFO:oejs.session:main: node0 Scavenging every
> 600000ms
> 2020-04-05 19:21:20.262:INFO:oejus.SslContextFactory:main:
> x509=X509@3967e60c(1,h=[],w=[]) for
> Server@7c0c77c7[provider=null,keyStore=file:/some
> keystore,trustStore=file:/some keystore]
> 2020-04-05 19:21:20.359:INFO:oejs.AbstractConnector:main: Started
> ServerConnector@7ce3cb8e{SSL,[ssl, http/1.1]}{0.0.0.0:32450}
> 2020-04-05 19:21:20.360:INFO:oejs.Server:main: Started @3034ms
>
> 2020-04-05 19:30:34.566:INFO:oejs.Server:main: jetty-9.4.26.v20200117;
> built: 2020-01-17T12:35:33.676Z; git:
> 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 1.8.0_232-b09
> 2020-04-05 19:30:34.603:INFO:oejdp.ScanningAppProvider:main: Deployment
> monitor [file:/some path] at interval 1
> 2020-04-05 19:30:34.987:INFO:oejw.StandardDescriptorProcessor:main: NO JSP
> Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
> 2020-04-05 19:30:35.022:WARN:oejs.SecurityHandler:main:
> [email protected]@704921a5{WebApp,/,file:/some
> path,STARTING}{some war file} has uncovered http methods for path: /*
> 2020-04-05 19:30:36.033:INFO:oejsh.ContextHandler:main: Started
> o.e.j.w.WebAppContext@704921a5{WebApp,/,file:/some path,AVAILABLE}{some
> war
> file}
> 2020-04-05 19:30:36.035:INFO:oejs.session:main: DefaultSessionIdManager
> workerName=node0
> 2020-04-05 19:30:36.037:INFO:oejs.session:main: node0 Scavenging every
> 600000ms
>
>
>
>
> --
> Sent from: http://jetty.4.x6.nabble.com/Jetty-User-f3247280.html
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to