replication via proxy

39 views
Skip to first unread message

Валерий Хохлов

unread,
Jan 15, 2018, 9:35:22 AM1/15/18
to Repo and Gerrit Discussion
What settings are needed for replication via HTTP proxy?
I add:
[http]
    proxy
= http://proxy.example.com:3128
[https]
    proxy
= http://proxy.example.com:3128
    sslVerify
= false
in gerrit.config, but its not working.
org.eclipse.jgit.errors.TransportException: https://bitbucket.org/.../gerrit.git: cannot open git-upload-pack
Caused by: java.net.UnknownHostException: bitbucket.org

Also this error:
[plugin-manager-preloader] ERROR com.googlesource.gerrit.plugins.manager.OnStartStop : Cannot access plugins list at this time
java
.util.concurrent.ExecutionException: java.net.UnknownHostException: gerrit-ci.gerritforge.com
Caused by: java.net.UnknownHostException: gerrit-ci.gerritforge.com

Sven Selberg

unread,
Jan 16, 2018, 2:06:11 AM1/16/18
to Repo and Gerrit Discussion
Hi,

(I'm going to assume that "proxy.example.com" is an example and not what you actually used.)
You could try to give the proxy variables directly to the JVM:

[container]
    javaOptions = ... -Dhttp.proxyHost=... -Dhttp.proxyPort=... -Dhttps.proxyHost=... -Dhttps.proxyPort=... -Dhttps.nonProxyHosts="localhost|*.my-company.com|..."  -Dhttp.nonProxyHosts="localhost|*.my-company.com|..."

/Sven

Валерий Хохлов

unread,
Jan 16, 2018, 6:27:56 AM1/16/18
to Repo and Gerrit Discussion
Hi,
(I'm going to assume that "proxy.example.com" is an example and not what you actually used.)
Yes it is

I tried your advice.

Run:
/usr/bin/java -Dhttp.proxyHost="proxy.example.com" -Dhttp.proxyPort="3128" -Dhttp.nonProxyHosts="localhost|*.example.com" -Dhttps.proxyHost="proxy.example.com" -Dhttps.proxyPort="3128" -Dhttps.nonProxyHosts="localhost|*.example.com" -Xmx1024m -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit

and get error:
org.eclipse.jgit.errors.TransportException: https://bitbucket.org/.../gerrit.git: cannot open git-upload-pack
Caused by: java.net.UnknownHostException: "proxy.example.com" -Dhttps.proxyPort="3128" -Dhttps.nonProxyHosts="localhost|*.example.com"

Валерий Хохлов

unread,
Jan 16, 2018, 7:03:00 AM1/16/18
to Repo and Gerrit Discussion
Then i tried run:
/usr/bin/java -Dhttp.proxyPort="3128" -Dhttp.nonProxyHosts="localhost|*.example.com" -Dhttp.proxyHost="proxy.example.com" -Dhttps.proxyPort="3128" -Dhttps.nonProxyHosts="localhost|*.example.com" -Dhttps.proxyHost="proxy.example.com-Xmx1024m -jar /var/gerrit/bin/gerrit.war daemon -/var/gerrit

and get old erorrs

вторник, 16 января 2018 г., 14:27:56 UTC+3 пользователь Валерий Хохлов написал:
Reply all
Reply to author
Forward
0 new messages