Ubuntu 12.04 マシンの Jetty サーバーでサーバーおよびクライアント アプリケーションを実行しようとしています。サーバーは問題なく起動し、次のコマンドを使用しました
$ mvn jetty:実行
このコマンドを発行すると、最初の行は
アドレス: 8787 でトランスポート dt_socket をリッスンしています
しかし、クライアントを起動すると、次のエラーが発生しました
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Aborted
transport dt_socket と関係があるようです。それが何であるか、クライアントに別のアドレスを使用する方法がわかりませんか?
編集 1
クライアントの pom.xml からの jetty-maven-plugin は次のようになります
<build>
<plugins>
<!-- Specific jetty-maven-plugin configuration for running Jetty during
development. None of its goals are run in a normal build lifecycle. -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<webAppConfig>
<contextPath>/</contextPath>
<extraClasspath>${basedir}/src/test/resources/</extraClasspath>
</webAppConfig>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>${servlet.port}</port>
<host>0.0.0.0</host>
</connector>
</connectors>
<reload>manual</reload>
<useTestClasspath>true</useTestClasspath>
</configuration>
</plugin>
</plugins>
</build>
私の推測では、Jetty がデバッグ モードで起動し、既にサーバーのデバッガーにバインドされているポート 8787 でデバッガーをアタッチしようとしていると考えられます。