Reynard
Reynard

Reputation: 1102

Fix Intellij Idea download sources Connection Refused to host 127.0.0.1 error

When I try to download sources of a library class pulled by Maven I receive error in Intellij IDEA:

java.rmi.ConnectException: Connection refused to host: 127.0.0.1

Upvotes: 3

Views: 6433

Answers (3)

Mahendren GANESAN
Mahendren GANESAN

Reputation: 41

Yes, Changing JDK for importer works Settings> Build, Execution,Deployment>Build Tools>Maven>Importing Change the "JDK for importer": [from Default to ] installed version of JDK enter image description here

Upvotes: 0

peanut
peanut

Reputation: 21

After setting JDK for the Maven importer to the installed JDK, if you have done the setting and still can not download sources, you may just need to re-open your project.

Upvotes: 2

Reynard
Reynard

Reputation: 1102

UPD (from @Andrey): This might have been fixed in version 2021.1.3

For older versions:

This can be fixed by selecting a proper JDK in your project's Maven Importer setting.

In the project setting go to Build Tools -> Maven -> Importing

Set JDK for importer to the JDK installed on your OS (Not the built-in one)

Try to download sources again - should be working now.

fix download sources connection refused

Upvotes: 18

Related Questions