Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Why does Jetty server restart an application?
Why does Jetty server restart an application? [message #1804805] Mon, 01 April 2019 09:58 Go to next message
Eclipse UserFriend
Greetings.

I have encountered some strange Jetty server's behavior that I can't explain. My application is running, then in the middle of long and somehow resource-consuming operation, it seems to interrupt (without any special messages in the log), and after a while I can see it's being redeployed.

Here comes the log fragment:

2019-02-21 09:00:07.365 [import-xml-1] DEBUG ru.it.p321.service.ImportRegistryManagerImpl - Skip updating BO 976224=f13cb37be80085ad44e240dd8ebf9d05
2019-02-21 09:00:07.378 [import-xml-4] DEBUG ru.it.p321.service.ImportRegistryServiceImpl - [XML Data Import] file VO_RRMSPSV_0000_9965_20181113_c121856e-2753-4535-85de-49a629b28242.xml has UTF-8 encoding
2019-02-21 09:00:07.404 [import-xml-1] DEBUG ru.it.p321.service.ImportRegistryManagerImpl - Skip updating BO 976226=676e77c4e2293e2cd0168e7cbf7d2123
2019-02-21 09:00:36.095 [main] INFO com.jcabi.manifests.Manifests - #load(): 128 attribs loaded from 396 URL(s) in 489ms: ["Agent-Class", "Ant-Version", "Application-Library-Allowable-Codebase", "Application-Name", "Archiver-Version", "Automatic-Module-Name", "Bnd-LastModified", "Build-Commit", "Build-Id", "Build-Jdk", "Build-Tag", "Build-Time", "Build-TimeStamp", "Build-Timestamp", "Build-Version", "BuildInfo-Host", "BuildInfo-Revision", "BuildInfo-Timestamp", "BuildInfo-URL", "BuildInfo-User", "Built-At", "Built-By", "Built-On", "Bundle-ActivationPolicy", "Bundle-Activator", "Bundle-Category", "Bundle-ClassPath", "Bundle-Classpath", "Bundle-Copyright", "Bundle-Description", "Bundle-DocURL", "Bundle-License", "Bundle-Localization", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-RequiredExecutionEnvironment", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Caller-Allowable-Codebase", "Can-Redefine-Classes", "Can-Retransform-Classes", "Class-Path", "Codebase", "Copyright-Notice", "Created-By", "DynamicImport-Package", "Eclipse-BuddyPolicy", "Eclipse-SourceReferences", "Embed-Dependency", "Export-Package", "Export-Service", "Extension-Name", "Extension-name", "Git-Revision", "Git-Url", "HK2-Class-Path-Id", "Ignore-Package", "Implementation-Build", "Implementation-Build-Date", "Implementation-Build-Id", "Implementation-Title", "Implementation-URL", "Implementation-Url", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "JCabi-Build", "JCabi-Version", "Java-Vendor", "Java-Version", "Karaf-Info", "License", "Liquibase-Package", "Main-Class", "Main-class", "Major-Version", "Manifest-Version", "Maven-Version", "Multi-Release", "Name", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Package", "Permissions", "Premain-Class", "Private-Package", "Probe-Provider-XML-File-Names", "Project-Name", "Provide-Capability", "Release-Designation", "Release-Version", "Require-Capability", "SCM-Revision", "SVN-Revision", "SVN-URL", "Scm-Connection", "Scm-Revision", "Scm-Url", "Sealed", "Solar-Version", "Specification-Title", "Specification-Vendor", "Specification-Version", "Terracotta-Description", "Terracotta-Name", "Terracotta-ProjectStatus", "Time-Zone-Database-Version", "Tool", "Trusted-Library", "UNO-Type-Path", "URL", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "artifactId", "groupId", "mode", "p321-Container-Profile", "p321-Implementation-Build", "p321-Implementation-Build-Time", "p321-Implementation-Version", "probe-provider-class-names", "url", "version"]
2019-02-21 09:00:36.915 [main] INFO com.jcabi.aspects.aj.MethodValidator - JSR-303 validator

The last message from the application is at 09:00:07.404, then no logging at all untill at 09:00:36.095 we can see redeploy beginning. Usually Jetty would restart the application if any of its' artifacts were changed, but this is not the case.
Can anyone suggest what would be the reasons for such behavior? Any help would be appreciated.

We're using embedded Jetty 9.2.10, jdk 8 update 191.
Re: Why does Jetty server restart an application? [message #1804997 is a reply to message #1804805] Thu, 04 April 2019 08:27 Go to previous messageGo to next message
Eclipse UserFriend
For embedded Jetty, you'll likely want to use their community mechanisms: https://www.eclipse.org/jetty/documentation/current/advanced-contributing.html#community .
Re: Why does Jetty server restart an application? [message #1824545 is a reply to message #1804997] Fri, 17 April 2020 07:40 Go to previous messageGo to next message
Eclipse UserFriend
I deploy a web application on Jetty as a war.
Is there a way in which I can restart the currently running application on Jetty programatically?
Is there a Jetty configuration that can achieve this?
Re: Why does Jetty server restart an application? [message #1828869 is a reply to message #1824545] Sat, 20 June 2020 10:09 Go to previous messageGo to next message
Eclipse UserFriend
Say I have a couple of java main classes. I can deploy the application on the server by running the main method using a shell script. Why do we need application servers like tomcat?
Re: Why does Jetty server restart an application? [message #1828874 is a reply to message #1824545] Sat, 20 June 2020 11:59 Go to previous messageGo to next message
Eclipse UserFriend
How are you deploying, and specifically, launching Jetty? And have you checked with the Jetty community?
Re: Why does Jetty server restart an application? [message #1832250 is a reply to message #1828874] Mon, 14 September 2020 06:06 Go to previous message
Eclipse UserFriend


    Use JMX

    Try enabling JMX via the jetty-jmx libs and configuration. Then poking around the options for the contexts or deployers to see if you can use JMX to manage the deployed contexts

    Create your own Server bean to manage the deployment / undeployment of the contexts

    Create your own AppProvider, provided to the DeploymentManager to programmatically control the installed contexts.

Previous Topic:How do I permanently disable smart insert, for all file types, forever?
Next Topic:When I start then eclipse has got a lot of errors.
Goto Forum:
  


Current Time: Sat Jul 05 10:54:39 EDT 2025

Powered by FUDForum. Page generated in 0.04547 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top