2 Replies Latest reply on Jul 17, 2014 3:58 PM by saeedma RSS
    mikei Newbie

    Cannot deploy Thingworx WAR on Ubuntu as non-root

    <p>When attempting to start Tomcat 7, the following error is returned with the stacktrace:<div><div>INFO: Deploying web application archive /usr/share/tomcat7/webapps/Thingworx.war</div><div>java.lang.NullPointerException</div><div>        at com.thingworx.entities.EntityReference.&lt;init&gt;(EntityReference.java:33)</div><div>        at com.thingworx.system.ThingWorxServer.checkDefaultPermissions(ThingWorxServer.java:263)</div><div>        at com.thingworx.system.ThingWorxServer.Initialize(ThingWorxServer.java:74)</div><div>        at com.thingworx.system.ThingWorxBootstrapper.contextInitialized(ThingWorxBootstrapper.java:115)</div><div>        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)</div><div>        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)</div><div>        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)</div><div>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)</div><div>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)</div><div>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)</div><div>        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)</div><div>        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)</div><div>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)</div><div>        at java.util.concurrent.FutureTask.run(FutureTask.java:262)</div><div>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)</div><div>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)</div><div>        at java.lang.Thread.run(Thread.java:745)</div></div><div><br></div><div>This does not happen when I attempt to start Tomcat as root.  The /ThingworxStorage and /ThingworxBackupStorage directories both exist and have open permissions.  In fact, after starting Tomcat as the non-root user, the /ThingworxStorage folder successfully is populated with all of its files and folders.</div><div><br></div><div>I am attempting to start Tomcat as the user "tomcat" in the user group "tomcat".  Here is some additional info:</div>h3. <span style="font-weight: normal;">== /etc/lsb-release ==<br></span><span style="font-weight: normal;">DISTRIB_ID=Ubuntu<br></span><span style="font-weight: normal;">DISTRIB_RELEASE=14.04<br></span><span style="font-weight: normal;">DISTRIB_CODENAME=trusty<br></span><span style="font-weight: normal;">DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"<br></span><span style="font-weight: normal;"><o:p> <br></o:p></span><span style="font-weight: normal;">== /ThingworxStorage ==<br></span><span style="font-weight: normal;">total 24<br></span><span style="font-weight: normal;">drwxrwxrwx 8 root   root  

    4096 Jul 17 15:29 <span style="background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">.<br><o:p></o:p></span></span><span style="font-weight: normal;">drwxr-xr-x 4 root   root  

    4096 Jul 17 02:45 ..<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 certificates<br></span><span style="font-weight: normal;">drwxr-xr-x 3 tomcat tomcat 4096 Jul 17 15:29 database<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 exports<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 extensions<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 logs<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 repository<br></span><span style="font-weight: normal;"><o:p> <br></o:p></span><span style="font-weight: normal;">== /ThingworxBackupStorage ==<br></span><span style="font-weight: normal;">drwxrwxrwx 3 root   root  

    4096 Jul 17 15:29 <span style="background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">.<br><o:p></o:p></span></span><span style="font-weight: normal;">drwxr-xr-x 4 root   root  

    4096 Jul 17 02:45 ..<br></span><span style="font-weight: normal;">drwxr-xr-x 2 tomcat tomcat 4096 Jul 17 15:29 backups<br></span><span style="font-weight: normal;"><o:p> </o:p></span>

    <div><span style="font-weight: normal;"><o:p>Please let me know if you need any additional information.  Thanks for your help!</o:p></span></div><div><span style="font-weight: normal;"><o:p><br></o:p></span></div><div><span style="font-weight: normal;"><o:p>Regards,</o:p></span></div><div><span style="font-weight: normal;"><o:p>Mike Intravaia</o:p></span></div><div><p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

     

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

     

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

    <p class="MsoNormal"><o:p></o:p></p>

     

     

     

    <p class="MsoNormal"><o:p></o:p></p>

     

     

     

     

     

    </div></p>