Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP proxy is not used #421

Closed
tpokki opened this issue Aug 5, 2020 · 1 comment
Closed

HTTP proxy is not used #421

tpokki opened this issue Aug 5, 2020 · 1 comment

Comments

@tpokki
Copy link

tpokki commented Aug 5, 2020

Command:

$ mvn -X -s m.xml versions:dependency-updates-report

Settings (m.xml):

<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <proxies>
    <proxy>
      <id>proxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.corporate.com</host>
      <port>8585</port>
      <username></username>
      <password></password>
      <nonProxyHosts></nonProxyHosts>
    </proxy>
  </proxies>
</settings>

Log output (I've enabled http logging on debug level):

[INFO] --- versions-maven-plugin:2.7:dependency-updates-report (default-cli) @ our-project ---

...

[DEBUG]   (f) remotePluginRepositories = [      id: central
      url: https://repo.maven.apache.org/maven2
   layout: default
    proxy: proxy.corporate.com:8585
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => never]

...

[INFO] artifact com.datastax.cassandra:cassandra-driver-core: checking for updates from central
[DEBUG] Connection request: [route: {s}->https://repo.maven.apache.org:443][total kept alive: 0; route allocated: 3 of 20; total allocated: 3 of 40]
[DEBUG] Using proxy proxy.corporate.com:8585 for https://repo.maven.apache.org/maven2
[DEBUG] Connection leased: [id: 4][route: {s}->https://repo.maven.apache.org:443][total kept alive: 0; route allocated: 4 of 20; total allocated: 4 of 40]
[DEBUG] CookieSpec selected: compatibility
[DEBUG] Opening connection {s}->https://repo.maven.apache.org:443
[DEBUG] Connection request: [route: {s}->https://repo.maven.apache.org:443][total kept alive: 0; route allocated: 4 of 20; total allocated: 4 of 40]
[DEBUG] Connecting to repo.maven.apache.org/151.101.84.215:443

The connection timeouts eventually, and the check continues to next dependency.

Netstat shows attempts to connect the maven central directly, and not use the proxy:

[root@50daeb5d60bb /]# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      1 172.17.0.2:40474        151.101.84.215:443      SYN_SENT
tcp        0      1 172.17.0.2:40480        151.101.84.215:443      SYN_SENT
tcp        0      1 172.17.0.2:40478        151.101.84.215:443      SYN_SENT
tcp        0      1 172.17.0.2:40476        151.101.84.215:443      SYN_SENT

We are using the same proxy, and configuration, widely for various other maven builds without issues.

@sellersj
Copy link

I see that your proxy setting you have the http but are contacting a https url.
Try changing the proxy setup to be https.

@tpokki tpokki closed this as completed Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants