[JIRA] (JENKINS-38703) [INFO] Deploying artifact not workign with http forwarding proxy

324 views
Skip to first unread message

jordipromotions@gmail.com (JIRA)

unread,
Oct 4, 2016, 10:57:06 a.m.2016-10-04
to jenkinsc...@googlegroups.com
Jordi Redondo created an issue
 
Jenkins / Bug JENKINS-38703
[INFO] Deploying artifact not workign with http forwarding proxy
Issue Type: Bug Bug
Assignee: Eyal Ben Moshe
Components: artifactory-plugin
Created: 2016/Oct/04 2:56 PM
Priority: Minor Minor
Reporter: Jordi Redondo

Hi,

When I use maven integration with Artifactory, I can use artifactory to download dependencies, but in the final step to deploy the artifactory tool it always hangs. In our infrastructure we use an HTTP forwarding proxy to reach the other end point. This HTTP forwarding proxy works well at other aspects of the Jenkins integration, including the download phase where retrieved from Artifactory to Jenkins. In the Deployment phase, it simply ignores the proxy settings and tries to go directly with the respective timeout.

FYI. I have the https_proxy configuration at the env variables, and also at the proxies section of the settings.xml

proxies>
<proxy>
<id>myhttpproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>myhost</host>
<port>8080</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>

[INFO] Artifactory Build Info Recorder: Saving Build Info to '/xxxxxxx1/workspace/target/build-info.json'
[INFO] Deploying artifact: https://xxxxx.xxxx./x.jar
[ERROR] org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed:
java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: xxxxxxx.jar.
Skipping deployment of remaining artifacts (if any) and build info.
at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:287)
at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:108)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:174)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
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.http.conn.HttpHostConnectException: Connection to https://repository.esi.adp.com refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:89)
at org.jfrog.build.client.ArtifactoryHttpClient.execute(ArtifactoryHttpClient.java:199)
at org.jfrog.build.client.ArtifactoryHttpClient.upload(ArtifactoryHttpClient.java:195)
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:579)
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:282)
at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:285)
... 30 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
... 41 more
[ERROR] Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: Error occurred while publishing artifact to Artifactory:

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jordipromotions@gmail.com (JIRA)

unread,
Oct 5, 2016, 3:30:01 a.m.2016-10-05
to jenkinsc...@googlegroups.com
Jordi Redondo commented on Bug JENKINS-38703
 
Re: [INFO] Deploying artifact not workign with http forwarding proxy

Hi,

As I did read different literature about the proxy usage and results on settings.xml, I tried to test under the below three scenarios (once at time). One scenario with HTTP, other with HTTPS and other with HTTPS. The target URL I tried to use from Artifactory it is HTTPS.

proxies>
<proxy>
<id>myhttpproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>myhost</host>
<port>8080</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>

proxies>
<proxy>
<id>myhttpproxy</id>
<active>true</active>

<protocol>https</protocol>


<host>myhost</host>
<port>8080</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>

proxies>


<proxy>
<id>myhttpproxy</id>
<active>true</active>

<protocol>*</protocol>


<host>myhost</host>
<port>8080</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>

One interesting aspect to remark. I tried to inject to artifactory by command line script section at jenkins job, and it works, but if I try from Artifactory plugin, it simply ignores the proxy and tries to artifact directly bypassing the proxy.

jordipromotions@gmail.com (JIRA)

unread,
Oct 5, 2016, 7:45:01 a.m.2016-10-05
to jenkinsc...@googlegroups.com
Jordi Redondo edited a comment on Bug JENKINS-38703
Hi,

As I did read different literature about the proxy usage and results on settings.xml, I tried to test under the below three scenarios (once at time). One scenario with HTTP, other with
HTTP+ HTTPS and other with HTTPS only . The target URL I tried to use from Artifactory it is HTTPS.

jordipromotions@gmail.com (JIRA)

unread,
Oct 10, 2016, 6:17:02 a.m.2016-10-10
to jenkinsc...@googlegroups.com

jordipromotions@gmail.com (JIRA)

unread,
Oct 10, 2016, 6:18:01 a.m.2016-10-10
to jenkinsc...@googlegroups.com

kivancsahici@yahoo.com (JIRA)

unread,
Oct 12, 2016, 9:25:05 a.m.2016-10-12
to jenkinsc...@googlegroups.com
Kıvanç Sahici commented on Bug JENKINS-38703
 
Re: [INFO] Deploying artifact not workign with http forwarding proxy

Hello,

I'm having a very similar issue with proxy. I've tried all possible ways of defining the proxy but Jenkins and/or the Artifactory plugin simply ignores the proxy configuration and throws the following exception.

Caused by: java.net.UnknownHostException: my_binary_repository_hostname: unknown error
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1255)
	at java.net.InetAddress.getAllByName(InetAddress.java:1171)
	at java.net.InetAddress.getAllByName(InetAddress.java:1105)
	at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
	at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:89)
	at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:136)
	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.verifyCompatibleArtifactoryVersion(ArtifactoryBuildInfoClient.java:298)

jordipromotions@gmail.com (JIRA)

unread,
Oct 13, 2016, 1:39:01 p.m.2016-10-13
to jenkinsc...@googlegroups.com

I contacted directly by email to Mr Eyal Ben Moshe (person assigned to the ticket) and his suggestion was to contact directly to jfrog support. That explains the lack of response at this ticket we both have problems. I followed the instructions provided by Mr Eyal Ben Moshe and emailed to sup...@jfrog.com

It is a good idea if you email to sup...@jfrog.com reporting your problem too. If we are more people reporting the same issue, I think it will be in benefits of considering our problem as a real problem.

kivancsahici@yahoo.com (JIRA)

unread,
Oct 14, 2016, 6:04:02 a.m.2016-10-14
to jenkinsc...@googlegroups.com

Honestly, we had already reported this to Jfrog, too.

jordipromotions@gmail.com (JIRA)

unread,
Oct 20, 2016, 7:39:05 a.m.2016-10-20
to jenkinsc...@googlegroups.com

In my internal message exchange with Support form Jfrog I also remarked this is not only to me but other people having the same. I referred to this Jira ticket

kivancsahici@yahoo.com (JIRA)

unread,
Nov 8, 2016, 3:25:02 a.m.2016-11-08
to jenkinsc...@googlegroups.com

kivancsahici@yahoo.com (JIRA)

unread,
Nov 8, 2016, 3:26:01 a.m.2016-11-08
to jenkinsc...@googlegroups.com

kivancsahici@yahoo.com (JIRA)

unread,
Nov 11, 2016, 1:06:01 a.m.2016-11-11
to jenkinsc...@googlegroups.com

Jenkins Artifactory plugin 2.8.1 has been released and the problem has been solved for me

eyalb@jfrog.com (JIRA)

unread,
Nov 11, 2016, 1:47:04 a.m.2016-11-11
to jenkinsc...@googlegroups.com

After upgrading to version 2.8.1 of the Artifactory Plugin, in case there are Artifactory servers that should not be accessed by Jenkins through the proxy, you can check the "Bypass proxy" option for those Artifactory servers in Jenkins Manage.

Reply all
Reply to author
Forward
0 new messages