tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aivaras Ruzveltas (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MTOMCAT-220) Tomcat is does not stop listening to given port
Date Thu, 18 Apr 2013 13:57:15 GMT
Aivaras Ruzveltas created MTOMCAT-220:
-----------------------------------------

             Summary: Tomcat is does not stop listening to given port
                 Key: MTOMCAT-220
                 URL: https://issues.apache.org/jira/browse/MTOMCAT-220
             Project: Apache Tomcat Maven Plugin
          Issue Type: Bug
          Components: tomcat7
    Affects Versions: 2.1
         Environment: java 7; maven 3.0.5; ubuntu 12.10 (quantal) 64-bit
            Reporter: Aivaras Ruzveltas
            Assignee: Olivier Lamy (*$^¨%`£)


We have a multimodule Maven project containing many WAR applications:
.
├── Parent
├── ChildWar1
├── ChildWar2
└── ...
We want to run integration tests for all of those WAR modules. But after Tomcat is shutdown
(shutdown MOJO at post-integration-test) first module, main JVM keeps listening to specified
port (lsof -i TCP:18082) and when Tomcat is being started for second WAR module it fails with
output:

[INFO] --- tomcat7-maven-plugin:2.1:run-war-only (start-tomcat7) @ ChildWar2 ---
[INFO] Running war on http://localhost:18082/ChildWar2
[INFO] Creating Tomcat server configuration at /somedir/ChildWar2/target/tomcat
[INFO] create webapp with contextPath: /ChildWar2
Apr 18, 2013 4:36:02 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-18082"]
Apr 18, 2013 4:36:02 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-18082"]
java.net.BindException: Address already in use <null>:18082
	at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:610)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:429)
	at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:981)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:814)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
	at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1091)
	at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:512)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.net.BindException: Address already in use
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:406)
	at java.net.ServerSocket.bind(ServerSocket.java:387)
	at java.net.ServerSocket.<init>(ServerSocket.java:248)
	at java.net.ServerSocket.<init>(ServerSocket.java:192)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
	at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:393)
	... 34 more


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message