jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcio Marchini" <mar...@bedarra.com>
Subject RE: Can't have Cactus run on a 2nd Tomcat
Date Thu, 07 Aug 2003 13:37:05 GMT
Hi,

	What I ended up doing was to use serverxml="server.xml" like this:

		    <tomcat4x dir="${tomcat.home}"
		    	port="${tomcat.cactus.local.port}"
		    	serverxml="server.xml"
		        todir="${reports.dir.cactus.tomcat}"/>


	And the "server.xml"looks like this:


<Server port="7005" shutdown="SHUTDOWN" debug="0">
  <Service name="Tomcat-Standalone">
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="7080" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
    <Engine name="Standalone" defaultHost="localhost" debug="0">
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
      <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
      </Host>
    </Engine>
  </Service>
</Server>


	It worked. I guess it is the solution you propose below too.

marcio

| -----Original Message-----
| From: Vincent Massol [mailto:vmassol@pivolis.com] 
| Sent: August 7, 2003 4:59 AM
| To: 'Cactus Users List'
| Cc: marcio@bedarra.com
| Subject: RE: Can't have Cactus run on a 2nd Tomcat
| 
| 
| Hi Marcio,
| 
| Good point. Strangely you are the only one to report this 
| issue and I'm pretty sure some others are running several 
| instances of Tomcat. What version of Tomcat are you using?
| 
| Using an offset is a good idea although there is still a risk 
| of clashing with some other port being used.
| 
| I'll assume you're using the Cactus/Ant integration of 
| 1.5-beta1 and you're using the <cactus> Ant task. If you 
| check the documentation
| (http://jakarta.apache.org/cactus/integration/ant/task_cactus.html)
| you'll see that you can provide your own server.xml file. In 
| that file you full customize your configuration and can 
| specify the ports you wish to use.
| 
| Thanks
| -Vincent
| 
| > -----Original Message-----
| > From: Marcio Marchini [mailto:marcio@bedarra.com]
| > Sent: 29 July 2003 17:46
| > To: cactus-user@jakarta.apache.org
| > Subject: Can't have Cactus run on a 2nd Tomcat
| > 
| > Hi,
| > 
| > 	I have Tomcat running, hosting Anthill as a continuous build
| tool.
| > It's at port 8080, but I can see it is also listening on ports 8005
| and
| > 8009.
| > 
| > 	When I run my Cactus tests, I'd like to have it launch 
| its own Tomcat 
| > for the tests, so I specify port 3080. Problem is, it is giving
| an
| > exception because it wants to install something on port 
| 8005 as well 
| > (which is already used by the 1st Tomcat). Here's the error:
| > 
| >       [cactus] HttpConnector[3080] Starting background thread
| >       [cactus] StandardServer.await: create[8005]:
| java.net.BindException:
| > Address already in use: JVM_Bind
| >       [cactus] java.net.BindException: Address already in use:
| JVM_Bind
| >       [cactus] 	at java.net.PlainSocketImpl.socketBind(Native
| Method)
| >       [cactus] 	at
| > java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
| >       [cactus] 	at
| java.net.ServerSocket.bind(ServerSocket.java:309)
| >       [cactus] 	at
| java.net.ServerSocket.<init>(ServerSocket.java:183)
| >       [cactus] 	at
| > 
| org.apache.catalina.core.StandardServer.await(StandardServer.java:510)
| >       [cactus] 	at
| > org.apache.catalina.startup.Catalina.start(Catalina.java:521)
| >       [cactus] 	at
| > org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
| >       [cactus] 	at
| > org.apache.catalina.startup.Catalina.process(Catalina.java:180)
| >       [cactus] 	at
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native
| > Method)
| >       [cactus] 	at
| >
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
| orImpl.jav
| a:
| > 39
| > )
| >       [cactus] 	at
| >
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
| odAccessor
| Im
| > pl
| > .java:25)
| >       [cactus] 	at
| java.lang.reflect.Method.invoke(Method.java:324)
| >       [cactus] 	at
| > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
| >       [cactus] Stopping service Tomcat-Standalone
| >       [cactus] HttpConnector[3080] Stopping background thread
| > 
| > 
| > 
| > 	So, is there an easy way to specify the full set of port numbers
| to
| > be different ? I mean, what's the point of being able to 
| specify only
| one
| > port ? I was expecting them to work in terms of offsets of 
| each other,
| but
| > clearly I am wrong.
| > 
| > 
| > 	Thanks,
| > 
| > marcio
| > 
| > 
| > 
| ---------------------------------------------------------------------
| > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
| > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
| 
| 
| 


Mime
View raw message