tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy (*$^¨%`£) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MTOMCAT-220) Tomcat does not stop listening to given port
Date Mon, 04 Nov 2013 01:36:17 GMT

    [ https://issues.apache.org/jira/browse/MTOMCAT-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812559#comment-13812559
] 

Olivier Lamy (*$^¨%`£) commented on MTOMCAT-220:
------------------------------------------------

are you triggering shutdown mojo at the end of your integration tests?

> Tomcat 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 (*$^¨%`£)
>             Fix For: moreinfo
>
>
> 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 was sent by Atlassian JIRA
(v6.1#6144)

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


Mime
View raw message