Bug 863941 - Jenkins build hang there with an authorized error after git push
Jenkins build hang there with an authorized error after git push
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Dan Mace
libra bugs
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-08 03:02 EDT by Gaoyun Pei
Modified: 2015-05-14 19:00 EDT (History)
3 users (show)

See Also:
Fixed In Version: devenv_2313+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:48:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Jenkins log (5.44 MB, text/x-log)
2012-10-08 04:22 EDT, Xiaoli Tian
no flags Details

  None (edit)
Description Gaoyun Pei 2012-10-08 03:02:52 EDT
Description of problem:
Jenkins build would hang there after using git push to trigger jenkins build.

Version-Release number of selected component (if applicable):
server:devenv_2295
client: built from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209

How reproducible:
Always

Steps to Reproduce:
1. Create an app, and embed jenkins client to it.
2. Do git push to trigger jenkins build.
  
Actual results:
[pei@localhost app3]$ $ git commit -am "test";git push 
Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 450 bytes, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: restart_on_add=false
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://app4-1008.dev.rhcloud.com/job/app3-build
remote: 
remote: Waiting for build to schedule....................................................................................................................................................................................................................................................................................................................^C
Killed by signal 2.

Expected results:
Jenkins build should succeed

Additional info:
Jenkins log:
<--snip-->
Oct 8, 2012 12:56:19 AM hudson.plugins.openshift.OpenShiftCloud provision
SEVERE: Exception caught trying to provision
com.openshift.client.InvalidCredentialsOpenShiftException: Your credentials are not authorized to access "https://localhost/broker/rest/user"
	at com.openshift.internal.client.RestService.request(RestService.java:97)
	at com.openshift.internal.client.RestService.request(RestService.java:89)
	at com.openshift.internal.client.RestService.request(RestService.java:74)
	at com.openshift.internal.client.AbstractOpenShiftResource$ServiceRequest.execute(AbstractOpenShiftResource.java:137)
	at com.openshift.internal.client.APIResource$GetUserRequest.execute(APIResource.java:234)
	at com.openshift.internal.client.APIResource.getUser(APIResource.java:93)
	at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:427)
	at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:227)
	at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
	at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:310)
	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
	at java.util.TimerThread.mainLoop(Timer.java:534)
	at java.util.TimerThread.run(Timer.java:484)
Caused by: com.openshift.internal.client.httpclient.UnauthorizedException: HTTP Basic: Access denied.

	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:185)
	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:99)
	at com.openshift.internal.client.RestService.request(RestService.java:137)
	at com.openshift.internal.client.RestService.request(RestService.java:95)
	... 12 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://localhost/broker/rest/user
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:94)
<--snip-->
Comment 1 Xiaoli Tian 2012-10-08 04:22:04 EDT
Created attachment 623331 [details]
Jenkins log

Jenkins server log is attached
Comment 2 Dan Mace 2012-10-10 13:40:47 EDT
The jenkins-cloud-plugin needs needs re-built against openshift-java-client 2.0.1, and a new version of jenkins-plugin-openshift deployed. The problem is that the user-auth string used to authenticate with the broker has changed from openshift-java-client 2.0.0 => 2.0.1.

I've already got a new jenkins-plugin-openshift built and ready to go: we're just waiting for it to be tagged and propagated through to the AMI builds. As soon as it trickles in, the issue should be resolved.
Comment 3 Dan Mace 2012-10-11 10:15:32 EDT
Fixed in devenv_2313+
Comment 4 Gaoyun Pei 2012-10-11 23:16:24 EDT
Verify this bug on devenv_2317.

Version/Release:
server: devenv_2317
client: rhc-0.99.5

Steps to verify:
1.Create a ruby-1.9 and a jenkins-1.4 app
2.Embed jenkins-client-1.4 to the ruby-1.9 app
3.Do some changes to the ruby app git repo and do git push to trigger jenkins build.

Actual results:
[pei@localhost app1]$ git push 
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 239 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: restart_on_add=false
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://app2-1010.dev.rhcloud.com/job/app1-build
remote: 
remote: Waiting for build to schedule........................................Done
remote: Waiting for job to complete.................................Done
remote: SUCCESS
remote: New build has been deployed.
To ssh://05572de49cd04cdf9d0976efc29dddea@app1-1010.dev.rhcloud.com/~/git/app1.git/
   f9a1071..fed8cb7  master -> master

The build job url https://app2-1010.dev.rhcloud.com/job/app1-build is available.

Note You need to log in before you can comment on or make changes to this bug.