Intellij IDEA 2017.1.5 安装插件时连接超时

Intellij IDEA 2017.1.5 connection times out during plugin installation

我的 IDE 有问题。它不想更新或安装任何插件(但它允许我注册我的许可证并浏览每个插件)。它给我一个通知:

Connection failed (Read timed out). Please check network connection and try again

我查看了一个日志文件,这里有什么:

> 2017-07-12 19:32:41,687 [ 653407]   INFO -
> .script.IdeScriptEngineManager - javax.script.ScriptEngineManager
> initialized in 2327 ms  2017-07-12 19:33:50,610 [ 722330]   WARN -
> Settings.impl.PluginDownloader - Cannot download
> 'https://plugins.jetbrains.com/pluginManager/?action=download&id=Lombook+Plugin&build=IU-171.4694.70&uuid=52f34c2e-c3bf-400b-a1c7-d11cc4fdb02b':
> Read timed out  java.io.IOException: Cannot download
> 'https://plugins.jetbrains.com/pluginManager/?action=download&id=Lombook+Plugin&build=IU-171.4694.70&uuid=52f34c2e-c3bf-400b-a1c7-d11cc4fdb02b':
> Read timed out    at
> com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:363)
>   at
> com.intellij.openapi.updateSettings.impl.PluginDownloader.process(PluginDownloader.java:245)
>   at
> com.intellij.openapi.updateSettings.impl.PluginDownloader.process(PluginDownloader.java:242)
>   at
> com.intellij.util.io.HttpRequests.lambda$doProcess[=10=](HttpRequests.java:420)
>   at
> com.intellij.util.net.ssl.CertificateManager.runWithUntrustedCertificateStrategy(CertificateManager.java:349)
>   at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:420)
>   at com.intellij.util.io.HttpRequests.process(HttpRequests.java:395)
>   at com.intellij.util.io.HttpRequests.access0(HttpRequests.java:61)
>   at
> com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:263)
>   at
> com.intellij.openapi.updateSettings.impl.PluginDownloader.a(PluginDownloader.java:242)
>   at
> com.intellij.openapi.updateSettings.impl.PluginDownloader.prepareToInstall(PluginDownloader.java:142)
>   at
> com.intellij.ide.plugins.PluginInstaller.a(PluginInstaller.java:239)
>   at
> com.intellij.ide.plugins.PluginInstaller.a(PluginInstaller.java:131)
>   at
> com.intellij.ide.plugins.PluginInstaller.prepareToInstall(PluginInstaller.java:70)
>   at
> com.intellij.ide.plugins.PluginManagerMain.run(PluginManagerMain.java:431)
>   at
> com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
>   at
> com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
>   at
> com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
>   at
> com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
>   at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
>   at
> com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
>   at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:137)
>   at
> com.intellij.openapi.application.impl.ApplicationImpl.run(ApplicationImpl.java:334)
>   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.net.SocketTimeoutException: Read timed out   at
> java.net.SocketInputStream.socketRead0(Native Method)     at
> java.net.SocketInputStream.socketRead(SocketInputStream.java:116)     at
> java.net.SocketInputStream.read(SocketInputStream.java:170)   at
> java.net.SocketInputStream.read(SocketInputStream.java:141)   at
> sun.security.ssl.InputRecord.readFully(InputRecord.java:465)  at
> sun.security.ssl.InputRecord.read(InputRecord.java:503)   at
> sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)     at
> sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
>   at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)    at
> java.io.BufferedInputStream.fill(BufferedInputStream.java:246)    at
> java.io.BufferedInputStream.read1(BufferedInputStream.java:286)   at
> java.io.BufferedInputStream.read(BufferedInputStream.java:345)    at
> sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)  at
> sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)    at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
>   at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
>   at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
>   at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
>   at
> com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:511)
>   at com.intellij.util.io.HttpRequests.access0(HttpRequests.java:61)
>   at
> com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:289)
>   at
> com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:298)
>   at
> com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:359)
>   ... 27 more

有没有人遇到类似的问题,知道怎么解决的?

张贴 CrazyCoder 的评论作为答案,因为它对我也有用。


解决方法是在外观和行为→系统设置→更新[=25]中取消选中使用安全连接选项=] 设置部分 window:

设置--外观&行为--系统设置--更新--使用安全连接(不勾选) enter image description here

运行 在 IntelliJ 2020.3 中遇到同样的问题。原来 IntelliJ 的默认代理设置是“无代理”。我把它设置为自动检测,问题就解决了。如果您在防火墙后面(例如公司环境),请检查此项。

检查您是否使用 VPN。这可能会导致连接出现问题。 关闭 VPN 可能会有帮助。