Plugin download sporadically fails within IntelliJ

已回答

I'm encountering intermittent plugin download issues in IntelliJ. Initially, I received a “No route to host” error, which led me to suspect an IPv6 problem. I can reproduce this with curl, which fails over IPv6 while IPv4 works:

curl -6 https://plugins.jetbrains.com
# curl: (6) Could not resolve host: plugins.jetbrains.com

I have added the following VM options to IntelliJ:

-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv6Addresses=false

Since then, I no longer see the “No route to host” error, but plugin downloads still fail with a more general message:
Plugin "<some plugin name>" download or installation failed.

I suspect this may be caused by my ISP’s IPv6 implementation. Is there a reliable way to force IntelliJ to use only IPv4 for plugin downloads?

0

Hi Benjamin,

It could be related to https://youtrack.jetbrains.com/issue/IJPL-6044

Please enable additional logging as described in this guide, and add the following categories for tracking:

com.intellij.util.io.HttpRequests:trace
com.intellij.util.proxy.CommonProxy:trace
com.intellij.util.net:trace
com.intellij.ide.plugins.marketplace

Then restart the IDE, collect the log via Help | Show Log in...,upload it to our server at https://uploads.jetbrains.com and share the Upload ID here so that I can analyze it.

0

Hi Arina,

thank you for looking into this. Here is the Upload id: 2026_02_23_cu8749rVfSUgB9rpERxQEC (file: idea.log)

0

Hi Benjamin,

The error is still No route to host:

2026-02-23 09:37:19,991 [  59625]   INFO - #c.i.i.p.m.MarketplaceRequests - Error reading Marketplace file: java.net.NoRouteToHostException: No route to host (file=/home/jotb/.cache/JetBrains/IntelliJIdea2025.3/plugins/imageCache/10080/screenshot_7846350d-4ed5-4aa8-9ea2-537ae9eada1c URL=https://plugins.jetbrains.com/files/10080/screenshot_7846350d-4ed5-4aa8-9ea2-537ae9eada1c)
2026-02-23 09:37:19,991 [  59625]   FINE - #c.i.i.p.m.MarketplaceRequests - No route to host
java.net.NoRouteToHostException: No route to host
    at java.base/sun.nio.ch.Net.pollConnect(Native Method)
    at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:694)
    at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549)
    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
    at java.base/java.net.Socket.connect(Socket.java:751)
    at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
    at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
    at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
    at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
    at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:377)
    at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1302)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1143)
    at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1705)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1629)
    at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:531)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:307)
    at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:641)
    at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:381)
    ...
    at com.intellij.ide.plugins.marketplace.MarketplaceRequests$Companion.readOrUpdateFile(MarketplaceRequests.kt:392)

There isn't an IntelliJ‑specific "IPv4‑only for plugin downloads" switch. The only controls that the IDE has are exactly the JVM flags that you're already using. Beyond that, you have to solve it at the OS / network layer.

On Linux, you can either disable IPv6 system‑wide or prefer IPv4 in gai.conf.

For the first option to take effect: 

  1. Create a /etc/sysctl.d/99-disable-ipv6.conf file and put the following lines in it:
    net.ipv6.conf.all.disable_ipv6 = 1 
    net.ipv6.conf.default.disable_ipv6 = 1
  2. Apply the change with sudo sysctl --system
  3. Reboot, then verify with cat /proc/sys/net/ipv6/conf/all/disable_ipv6 (should print 1)

To make the OS (and subsequently IDE) prefer IPv4, you can:

  1. Edit the gai.conf file: sudoeditor /etc/gai.conf
  2. Uncomment or add: precedence ::ffff:0:0/96  100

    This will make getaddrinfo() prefer IPv4‑mapped addresses when both A and AAAA exist.

0

请先登录再写评论。