开发者

解决IDEA Maven下载依赖时报错ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

开发者 https://www.devze.com 2024-08-10 14:51 出处:网络 作者: Ahuuua
目录重要报错信息全部报错日志解决方法总结重要报错信息 2022-09-29 16:35:52,637 [ 41134] ERROR - #org.jetbrains.idea.maven - Cannot reconnect.Java.lang.RuntimeException: Cannot reconnect.
目录
  • 重要报错信息
  • 全部报错日志
  • 解决方法
  • 总结

重要报错信息

2022-09-29 16:35:52,637 [ 41134] ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

Java.lang.RuntimeException: Cannot reconnect.

Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is:

java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:

全部报错日志

2022-09-29 16:35:52,637 [ 41134] ERROR - #org.jetbrains.idea.maven - Cannot reconnect. java.lang.RuntimeException: Cannot reconnect. at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82) at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:526) at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:394) at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:103) at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:62) at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:655) at org.jetbrains.idea.maven.project.MavenProjectsTree.doUpdate(MavenProjectsTree.java:555) at org.jetbrains.idea.maven.project.MavenProjectsTree.doAdd(MavenProjectsTree.java:500) at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:461) at org.jetbrains.idea.maven.project.MavenProjectsTree.updateAll(MavenProjectsTree.java:432) at org.jetbrains.idea.maven.project.MavenProjectsProcessorReadingTask.perform(MavenProjectsProcessorReadingTask.java:60) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:132) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.Access$000(MavenProjectsProcessor.java:32) at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107) at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:449) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:161) at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.jjsava:66) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41) at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$3(MavenServerManager.java:526) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76) ... 20 more Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newS编程客栈ocket(TCPEndpoint.java:619) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.intellij.execution.rmi.RemoteProcessSupport.lambda$acquire$2(RemoteProcessSupport.java:260) at com.intellij.openapi.boCEsOuutil.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66) at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231) at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:258) at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:164) at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:158) ... 24 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.TwoStackjssPlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:211) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613) ... 34 more

解决方法

1.IntelliJ IDEA --> Preferences --> androidBuild,Execution,Deployment --> Build Tools --> Maven --> Importing -->JDK for importer选择我们已经安装的JDK版本

解决IDEA Maven下载依赖时报错ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

如果还未解决,执行下面两个操作

2.maven -> Importing -> VM options for importer

-Xmx768m -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Djava.net.preferIPv4Stack=true

解决IDEA Maven下载依赖时报错ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

3. maven -> Runner -> VM Options

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true -Djava.net.preferIPv4Stack=true

解决IDEA Maven下载依赖时报错ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

这里JRE原本选的是Project JDK,我改成了JAVA_HOME,不知有没影响,最后是成功不报错了。

解决IDEA Maven下载依赖时报错ERROR - #org.jetbrains.idea.maven - Cannot reconnect.

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程客栈(www.devze.com)。

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号