【发布时间】:2021-04-26 05:01:39
【问题描述】:
我对@987654321@ maven 项目和docker 中的cassandra 有疑问。
我想执行 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 repo,所以你可以很容易地重现错误。
复制步骤:
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
知道如何解决。
附言 我正在使用 mac,这个解决方案也适用于 mac 和 linux。
【问题讨论】:
标签: docker maven spring-data-cassandra spring-boot-starter jrmp