TeamCity plugin doesn't honor proxy settings (502 notresolvable in response to Log in operation)
Hi guys. Can you help me please. I've been trying to log in to TeamCity from my IntelliJ for quite some time but without success. I'm getting "502 notresolvable" instead. Different versions of plugins were tested. 2017.1.47304 (downloaded from our company's TeamCity sever), 2017.2.50574, 2017.2.50909. Looks like something wrong with proxy settings for the plugin or IntelliJ. But the rest of functionality in IDEA works with my current proxy settings for our company, licensing, testing restful services, plugins' downloading. I can even perform the request to TeamCity which fails when it's performed by TeamCity plugin:
But when I try to TeamCity -> Log in then I get this:
After enabling the debug mode for jetbrains.buildServer package I can see the following in the idea logs:
2018-04-05 13:45:40,034 [ 698811] DEBUG - jetbrains.buildServer.XMLRPC - >>> XML-RPC request >>>
2018-04-05 13:45:40,034 [ 698811] DEBUG - jetbrains.buildServer.XMLRPC - <?xml version="1.0"?><methodCall><methodName>RemoteAuthenticationServer.getServerVersion</methodName><params></params></methodCall>
2018-04-05 13:45:40,034 [ 698811] WARN - nt.SimpleHttpConnectionManager - SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or method is using
this connection manager at a time.
2018-04-05 13:45:40,324 [ 699101] DEBUG - jetbrains.buildServer.XMLRPC - Unexpected status code 502 during xml-rpc communication, clearing redirect URL if any
2018-04-05 13:45:40,326 [ 699103] WARN - r.login.BuildServerLoginDialog - Authentication failed: jetbrains.buildServer.xmlrpc.RemoteCallException: Call 'https://teamcity.example.com:8443/RPC2', method 'RemoteAuthenticationServe
r.getServerVersion' failed: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect status code: 502 notresolvable, enable debug to see stacktrace
2018-04-05 13:45:40,326 [ 699103] DEBUG - r.login.BuildServerLoginDialog - Call 'https://teamcity.example.com:8443/RPC2', method 'RemoteAuthenticationServer.getServerVersion' failed: org.apache.xmlrpc.XmlRpcClientException: Serv
er returned incorrect status code: 502 notresolvable
jetbrains.buildServer.xmlrpc.RemoteCallException: Call 'https://teamcity.example.com:8443/RPC2', method 'RemoteAuthenticationServer.getServerVersion' failed: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect stat
us code: 502 notresolvable
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:89)
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.callWithCancelable(AbstractXmlRpcTarget.java:111)
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:64)
at jetbrains.buildServer.serverProxy.ClientXmlRpcExecutorFacade.callXmlRpc(ClientXmlRpcExecutorFacade.java:29)
at jetbrains.buildServer.serverProxy.RemoteBuildServerFacade.checkServerVersion(RemoteBuildServerFacade.java:1283)
at jetbrains.buildServer.serverProxy.RemoteBuildServerFacade.checkPassword(RemoteBuildServerFacade.java:885)
at jetbrains.buildServer.TeamCitySnapshot$7.run(TeamCitySnapshot.java:485)
at jetbrains.buildServer.TeamCityProcessManager.performAction(TeamCityProcessManager.java:116)
at jetbrains.buildServer.TeamCityProcessManager.performAction(TeamCityProcessManager.java:75)
at jetbrains.buildServer.TeamCitySnapshot.authorize(TeamCitySnapshot.java:473)
at jetbrains.buildServer.BuildserverLoginPanel.login(BuildserverLoginPanel.java:210)
at jetbrains.buildServer.login.BuildServerLoginDialog$1.run(BuildServerLoginDialog.java:68)
at jetbrains.buildServer.BuildServerManager$32.run(BuildServerManager.java:1227)
at jetbrains.buildServer.BuildServerManager$31.run(BuildServerManager.java:1207)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect status code: 502 notresolvable
at jetbrains.buildServer.xmlrpc.impl.MyXmlRpcTransport.sendXmlRpc(MyXmlRpcTransport.java:130)
at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
at org.apache.xmlrpc.TCXmlRpcClient$1.execute(TCXmlRpcClient.java:84)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
at jetbrains.buildServer.xmlrpc.impl.CommonsXmlRpcTargetImpl$1.execute(CommonsXmlRpcTargetImpl.java:72)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:85)
... 27 more
2018-04-05 13:45:40,374 [ 699151] INFO - buildServer.BuildServerManager - Authentication error:
jetbrains.buildServer.xmlrpc.RemoteCallException: Call 'https://teamcity.example.com:8443/RPC2', method 'RemoteAuthenticationServer.getServerVersion' failed: org.apache.xmlrpc.XmlRpcClientException: Server returned incorrect status code: 502 notresolvable
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:89)
One of my teammates has this plugin working but as always our settings are completely identical in the area which I've described here. We both have IntelliJ 2017.1.4 171.4694.23 running under 1.8.0_112-release-736-b21. Thanks in advance for your help
请先登录再写评论。
Looks like https://youtrack.jetbrains.com/issue/TW-39898.
Hi Dmitry,
What kind of proxy do you use? Is it requires authentication?
Hi guys,
Thanks for your attention to this
@Vladislav No, the proxy doesn't require authentication. UPDATE: Actually, yes and no. Some urls require authentication and trigger NTLM handshake while the others establish a connection without requesting authentication bythe proxy side
Looks like I have a "solution" to this issue. I think, however, IntelliJ can improve here as well. Yesterday, the first time when I tried different options with proxy settings, I didn't restart my IntelliJ and nothing worked for me. Neither of autodetection w/ and w/o providing the URL for autoproxy configuration, manual setup with different No proxy settings. But then I tried to restart the IDE with autodetection enabled and voila, I've got my IntelliJ connected to TeamCity server. But if it is started with manual setup then again neither of proxy options work without proper restart. Is it expected behaviour? Why "No proxy" is not picked up?