springboot
maven
プロジェクトとcassandra
で問題が発生していdocker
ます。実行mvn verify
しpre-integration-test
て cassandra docker と api サーバーを起動し、テストを実行しpost-integration-test
てからサーバーを停止したいのですが、エラーに直面していますCould not contact Spring Boot application: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment;
github
エラーを簡単に再現できるようにレポを作成しました。
再現手順:
git clone https://github.com/gandra/docker-cassandra-with-initial-seed.git
cd docker-cassandra-with-initial-seed
mvn verify
これにより、次のようなエラーが発生します。
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.2.RELEASE:start (api-server-start) @ docker-cassandra-with-initial-seed ---
[INFO] Attaching agents: []
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.501 s
[INFO] Finished at: 2021-01-21T18:39:05+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:start (api-server-start) on project docker-cassandra-with-initial-seed: Could not contact Spring Boot application: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[ERROR] java.io.EOFException]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
修正方法はありません。
ps私はMacで作業していますが、このソリューションはMacとLinuxでも機能します。