西南证券开户

Idea 导入 maven 项目,出现 Connection refused to host: 127.0.0.1

发布于 前天 11:31
阅读 185
收藏 0

精选30+云产品,助力企业轻松上云!>>> 西南证券开户

idea 导入maven 项目之后 点击 Add as Maven project 出现错误提醒

西南证券开户查看 idea 日志 出现如下 错误日志

2020-07-24 11:00:04,808 [ 773055]  ERROR - j.ide.plugins.newui.PluginLogo - IntelliJ IDEA 2019.1  Build #IU-191.6183.87 
2020-07-24 11:00:04,808 [ 773055]  ERROR - j.ide.plugins.newui.PluginLogo - JDK: 1.8.0_202-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-07-24 11:00:04,808 [ 773055]  ERROR - j.ide.plugins.newui.PluginLogo - OS: Windows 10 
2020-07-24 11:00:04,813 [ 773060]  ERROR - j.ide.plugins.newui.PluginLogo - Last Action: Maven.AddFileAsMavenProject 
2020-07-24 11:00:05,274 [ 773521]  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:404)
	at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:399)
	at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:108)
	at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:67)
	at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:665)
	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:61)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:135)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32)
	at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:109)
	at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:458)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	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:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
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:169)
	at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:74)
	at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
	at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$3(MavenServerManager.java:404)
	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.newSocket(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:338)
	at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:112)
	at com.intellij.execution.rmi.RemoteProcessSupport.lambda$acquire$2(RemoteProcessSupport.java:245)
	at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
	at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:227)
	at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:243)
	at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:149)
	at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:166)
	... 24 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.TwoStacksPlainSocketImpl.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)

运行版本为 idea 2019.1 maven 3.5.4 java 8

西南证券开户网上有些人提醒说 去掉 :: 1 加上 127.0.0.1 localhost  都没能解决问题

hosts 文件内容

networks 文件内容

就很奇怪,不知道为什么会出现这样的问题

加载中
0
S

西南证券开户为啥要这样破解呢?大把的激活码,新的激活方式根本不需要改host文件

这是一只小小鸟
重装后,想排除干扰因素,idea maven 都是新下载安装的
这是一只小小鸟
我还没破解呢
0
狐扯

看下maven配置文件是否配置了本地maven私服,如果配置了看下本地maven私服是否开启了;

如果不是以上问题,就看下导入的项目的pom文件是否配置了本地maven私服,然后本地又没有启动maven私服的

狐扯
回复 : 如果不是这个问题估计就是网络问题,是不是本地有网络代理或者开启了ipv6之类的
狐扯
回复 : 没有配置nexus吗?你贴一下pom.xml?
这是一只小小鸟
你说的是 nexus 吗?就配置了一个 阿里镜像
0
这是一只小小鸟
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

 

狐扯
这样应该不是maven配置的问题,网络问题不太懂:scream:
0
Soutv

西南证券开户maven不大对劲,mvn -v看一下正常不正常,可以试试把mvn仓库里的文件清空,或者重装一个maven试试

这是一只小小鸟
控制台下面 mvn -v 没有问题,在idea 的编译器下,mvn -v 显示没有命令
0
这是一只小小鸟

Idea 开始下 jar 包了 ....

做了很多操作...

hosts 增加 127.0.0.1 localhost 配置  去掉 ::1 项的值(百度说的都是这个)

给 Java 添加 Maven 库的 https 证书

maven 运行的虚拟机增加参数 

西南证券开户maven -> importing VM options 设置如下参数

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

  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

西南证券开户不知道是哪一步出效果的,反正是下下来了,感觉是 ipv6 的问题,我最后一步的操作是 添加

-Djava.net.preferIPv4Stack=true

 

返回顶部
顶部
发现配资网 五金股票新闻网 环保投资网 99挖财宝 知识之窗网 葫芦岛新闻网 诊股健康网