You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@edgent.apache.org by Dale LaBossiere <dm...@gmail.com> on 2017/07/31 20:23:37 UTC

maven: DevelopmentProvider console not working

Hi Chris,

With the latest PR-309 content (31July) the Edgent console isn’t working.

In case it wasn’t previously understood, the Edgent app developer/user must not be required to do anything special for the console to work.
i.e., the app should only need to declare a dependency on the DevelopmentProvider and it’s embedded jetty server / app should “just work”.

Add an slf4j runtime implementation dependency to the sample/pom.xml in order to see problems that are encountered on startup.

    <dependency>
      <!-- the SLF4J implementation to use -->
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.7.12</version>
      <scope>runtime</scope>
    </dependency>

Then run the DevelopmentSample app from say Eclipse (same thing happens if an uber-jar is generated and used from the cmd line):

Jul 31, 2017 4:07:27 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @500ms
Jul 31, 2017 4:07:27 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.3.6.v20151106
Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started o.e.j.s.ServletContextHandler@5e5792a0{/jobs,null,AVAILABLE}
Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started o.e.j.s.ServletContextHandler@26653222{/metrics,null,AVAILABLE}
Jul 31, 2017 4:07:28 PM org.eclipse.jetty.webapp.WebInfConfiguration getCanonicalNameForWebAppTmpDir
WARNING: Can't generate resourceBase as part of webapp tmp dir name: java.lang.IllegalStateException: No resourceBase or war set for context
Jul 31, 2017 4:07:28 PM org.eclipse.jetty.webapp.WebAppContext doStart
WARNING: Failed startup of context o.e.j.w.WebAppContext@3532ec19{/console,null,null}
java.lang.IllegalStateException: No resourceBase or war set for context
	at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:406)
	at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:72)
	at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:480)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:516)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:405)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:372)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.apache.edgent.console.server.HttpServer.startServer(HttpServer.java:108)
	at org.apache.edgent.providers.development.DevelopmentProvider.<init>(DevelopmentProvider.java:95)
	at org.apache.edgent.samples.topology.DevelopmentSample.main(DevelopmentSample.java:33)

Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@4f970963{HTTP/1.1,[http/1.1]}{0.0.0.0:59881}
Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.Server doStart
INFO: Started @820ms
http://localhost:59881/console
.................................



With that I guess it’s no surprise that opening that URL yields:

HTTP ERROR: 503

Problem accessing /console/. Reason:

    Service Unavailable

Powered by Jetty:// 9.3.6.v20151106 <http://eclipse.org/jetty>

Re: maven: DevelopmentProvider console not working

Posted by Christofer Dutz <ch...@c-ware.de>.
I’ll look into this next week.

Right now I just added some really small changes:
1. Moved the toolchain support (Testing Java7 with Java7) into a separate Profile as I think It’s a bad idea to require Java 7 for building. Having just setup my new Mac I had to notice, that it is no longer as easy to obtain a Java 7 SDK as it was in the past. This way everything can be built with Java 8 and the results should be the same, but to be on the safe side we can enable native Java 7 testing at will by enabling the “toolchain” profile
2. I started re-writing the DEVELOPMENT.md and some of the other text files to reflect latest changes.

Haven’t committed those changes however … just wanted to let you know I’m on it ;-)

Chris



Am 31.07.17, 22:23 schrieb "Dale LaBossiere" <dm...@gmail.com>:

    Hi Chris,
    
    With the latest PR-309 content (31July) the Edgent console isn’t working.
    
    In case it wasn’t previously understood, the Edgent app developer/user must not be required to do anything special for the console to work.
    i.e., the app should only need to declare a dependency on the DevelopmentProvider and it’s embedded jetty server / app should “just work”.
    
    Add an slf4j runtime implementation dependency to the sample/pom.xml in order to see problems that are encountered on startup.
    
        <dependency>
          <!-- the SLF4J implementation to use -->
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-jdk14</artifactId>
          <version>1.7.12</version>
          <scope>runtime</scope>
        </dependency>
    
    Then run the DevelopmentSample app from say Eclipse (same thing happens if an uber-jar is generated and used from the cmd line):
    
    Jul 31, 2017 4:07:27 PM org.eclipse.jetty.util.log.Log initialized
    INFO: Logging initialized @500ms
    Jul 31, 2017 4:07:27 PM org.eclipse.jetty.server.Server doStart
    INFO: jetty-9.3.6.v20151106
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.handler.ContextHandler doStart
    INFO: Started o.e.j.s.ServletContextHandler@5e5792a0{/jobs,null,AVAILABLE}
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.handler.ContextHandler doStart
    INFO: Started o.e.j.s.ServletContextHandler@26653222{/metrics,null,AVAILABLE}
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.webapp.WebInfConfiguration getCanonicalNameForWebAppTmpDir
    WARNING: Can't generate resourceBase as part of webapp tmp dir name: java.lang.IllegalStateException: No resourceBase or war set for context
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.webapp.WebAppContext doStart
    WARNING: Failed startup of context o.e.j.w.WebAppContext@3532ec19{/console,null,null}
    java.lang.IllegalStateException: No resourceBase or war set for context
    	at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:406)
    	at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:72)
    	at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:480)
    	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:516)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.server.Server.start(Server.java:405)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
    	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:372)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.apache.edgent.console.server.HttpServer.startServer(HttpServer.java:108)
    	at org.apache.edgent.providers.development.DevelopmentProvider.<init>(DevelopmentProvider.java:95)
    	at org.apache.edgent.samples.topology.DevelopmentSample.main(DevelopmentSample.java:33)
    
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.AbstractConnector doStart
    INFO: Started ServerConnector@4f970963{HTTP/1.1,[http/1.1]}{0.0.0.0:59881}
    Jul 31, 2017 4:07:28 PM org.eclipse.jetty.server.Server doStart
    INFO: Started @820ms
    http://localhost:59881/console
    .................................
    
    
    
    With that I guess it’s no surprise that opening that URL yields:
    
    HTTP ERROR: 503
    
    Problem accessing /console/. Reason:
    
        Service Unavailable
    
    Powered by Jetty:// 9.3.6.v20151106 <http://eclipse.org/jetty>