Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 455499

Summary: Orion fails to start on port - error with logs
Product: [ECD] Orion Reporter: Paul Webster <pwebster>
Component: ServerAssignee: Paul Webster <pwebster>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
failure logs none

Description Paul Webster CLA 2014-12-17 09:55:58 EST
I fired up orion with a new workspace and new user content location (different locations).  The server failed to start complaining that it couldn't write to a file:


!ENTRY org.eclipse.equinox.app 4 0 2014-12-17 09:53:38.059
!MESSAGE Error starting Jetty on port: 8000
!STACK 0
java.lang.Exception: Error starting Jetty on port: 8000
	at org.eclipse.orion.server.jetty.WebApplication.start(WebApplication.java:117)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
	at java.lang.Thread.run(Thread.java:744)
Caused by: org.osgi.service.cm.ConfigurationException: org.eclipse.equinox.http.jetty.JettyConfigurator.MasterJetty : Cannot write log directory /opt/users/pwebster/orion/orion-content/.metadata/access_logs
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager.updated(HttpServerManager.java:114)
	at org.eclipse.equinox.http.jetty.internal.Activator.startServer(Activator.java:225)
	at org.eclipse.equinox.http.jetty.JettyConfigurator.startServer(JettyConfigurator.java:45)
	at org.eclipse.orion.server.jetty.WebApplication.start(WebApplication.java:115)
	... 3 more
Caused by: java.io.IOException: Cannot write log directory /opt/users/pwebster/orion/orion-content/.metadata/access_logs
	at org.eclipse.jetty.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:219)
	at org.eclipse.jetty.util.RolloverFileOutputStream.<init>(RolloverFileOutputStream.java:166)
	at org.eclipse.jetty.server.NCSARequestLog.doStart(NCSARequestLog.java:663)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:166)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
	at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
	at org.eclipse.jetty.server.Server.doStart(Server.java:282)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager.updated(HttpServerManager.java:112)
	... 6 more
Comment 1 Paul Webster CLA 2014-12-17 09:56:54 EST
Created attachment 249498 [details]
failure logs
Comment 2 Paul Webster CLA 2014-12-17 10:01:54 EST
It's a problem in org.eclipse.orion.server.jettycustomizer.OrionJettyCustomizer

It assumes that the org.eclipse.orion.server.core.OrionConfiguration.getRootLocation() is the OSGi instance location, and that's not true.

PW
Comment 3 Paul Webster CLA 2014-12-17 10:02:27 EST
Better to use org.eclipse.orion.server.core.OrionConfiguration.getPlatformLocation()

PW