Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327895 - Unable to start Virgo web server after adding maven repository to the provisioning repository
Summary: Unable to start Virgo web server after adding maven repository to the provisi...
Status: CLOSED WONTFIX
Alias: None
Product: Virgo
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 10:30 EDT by Lorie Pisicchio CLA
Modified: 2010-10-19 07:22 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorie Pisicchio CLA 2010-10-15 10:30:51 EDT
Build Identifier: 201003230009

I try to add my local maven repository to the external provisioning repositories for Virgo web server, as described in the documentation (http://www.eclipse.org/virgo/documentation/virgo-documentation-2.1.0.M06-incubation/docs/virgo-user-guide/html/ch11s04.html).
After changing the configuration file, my virgo web server won't start, and I get the message <TC0011E> Failed to start Tomcat. Port 8080 is in use.

If I revert to my previous configuration file, I am able to start and stop the server as many times as I want.

This issue have been first described in this post
http://www.eclipse.org/forums/index.php?t=rview&goto=633159#msg_633159
The post contains a zip file with the configuration files, and the virgo log files.

Reproducible: Always

Steps to Reproduce:
1.Change org.eclipse.virgo.repository.properties file to add local maven repository
2.start the server
Comment 1 Glyn Normington CLA 2010-10-19 06:29:14 EDT
Please note that unzipping the zip files gave warnings, hopefully not an issue.

unzip org.ops4j.zip 
Archive:  org.ops4j.zip
warning [org.ops4j.zip]:  5831 extra bytes at beginning or within zipfile
  (attempting to process anyway)
   creating: ops4j/
   creating: ops4j/pax/
   creating: ops4j/pax/logging/
   creating: ops4j/pax/logging/api/
   creating: ops4j/pax/logging/api/0.9.5/
  inflating: ops4j/pax/logging/api/0.9.5/api-0.9.5.jar  
 extracting: ops4j/pax/logging/api/0.9.5/api-0.9.5.jar.sha1  
   creating: ops4j/pax/logging/service/
   creating: ops4j/pax/logging/service/0.9.5/
  inflating: ops4j/pax/logging/service/0.9.5/service-0.9.5.jar  
 extracting: ops4j/pax/logging/service/0.9.5/service-0.9.5.jar.sha1  
   creating: ops4j/pax/web/
   creating: ops4j/pax/web/pax-web-jsp/
   creating: ops4j/pax/web/pax-web-jsp/0.3.1/
  inflating: ops4j/pax/web/pax-web-jsp/0.3.1/pax-web-jsp-0.3.1.jar  
  inflating: ops4j/pax/web/pax-web-jsp/0.3.1/pax-web-jsp-0.3.1.jar.sha1  
   creating: ops4j/pax/web/pax-web-service/
   creating: ops4j/pax/web/pax-web-service/0.3.1/
  inflating: ops4j/pax/web/pax-web-service/0.3.1/pax-web-service-0.3.1.jar  
  inflating: ops4j/pax/web/pax-web-service/0.3.1/pax-web-service-0.3.1.jar.sha1  
   creating: ops4j/pax/wicket/
   creating: ops4j/pax/wicket/pax-wicket-service/
   creating: ops4j/pax/wicket/pax-wicket-service/0.5.3/
  inflating: ops4j/pax/wicket/pax-wicket-service/0.5.3/pax-wicket-service-0.5.3.jar  
  inflating: ops4j/pax/wicket/pax-wicket-service/0.5.3/pax-wicket-service-0.5.3.jar.sha1


and


unzip /Users/glynnormington/downloads/bug+report.zip 
Archive:  /Users/glynnormington/downloads/bug+report.zip
warning [/Users/glynnormington/downloads/bug+report.zip]:  5831 extra bytes at beginning or within zipfile
  (attempting to process anyway)
   creating: bug report/
  inflating: bug report/failed_start_after_conf_change.log  
  inflating: bug report/org.eclipse.virgo.repository_KO.properties  
  inflating: bug report/org.eclipse.virgo.repository_OK.properties  
  inflating: bug report/successfull_start_and_stop.log
Comment 2 Glyn Normington CLA 2010-10-19 06:33:32 EDT
Reproduce the problem - thanks! - with the following config:

ext.type=external
ext.searchPattern=repository/ext/{artifact}

usr.type=watched
usr.watchDirectory=repository/usr

maven-repo.type=external
maven-repo.searchPattern=/Users/glynnormington/bugs/327895/ops4j/**/{bundle}.jar

chain=ext,usr,maven-repo

where /Users/glynnormington/bugs/327895/ops4j is one of the earlier unzip directories.

Event log:

bin/startup.sh -clean
[2010-10-19 11:31:37.727] startup-tracker              <KE0001I> Kernel starting. 
[2010-10-19 11:31:41.120] startup-tracker              <KE0002I> Kernel started. 
[2010-10-19 11:31:41.241] system-artifacts             <DE0000I> Installing plan 'org.eclipse.virgo.kernel.userregion.springdm' version '2.1.0'. 
[2010-10-19 11:31:41.507] system-artifacts             <DE0000I> Installing bundle 'org.springframework.osgi.core' version '1.2.1'. 
[2010-10-19 11:31:41.591] system-artifacts             <DE0000I> Installing bundle 'org.springframework.osgi.extender' version '1.2.1'. 
[2010-10-19 11:31:41.615] system-artifacts             <DE0000I> Installing bundle 'org.springframework.osgi.io' version '1.2.1'. 
[2010-10-19 11:31:41.635] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.kernel.agent.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:41.656] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.kernel.deployer.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:42.949] system-artifacts             <DE0001I> Installed bundle 'org.springframework.osgi.core' version '1.2.1'. 
[2010-10-19 11:31:42.953] system-artifacts             <DE0001I> Installed bundle 'org.springframework.osgi.extender' version '1.2.1'. 
[2010-10-19 11:31:42.957] system-artifacts             <DE0001I> Installed bundle 'org.springframework.osgi.io' version '1.2.1'. 
[2010-10-19 11:31:42.961] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.kernel.agent.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:42.965] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.kernel.deployer.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:42.969] system-artifacts             <DE0001I> Installed plan 'org.eclipse.virgo.kernel.userregion.springdm' version '2.1.0'. 
[2010-10-19 11:31:42.999] system-artifacts             <DE0004I> Starting plan 'org.eclipse.virgo.kernel.userregion.springdm' version '2.1.0'. 
[2010-10-19 11:31:43.008] system-artifacts             <DE0004I> Starting bundle 'org.springframework.osgi.core' version '1.2.1'. 
[2010-10-19 11:31:43.016] start-signalling-1           <DE0005I> Started bundle 'org.springframework.osgi.core' version '1.2.1'. 
[2010-10-19 11:31:43.024] system-artifacts             <DE0004I> Starting bundle 'org.springframework.osgi.extender' version '1.2.1'. 
[2010-10-19 11:31:43.469] start-signalling-1           <DE0005I> Started bundle 'org.springframework.osgi.extender' version '1.2.1'. 
[2010-10-19 11:31:43.473] system-artifacts             <DE0004I> Starting bundle 'org.springframework.osgi.io' version '1.2.1'. 
[2010-10-19 11:31:43.480] start-signalling-1           <DE0005I> Started bundle 'org.springframework.osgi.io' version '1.2.1'. 
[2010-10-19 11:31:43.484] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.kernel.agent.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.500] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.kernel.agent.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.503] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.kernel.deployer.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.625] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.kernel.deployer.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.629] start-signalling-1           <DE0005I> Started plan 'org.eclipse.virgo.kernel.userregion.springdm' version '2.1.0'. 
[2010-10-19 11:31:43.710] system-artifacts             <DE0000I> Installing plan 'org.eclipse.virgo.web' version '2.1.0'. 
[2010-10-19 11:31:43.747] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.web.core' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:43.819] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.web.tomcat' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:43.842] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.core' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.853] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:43.877] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.tomcat' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:44.358] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.web.core' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:44.362] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.web.tomcat' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:44.366] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.core' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:44.370] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.dm' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:44.374] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.tomcat' version '2.1.0.M06-incubation'. 
[2010-10-19 11:31:44.379] system-artifacts             <DE0001I> Installed plan 'org.eclipse.virgo.web' version '2.1.0'. 
[2010-10-19 11:31:44.407] system-artifacts             <DE0004I> Starting plan 'org.eclipse.virgo.web' version '2.1.0'. 
[2010-10-19 11:31:44.413] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.web.core' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:44.437] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.web.core' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:44.450] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.web.tomcat' version '1.1.0.RC1-incubation'. 
[2010-10-19 11:31:44.894] system-artifacts             <TC0011E> Failed to start Tomcat. Port 8080 is in use. 
[2010-10-19 11:31:44.908] System Bundle Shutdown       <KE0010I> Shutdown initiated.
Comment 3 Glyn Normington CLA 2010-10-19 07:20:33 EDT
The problem is that the PAX web bundles are taking precedence over Virgo's own web infrastructure and listening on port 8080 before embedded Tomcat starts up and finds its port is already in use. I stopped a thread in the debugger in NetUtils where the port in use is detected and used the Equinox console to list the bundles, which included the following:


27	RESOLVED    org.eclipse.virgo.kernel.dmfragment_2.1.0.M06-incubation
	            Master=5
28	ACTIVE      org.ops4j.pax.web.jsp_0.3.1
29	ACTIVE      org.ops4j.pax.web.service_0.3.1
30	ACTIVE      org.springframework.aop_3.0.0.RELEASE
31	ACTIVE      org.springframework.asm_3.0.0.RELEASE
32	ACTIVE      org.springframework.beans_3.0.0.RELEASE
33	ACTIVE      org.springframework.context_3.0.0.RELEASE
34	ACTIVE      org.springframework.core_3.0.0.RELEASE
35	ACTIVE      org.springframework.expression_3.0.0.RELEASE
36	ACTIVE      org.springframework.jdbc_3.0.0.RELEASE
37	ACTIVE      org.springframework.orm_3.0.0.RELEASE
38	ACTIVE      org.springframework.oxm_3.0.0.RELEASE
39	ACTIVE      org.springframework.transaction_3.0.0.RELEASE
40	ACTIVE      org.springframework.web_3.0.0.RELEASE
41	ACTIVE      org.eclipse.gemini.web.core_1.1.0.RC1-incubation
42	STARTING    org.eclipse.gemini.web.tomcat_1.1.0.RC1-incubation
	            Fragments=45
43	RESOLVED    org.eclipse.virgo.web.core_2.1.0.M06-incubation


Bundles 28/29 are the problem ones and removing PAX web from the repository allowed Virgo to start up normally. Given that a Maven repo could contain lots of content which conflicts with Virgo's own dependencies, it's hard to see a general solution to this problem.

For now, I have added a cautionary note to the relevant sections of the User Guide (in commit a289da9b2d86b5a1b9dfc363942dfc35c107ecef on the 2.1.x branch and in commit 09fceb667e (bug 327895: caution the use of Ivy and Maven repositories) on master).
Comment 4 Glyn Normington CLA 2010-10-19 07:22:03 EDT
Sorry, that should have read:

For now, I have added a cautionary note to the relevant sections of the User
Guide (in commit a289da9b2d86b5a1b9dfc363942dfc35c107ecef on the 2.1.x branch
and in commit 09fceb667e97ed52f0fce992b7a0c638e5bc705c on master).