Can't connect to Repository behind Proxy

Hello everyone,

I searched already the forum and found a few topics related to this, but none of these solved my problem.

I try to connect to a repository, which is behind a proxy. In IntelliJ it works fine with the Proxy settings.

I tried already setting git Proxy settings globally and in side the jvmoptions.

The following Errorlog is shown:

[2019-07-12 15:29:56,104] INFO or-5 @coroutine#1063 tion.TestConnectionServiceImpl - TestConnection failed for __test_connection_workspace__:: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://user.user@git-partner.infonova.com:29418/xxxxxx/xxx/bundle/xx-2018.git: Connection timed out: connect jetbrains.buildServer.vcs.VcsException: List remote refs failed: org.eclipse.jgit.errors.TransportException: ssh://user.user@git-partner.infonova.com:29418/xxxxxx/xxx/bundle/xx-2018.git: Connection timed out: connect at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:185) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:488) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$getCurrentState$0(GitVcsSupport.java:181) at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:177) at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.checkFetchConnection(TestConnectionCommand.java:95) at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.testConnection(TestConnectionCommand.java:68) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$testConnection$2(GitVcsSupport.java:319) at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:316) at jetbrains.vcs.api.services.impl.TestConnectionServiceProvider$1.testConnection(TestConnectionServiceProvider.java:32) at jetbrains.vcs.server.core.impl.testConnection.TestConnectionServiceImpl.testConnection(TestConnectionServiceImpl.java:45) at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.testConnection(TestConnectionController.java:93) at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.test(TestConnectionController.java:64) at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.access$000(TestConnectionController.java:22) at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController$1.testConnection(TestConnectionController.java:47) at com.jetbrains.upsource.backend.cli.vcs.TestConnectionService.testConnection(TestConnectionService.java:30) at com.jetbrains.upsource.backend.cli.vcs.VcsServiceRPCCommandFactory$getTestVcsConnectionCommand$1.execute(VcsServiceRPCCommandFactory.kt:90) at com.jetbrains.upsource.backend.cli.vcs.VcsServiceRPCCommandFactory$getTestVcsConnectionCommand$1.execute(VcsServiceRPCCommandFactory.kt:83) at com.jetbrains.upsource.messaging.rpc.impl.server.RpcTaskRunnable.executeCommand(RpcTaskRunnable.kt:80) at com.jetbrains.upsource.messaging.rpc.impl.server.RpcTaskRunnable.run(RpcTaskRunnable.kt:47) at com.jetbrains.upsource.messaging.rpc.impl.server.RpcServiceExecutorImpl$submitRequest$1.invokeSuspend(RpcServiceExecutorImpl.kt:87) at com.jetbrains.upsource.messaging.rpc.impl.server.RpcServiceExecutorImpl$submitRequest$1.invoke(RpcServiceExecutorImpl.kt) at com.jetbrains.upsource.stats.StatsCompanionKt$dispatchWithStats$1$1.invokeSuspend(StatsCompanion.kt:165) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)

2
2 comments
Avatar
Permanently deleted user

I'm having the same problem. Enabling debug logging makes it look like the connection is tried through IdeaWideProxySelector which doesn't respect JVM proxy options so everything goes direct

0

Having the same issue:

the HTTPS_PROXY env variables (and all variants) dont seem to be considered

also tried to tweak conf/upsource-frontend/upsource-frontend.jvmoptions, didnt work either

 

jetbrains.buildServer.vcs.VcsException: List remote refs failed: java.net.ConnectException: Connection refused (Connection refused) mygit.repo.server.com
at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:185)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:488)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$getCurrentState$0(GitVcsSupport.java:181)
at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentState(GitVcsSupport.java:177)
at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.checkFetchConnection(TestConnectionCommand.java:95)
at jetbrains.buildServer.buildTriggers.vcs.git.TestConnectionCommand.testConnection(TestConnectionCommand.java:68)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.lambda$testConnection$2(GitVcsSupport.java:319)
at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.testConnection(GitVcsSupport.java:316)
at jetbrains.vcs.api.services.impl.TestConnectionServiceProvider$1.testConnection(TestConnectionServiceProvider.java:32)
at jetbrains.vcs.server.core.impl.testConnection.TestConnectionServiceImpl.testConnection(TestConnectionServiceImpl.java:45)
at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.testConnection(TestConnectionController.java:93)
at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.test(TestConnectionController.java:64)
at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController.access$000(TestConnectionController.java:22)
at com.jetbrains.upsource.backend.cli.vcs.service.TestConnectionController$1.testConnection(TestConnectionController.java:47)
at com.jetbrains.upsource.backend.cli.vcs.TestConnectionService.testConnection(TestConnectionService.java:30)
at com.jetbrains.upsource.backend.cli.vcs.VcsServiceRPCCommandFactory$getTestVcsConnectionCommand$1.execute(VcsServiceRPCCommandFactory.kt:90)
at com.jetbrains.upsource.backend.cli.vcs.VcsServiceRPCCommandFactory$getTestVcsConnectionCommand$1.execute(VcsServiceRPCCommandFactory.kt:83)
at com.jetbrains.upsource.messaging.rpc.impl.server.RpcTaskRunnable.executeCommand(RpcTaskRunnable.kt:80)
at com.jetbrains.upsource.messaging.rpc.impl.server.RpcTaskRunnable.run(RpcTaskRunnable.kt:47)
at com.jetbrains.upsource.messaging.rpc.impl.server.RpcServiceExecutorImpl$submitRequest$1.invokeSuspend(RpcServiceExecutorImpl.kt:87)
at com.jetbrains.upsource.messaging.rpc.impl.server.RpcServiceExecutorImpl$submitRequest$1.invoke(RpcServiceExecutorImpl.kt)
at com.jetbrains.upsource.stats.StatsCompanionKt$dispatchWithStats$1$1.invokeSuspend(StatsCompanion.kt:165)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)
at java.lang.Thread.run(Thread.java:748)

Caused by: org.eclipse.jgit.errors.TransportException: https://mygit.repo.server.com/scm/mcl/java.blueprint.git: cannot open git-upload-pack
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:530)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:315)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:506)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getRemoteRefs(GitVcsSupport.java:483)

... 28 more

Caused by: java.net.ConnectException: Connection refused (Connection refused) mygit.repo.server.com
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:175)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:481)

... 31 more

0

Please sign in to leave a comment.