Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

Jeff
I have a new install of Ubuntu Server 13.10 and tomcat7.  Initially I just tried deploying the nexus war with the default install (using OpenJDK) but remembered I had issues previously w/ OpenJDK and also likely needed to make sure the user that tomcat7 runs as (tomcat7) has access to it's default home folder (/usr/share/tomcat7).  When that didn't work, I moved the tomcat7 home folder to /home/tomcat7 and manually created /home/tomcat7/sonatype-work.

However, I still get the same errors I've been seeing.  I am trying to deploy nexux-2.7.0-03.  It seems to deploy and extract to the /var/lib/tomcat7/webapps folder just fine.

Even though it says it's in use, I can't tell why.  I rebooted the box, removed/recreated the folder and still the same error.  Google searches for that error came up empty.

What am I missing?

In the tomcat localhost log file I see the following (snip'd for size):

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not stop Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextDestroyed(NexusBooterListener.java:52)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)


And here is what is in catalina.out:
Nov 27, 2013 1:08:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nexus.war
2013-11-27 13:08:38 INFO  [http-bio-8080-exec-3] - org.sonatype.appcontext.AppContext -
Application context "nexus" dump:
"bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "/var/lib/tomcat7/webapps/nexus/WEB-INF", src: static("bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF"))
"security-xml-file"="/home/tomcat7/sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"application-conf"="/home/tomcat7/sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-app"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"runtime"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${bundleBasedir}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-work"="/home/tomcat7/sonatype-work/nexus" (raw: "${user.home}/sonatype-work/nexus", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
Total of 6 entries.

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/nexus] startup failed due to previous errors

 




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
Reply | Threaded
Open this post in threaded view
|

Re: Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

Peter Lynch-2
Hi Jeff,

Nexus 2.7 now creates a lock file inside of nexus work to prevent concurrent access to that directory by two Nexuses.

Is there a file at /home/tomcat7/sonatype-work/nexus/nexus.lock ?

This must be removed before another Nexus can use that directory. The contents of the file should contain the process id of the nexus that created it.

-Peter


On Wed, Nov 27, 2013 at 4:41 PM, Jeff <[hidden email]> wrote:
I have a new install of Ubuntu Server 13.10 and tomcat7.  Initially I just tried deploying the nexus war with the default install (using OpenJDK) but remembered I had issues previously w/ OpenJDK and also likely needed to make sure the user that tomcat7 runs as (tomcat7) has access to it's default home folder (/usr/share/tomcat7).  When that didn't work, I moved the tomcat7 home folder to /home/tomcat7 and manually created /home/tomcat7/sonatype-work.

However, I still get the same errors I've been seeing.  I am trying to deploy nexux-2.7.0-03.  It seems to deploy and extract to the /var/lib/tomcat7/webapps folder just fine.

Even though it says it's in use, I can't tell why.  I rebooted the box, removed/recreated the folder and still the same error.  Google searches for that error came up empty.

What am I missing?

In the tomcat localhost log file I see the following (snip'd for size):

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not stop Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextDestroyed(NexusBooterListener.java:52)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)


And here is what is in catalina.out:
Nov 27, 2013 1:08:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nexus.war
2013-11-27 13:08:38 INFO  [http-bio-8080-exec-3] - org.sonatype.appcontext.AppContext -
Application context "nexus" dump:
"bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "/var/lib/tomcat7/webapps/nexus/WEB-INF", src: static("bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF"))
"security-xml-file"="/home/tomcat7/sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"application-conf"="/home/tomcat7/sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-app"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"runtime"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${bundleBasedir}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-work"="/home/tomcat7/sonatype-work/nexus" (raw: "${user.home}/sonatype-work/nexus", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
Total of 6 entries.

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/nexus] startup failed due to previous errors

 




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent

Reply | Threaded
Open this post in threaded view
|

Re: Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

Jeff
No, there are no files in the sonatype-work folder...at all.

root@dev:~# cd /home/tomcat7/sonatype-work/
root@dev:/home/tomcat7/sonatype-work# ls -la
total 8
drwxrwxr-x 2 tomcat7 tomcat7 4096 Nov 27 13:00 .
drwxr-xr-x 3 tomcat7 tomcat7 4096 Nov 27 13:00 ..
root@dev:/home/tomcat7/sonatype-work#



On Wed, Nov 27, 2013 at 1:53 PM, Peter Lynch <[hidden email]> wrote:
Hi Jeff,

Nexus 2.7 now creates a lock file inside of nexus work to prevent concurrent access to that directory by two Nexuses.

Is there a file at /home/tomcat7/sonatype-work/nexus/nexus.lock ?

This must be removed before another Nexus can use that directory. The contents of the file should contain the process id of the nexus that created it.

-Peter


On Wed, Nov 27, 2013 at 4:41 PM, Jeff <[hidden email]> wrote:
I have a new install of Ubuntu Server 13.10 and tomcat7.  Initially I just tried deploying the nexus war with the default install (using OpenJDK) but remembered I had issues previously w/ OpenJDK and also likely needed to make sure the user that tomcat7 runs as (tomcat7) has access to it's default home folder (/usr/share/tomcat7).  When that didn't work, I moved the tomcat7 home folder to /home/tomcat7 and manually created /home/tomcat7/sonatype-work.

However, I still get the same errors I've been seeing.  I am trying to deploy nexux-2.7.0-03.  It seems to deploy and extract to the /var/lib/tomcat7/webapps folder just fine.

Even though it says it's in use, I can't tell why.  I rebooted the box, removed/recreated the folder and still the same error.  Google searches for that error came up empty.

What am I missing?

In the tomcat localhost log file I see the following (snip'd for size):

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not stop Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextDestroyed(NexusBooterListener.java:52)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)


And here is what is in catalina.out:
Nov 27, 2013 1:08:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nexus.war
2013-11-27 13:08:38 INFO  [http-bio-8080-exec-3] - org.sonatype.appcontext.AppContext -
Application context "nexus" dump:
"bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "/var/lib/tomcat7/webapps/nexus/WEB-INF", src: static("bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF"))
"security-xml-file"="/home/tomcat7/sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"application-conf"="/home/tomcat7/sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-app"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"runtime"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${bundleBasedir}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-work"="/home/tomcat7/sonatype-work/nexus" (raw: "${user.home}/sonatype-work/nexus", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
Total of 6 entries.

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/nexus] startup failed due to previous errors

 




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
Reply | Threaded
Open this post in threaded view
|

Re: Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

Jason Dillon-3
Can you please try:

mkdir /home/tomcat7/sonatype-work/nexus

and try again, looks like the code is expecting that directory to already exist.

—jason


On November 27, 2013 at 1:26:46 PM, Jeff ([hidden email]) wrote:

No, there are no files in the sonatype-work folder...at all.

root@dev:~# cd /home/tomcat7/sonatype-work/
root@dev:/home/tomcat7/sonatype-work# ls -la
total 8
drwxrwxr-x 2 tomcat7 tomcat7 4096 Nov 27 13:00 .
drwxr-xr-x 3 tomcat7 tomcat7 4096 Nov 27 13:00 ..
root@dev:/home/tomcat7/sonatype-work#



On Wed, Nov 27, 2013 at 1:53 PM, Peter Lynch <[hidden email]> wrote:
Hi Jeff,

Nexus 2.7 now creates a lock file inside of nexus work to prevent concurrent access to that directory by two Nexuses.

Is there a file at /home/tomcat7/sonatype-work/nexus/nexus.lock ?

This must be removed before another Nexus can use that directory. The contents of the file should contain the process id of the nexus that created it.

-Peter


On Wed, Nov 27, 2013 at 4:41 PM, Jeff <[hidden email]> wrote:
I have a new install of Ubuntu Server 13.10 and tomcat7.  Initially I just tried deploying the nexus war with the default install (using OpenJDK) but remembered I had issues previously w/ OpenJDK and also likely needed to make sure the user that tomcat7 runs as (tomcat7) has access to it's default home folder (/usr/share/tomcat7).  When that didn't work, I moved the tomcat7 home folder to /home/tomcat7 and manually created /home/tomcat7/sonatype-work.

However, I still get the same errors I've been seeing.  I am trying to deploy nexux-2.7.0-03.  It seems to deploy and extract to the /var/lib/tomcat7/webapps folder just fine.

Even though it says it's in use, I can't tell why.  I rebooted the box, removed/recreated the folder and still the same error.  Google searches for that error came up empty.

What am I missing?

In the tomcat localhost log file I see the following (snip'd for size):

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not stop Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextDestroyed(NexusBooterListener.java:52)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)


And here is what is in catalina.out:
Nov 27, 2013 1:08:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nexus.war
2013-11-27 13:08:38 INFO  [http-bio-8080-exec-3] - org.sonatype.appcontext.AppContext -
Application context "nexus" dump:
"bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "/var/lib/tomcat7/webapps/nexus/WEB-INF", src: static("bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF"))
"security-xml-file"="/home/tomcat7/sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"application-conf"="/home/tomcat7/sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-app"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"runtime"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${bundleBasedir}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-work"="/home/tomcat7/sonatype-work/nexus" (raw: "${user.home}/sonatype-work/nexus", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
Total of 6 entries.

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/nexus] startup failed due to previous errors

 




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
Reply | Threaded
Open this post in threaded view
|

Re: Can't deploy nexus.war to tomcat7 + oracle_jdk_7u45 + ubuntu_13.10

Jeff
That was it!  Thank you so much!


On Wed, Nov 27, 2013 at 2:43 PM, Jason Dillon <[hidden email]> wrote:
Can you please try:

mkdir /home/tomcat7/sonatype-work/nexus

and try again, looks like the code is expecting that directory to already exist.

—jason


On November 27, 2013 at 1:26:46 PM, Jeff ([hidden email]) wrote:

No, there are no files in the sonatype-work folder...at all.

root@dev:~# cd /home/tomcat7/sonatype-work/
root@dev:/home/tomcat7/sonatype-work# ls -la
total 8
drwxrwxr-x 2 tomcat7 tomcat7 4096 Nov 27 13:00 .
drwxr-xr-x 3 tomcat7 tomcat7 4096 Nov 27 13:00 ..
root@dev:/home/tomcat7/sonatype-work#



On Wed, Nov 27, 2013 at 1:53 PM, Peter Lynch <[hidden email]> wrote:
Hi Jeff,

Nexus 2.7 now creates a lock file inside of nexus work to prevent concurrent access to that directory by two Nexuses.

Is there a file at /home/tomcat7/sonatype-work/nexus/nexus.lock ?

This must be removed before another Nexus can use that directory. The contents of the file should contain the process id of the nexus that created it.

-Peter


On Wed, Nov 27, 2013 at 4:41 PM, Jeff <[hidden email]> wrote:
I have a new install of Ubuntu Server 13.10 and tomcat7.  Initially I just tried deploying the nexus war with the default install (using OpenJDK) but remembered I had issues previously w/ OpenJDK and also likely needed to make sure the user that tomcat7 runs as (tomcat7) has access to it's default home folder (/usr/share/tomcat7).  When that didn't work, I moved the tomcat7 home folder to /home/tomcat7 and manually created /home/tomcat7/sonatype-work.

However, I still get the same errors I've been seeing.  I am trying to deploy nexux-2.7.0-03.  It seems to deploy and extract to the /var/lib/tomcat7/webapps folder just fine.

Even though it says it's in use, I can't tell why.  I rebooted the box, removed/recreated the folder and still the same error.  Google searches for that error came up empty.

What am I missing?

In the tomcat localhost log file I see the following (snip'd for size):

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not stop Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextDestroyed(NexusBooterListener.java:52)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.PlexusContainerContextListener
java.lang.IllegalStateException: Nexus work directory already is use!
        at org.sonatype.nexus.web.PlexusContainerContextListener.contextInitialized(PlexusContainerContextListener.java:79)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusGuiceContextListener
java.lang.NullPointerException
        at org.sonatype.nexus.web.NexusGuiceContextListener.getInjector(NexusGuiceContextListener.java:46)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not find Plexus container in servlet context
        at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
     ...
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not start Nexus
        at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:40)


And here is what is in catalina.out:
Nov 27, 2013 1:08:36 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nexus.war
2013-11-27 13:08:38 INFO  [http-bio-8080-exec-3] - org.sonatype.appcontext.AppContext -
Application context "nexus" dump:
"bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "/var/lib/tomcat7/webapps/nexus/WEB-INF", src: static("bundleBasedir"="/var/lib/tomcat7/webapps/nexus/WEB-INF"))
"security-xml-file"="/home/tomcat7/sonatype-work/nexus/conf/security.xml" (raw: "${nexus-work}/conf/security.xml", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"application-conf"="/home/tomcat7/sonatype-work/nexus/conf" (raw: "${nexus-work}/conf", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-app"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${runtime}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"runtime"="/var/lib/tomcat7/webapps/nexus/WEB-INF" (raw: "${bundleBasedir}", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
"nexus-work"="/home/tomcat7/sonatype-work/nexus" (raw: "${user.home}/sonatype-work/nexus", src: propsFile(/var/lib/tomcat7/webapps/nexus/WEB-INF/plexus.properties))
Total of 6 entries.

Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 27, 2013 1:08:38 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/nexus] startup failed due to previous errors

 




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent



--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent