Problem starting web-war on Windows/Docker

102 views
Skip to first unread message

jeff.bar...@gmail.com

unread,
Aug 28, 2015, 8:54:52 AM8/28/15
to Lumify
I am a Lumify newbie. I installed Lumify on Windows/Docker, and I am trying to start web-war. I have completed all of https://github.com/lumifyio/lumify/blob/master/docs/windows-development.md and steps 1-4 of https://github.com/lumifyio/lumify/blob/master/docker/README.md#docker-web-server. On step 5, I receive an error. Do you know what is wrong? The error is as follows :

[root@lumify-dev lumify]# /opt/jetty/bin/jetty.sh start
Starting Jetty: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
2015-08-27 20:49:32.939:INFO::main: Logging initialized @1640ms
2015-08-27 20:49:33.106:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended.
See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2015-08-27 20:49:33.177:INFO::main: Redirecting stderr/stdout to /opt/jetty-dist
ribution-9.2.7.v20150116/logs/2015_08_27.stderrout.log
. . . . . . . . . . . . . . FAILED Thu Aug 27 20:50:29 UTC 2015



The error log, 2015_08_27.stderrout.log is as follows:

2015-08-27 20:49:33.851:INFO:oejs.Server:main: jetty-9.2.7.v20150116
2015-08-27 20:49:33.919:INFO:oejdp.ScanningAppProvider:main: Deployment monitor

[file:/opt/jetty-distribution-9.2.7.v20150116/webapps/] at interval 1
2015-08-27 20:50:46.075:WARN:oejw.WebAppContext:main: Failed startup of context

o.e.j.w.WebAppContext@6a0eb5f3{/,null,null}{/root.war}
java.io.FileNotFoundException: /tmp/jetty-0.0.0.0-8080-root.war-_-any-2885097912

15540936.dir/webapp/libs/PathFinding.js/node_modules/browserify/node_modules/browser-builtins/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js (

No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at org.eclipse.jetty.util.resource.JarResource.copyTo(JarResource.java:238)
        at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:468)
        at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:72)
        at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:468)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:504)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife

Cycle.java:68)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:455)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)
        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:387)
        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.Server.doStart(Server.java:354)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
        at org.eclipse.jetty.start.Main.start(Main.java:817)
        at org.eclipse.jetty.start.Main.main(Main.java:112)
2015-08-27 20:50:46.144:INFO:oejs.ServerConnector:main: Started ServerConnector@

373f9379{HTTP/1.1}{0.0.0.0:8080}
2015-08-27 20:50:47.475:INFO:oejs.ServerConnector:main: Started ServerConnector@

57f221b6{SSL-http/1.1}{0.0.0.0:8443}
2015-08-27 20:50:47.477:INFO:oejs.Server:main: Started @76177ms

Jeremy Turner

unread,
Aug 30, 2015, 9:47:13 PM8/30/15
to Lumify
Hi, 

I'd guess that there was another error along the way before this specific error? I did a build on the same day (Ubuntu\Docker) and had a few npm dependency and node(js)-legacy issues crop up along the way. You may want to check that the web-war build was successful.

Dr. J. Bernardo

unread,
Sep 17, 2015, 3:30:11 PM9/17/15
to Lumify
Jeff,

The Lumify web app has a deep file path, but Windows has a file path maximum limit (MAX_PATH) of 260 characters (see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx). Therefore, avoid the problem as follows:

1. Share %USERPROFILE%\lumify\docker\dev\lumify-dev-persistent with yourself (i.e., owner)

2. Run the following command:
    net use L: "\\%COMPUTERNAME%\Users\%USERNAME%\lumify\docker\dev\lumify-dev-persistent" /persistent:yes

3. Create folder L:\tmp\root\webapp

4. Using 7-Zip or suitable utility, extract the file %USERPROFILE%\lumify\docker\dev\lumify-dev-persistent\opt\jetty\webapps\root.war to L:\tmp\root\webapp

5. In %USERPROFILE%\lumify\docker\dev\lumify-dev-persistent\opt\jetty\webapps, create the file root.xml containing the following:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Required minimal context configuration :                        -->
  <!--  + contextPath                                                  -->
  <!--  + war OR resourceBase                                          -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="contextPath">/</Set>
  <Set name="war"><Property name="jetty.webapps" default="."/>/root.war</Set>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Optional context configuration                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="tempDirectory">/tmp/root</Set>
  <Set name="extractWAR">true</Set>
  <Set name="PersistTempDirectory">true</Set>
  <Set name="copyWebDir">false</Set>
  <Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>

</Configure>


Hope this helps,

J
https://www.linkedin.com/pub/dr-j-bernardo/54/a1a/69


On Friday, August 28, 2015 at 8:54:52 AM UTC-4, jeff.bar...@gmail.com wrote:

jeff.bar...@gmail.com

unread,
Sep 18, 2015, 10:26:35 AM9/18/15
to Lumify
Yes, that solved the problem. Thanks!
Reply all
Reply to author
Forward
0 new messages