Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69368

Github Plugin does not respect proxy setting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • Jenkins version: 2.346.2
      Github-plugin version: 1.34.4, 1.34.5, 1.35
      http_proxy, https_proxy: set
      JAVA_OPTS: proxy setting applied
      OS: Debian 11 in Docker container

      We are using Jenkins in an enterprise environment that requires using a proxy server to connect to our github server.

      Scanning the repo fails with:

      java.net.UnknownHostException: github.example.com: Name or service not known    
      at java.base/java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)    
      at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)    
      at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)    
      at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)    
      at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)    
      at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1368)    
      at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)    
      at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49)    
      at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164)    
      at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129)    
      at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71)    
      at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205)    
      at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)    
      at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)    
      at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)    
      at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)    
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)    
      at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)    
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)    
      at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)    
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)    
      at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)    
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)    
      at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$UnexpectedException.lambda$static$0(ObsoleteUrlFactory.java:1365)    
      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)    
      at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)    
      at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)    
      at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponse(ObsoleteUrlFactory.java:671)    
      at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponseCode(ObsoleteUrlFactory.java:702)    
      at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getResponseCode(ObsoleteUrlFactory.java:1064)    
      at org.kohsuke.github.internal.GitHubConnectorHttpConnectorAdapter.send(GitHubConnectorHttpConnectorAdapter.java:87)    
      at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:384) 

      Using the script console with

      InetAddress dnsInetAddress = InetAddress.getByName 'github.example.com'
      //print IP address
      println dnsInetAddress.hostAddress
      

      also fails.

      But the Git plugin works just fine. Also using curl github.example.com works as expected.
      So for me it looks, like the proxy setting is not properly respected. Or maybe it would be respected, but the previous lookup fails, b/c that's not possible with the proxy and the plugin terminates at that point.

      Maybe someone could clarify that?

            lanwen Kirill Merkushev
            benedikt_g_13 Benedikt Geiger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: