更改更新中心连接的读取时间

时间:2016-06-06 08:23:21

标签: sonarqube sonarqube5.1

我们在代理后面使用sonarqube。代理有一个防病毒软件,扫描每个下载和阻止,直到它完全扫描。现在,如果我尝试更新一些大插件,我会得到一个读取超时异常。

如何更改更新中心下载程序的读取超时值? org.sonar.core.util.DefaultHttpDownloader有一个配置设置,但我怎样才能更改该值?

org.sonar.api.utils.SonarException: Fail to download: http://sonarsource.bintray.com/Distribution/sonar-checkstyle-plugin/sonar-checkstyle-plugin-2.4.jar (HTTP proxy: proxy:3128)
    at org.sonar.api.utils.HttpDownloader.failToDownload(HttpDownloader.java:144) ~[sonar-plugin-api-5.1.jar:na]
    at org.sonar.api.utils.HttpDownloader.download(HttpDownloader.java:139) ~[sonar-plugin-api-5.1.jar:na]
    at org.sonar.server.plugins.PluginDownloader.downloadRelease(PluginDownloader.java:134) ~[sonar-server-5.1.jar:na]
    at org.sonar.server.plugins.PluginDownloader.download(PluginDownloader.java:108) ~[sonar-server-5.1.jar:na]
    at org.sonar.server.ui.JRubyFacade.downloadPlugin(JRubyFacade.java:136) [sonar-server-5.1.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
    ...
    at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:363) [jruby-complete-1.7.9.jar:na]
    at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(JavaEmbedUtils.java:143) [jruby-complete-1.7.9.jar:na]
    at org.jruby.rack.DefaultRackApplication.call(DefaultRackApplication.java:64) [jruby-rack-1.1.13.2.jar:na]
    at org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:33) [jruby-rack-1.1.13.2.jar:na]
    at org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66) [jruby-rack-1.1.13.2.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.sonar.server.platform.SecurityServletFilter.doFilter(SecurityServletFilter.java:41) [sonar-server-5.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.sonar.server.platform.MasterServletFilter.doFilter(MasterServletFilter.java:80) [sonar-server-5.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:42) [sonar-server-5.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.sonar.server.user.DatabaseSessionFilter.doFilter(DatabaseSessionFilter.java:36) [sonar-server-5.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.sonar.server.platform.ProfilingFilter.doFilter(ProfilingFilter.java:85) [sonar-server-5.1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:189) [logback-access-1.1.2.jar:na]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.18.jar:8.0.18]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
Caused by: java.net.SocketTimeoutException: Read timed out
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_20]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_20]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_20]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1888) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1883) ~[na:1.8.0_20]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1882) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1455) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) ~[na:1.8.0_20]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[na:1.8.0_20]
    at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:298) ~[sonar-plugin-api-5.1.jar:na]
    at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:255) ~[sonar-plugin-api-5.1.jar:na]
    at com.google.common.io.ByteStreams.copy(ByteStreams.java:116) ~[guava-10.0.1.jar:na]
    at com.google.common.io.Files.copy(Files.java:231) ~[guava-10.0.1.jar:na]
    at org.sonar.api.utils.HttpDownloader.download(HttpDownloader.java:136) ~[sonar-plugin-api-5.1.jar:na]
    ... 367 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_20]
    at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.8.0_20]
    at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.8.0_20]
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[na:1.8.0_20]
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) ~[na:1.8.0_20]
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345) ~[na:1.8.0_20]
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:703) ~[na:1.8.0_20]
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1534) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) ~[na:1.8.0_20]
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2929) ~[na:1.8.0_20]
    at java.net.URLConnection.getContentEncoding(URLConnection.java:523) ~[na:1.8.0_20]
    at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:296) ~[sonar-plugin-api-5.1.jar:na]
    ... 371 common frames omitted

1 个答案:

答案 0 :(得分:1)

当服务器尝试连接到更新中心时,无法自定义超时,但您可以手动安装插件(请参阅http://docs.sonarqube.org/display/SONAR/Update+Center中的手动更新)。