Fix Intellij Idea download sources Connection Refused to host 127.0.0.1 error

Viewed 2417

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
2 Answers

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

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.

Related