When I use jenkins-cli.jar install-plugin 'name:0.0.1', Jenkins hits the configured updates site using the proxy configured in /var/lib/jenkins/proxy.xml. However, when I replace the 'shortname:ver' with a URL, it tries to reach out directly to the URL, bypassing the proxy.
Listing this as a blocker, as it blocks our ability to use automation for plugin management.
# java -jar /usr/lib/jenkins/jenkins-cli.jar -logger FINESTĀ -auth LDAP_USER:LDAP_PASS -s http://localhost:8080 install-plugin https://updates.jenkins.io/download/plugins/checkmarx/8.70.0/checkmarx.hpi Jul 27, 2020 10:29:19 PM hudson.cli.CLI _main FINE: using connection mode HTTP Jul 27, 2020 10:29:20 PM hudson.cli.CLI plainHttpConnection FINE: Trying to connect to http://localhost:8080/ via plain protocol over HTTP Jul 27, 2020 10:29:21 PM hudson.cli.FullDuplexHttpStream <init> FINE: establishing download side Jul 27, 2020 10:29:23 PM hudson.cli.FullDuplexHttpStream <init> FINE: established download side Jul 27, 2020 10:29:23 PM hudson.cli.FullDuplexHttpStream <init> FINE: establishing upload side Jul 27, 2020 10:29:23 PM hudson.cli.FullDuplexHttpStream <init> FINE: established upload side Jul 27, 2020 10:29:23 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 99 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDOUT Installing a plugin from https://updates.jenkins.io/download/plugins/checkmarx/8.70.0/checkmarx.hpiJul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 1 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDOUT Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 1 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 77 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR ERROR: Unexpected exception occurred while performing install-plugin command.Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 1 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 8192 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:681) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) at java.net.URL.openStream(URL.java:1068) at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1456) at hudson.cli.InstallPluginCommand.run(InstallPluginCommand.java:110) at hudson.cli.CLICommand.main(CLICommand.java:249) at hudson.cli.CLIAction$ServerSideImpl.run(CLIAction.java:277) at hudson.cli.CLIAction$PlainCliEndpointResponse$1.run(CLIAction.java:308) at jenkins.util.FullDuplexHttpService.download(FullDuplexHttpService.java:115) at jenkins.util.FullDuplexHttpService$Response.generateResponse(FullDuplexHttpService.java:175) at org.kohsuke.stapler.HttpResponseRenderer$Default.handleHttpResponse(HttpResponseRenderer.java:124) at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:69) at org.kohsuke.stapler.Function.renderResponse(Function.java:164) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:705) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:113) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at hudson.cli.CliCrumbExclusion.process(CliCrumbExclusion.java:47) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:127) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.success(BasicHeaderProcessor.java:139) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:82) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:500) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpCoJul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 973 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR nnection.onFillable(HttpConnection.java:273) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) at java.lang.Thread.run(Thread.java:748)Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 1 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with STDERR Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: read frame length 4 Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$EitherSide handle FINEST: handling frame with EXIT Jul 27, 2020 10:29:24 PM hudson.cli.PlainCLIProtocol$FramedReader run FINEST: reading frame
- duplicates
-
JENKINS-58248 CLI command install-plugin does not take Proxy configuration into account
- Open