exception - Spinnaker Jenkins Integration unable to fetch jobs from Jenkins -
we have completed steps described in hello-spinnaker example below.we have used aws spinnaker image directly configure spinnaker in aws.
www.spinnaker.io/docs/hello-spinnaker.
i trying create sample pipeline noted in above example.but while create trigger in first step , select jenkins ,the jobs not getting populated , getting below error in browser.
get http://localhost:8084/v2/builds/jenkins/jobs 429 (too many requests)
the actual issue looks while retrofit trying map response jenkins getjobs joblist class finding attribute _class in jenkins response xml , not present in joblist groovy class.below how tried finding issue
1)login aws spinnaker instance
2)gate service exposed @ port 8084.
curl http://localhost:8084/v2/builds/jenkins/jobs.
{"failurecause":"retrofit.retrofiterror: 429 many requests","error":"too many requests","message":"429 many requests","status":429,"url":"http://localhost:8088/jobs/jenkins","timestamp":1462793944530}
3)igor service exposed @ port 8088.
curl http://localhost:8088/jobs/jenkins
{"fallbackexception":"java.lang.unsupportedoperationexception: no fallback available.","failuretype":"command_exception","failurecause":"retrofit.converter.conversionexception: org.simpleframework.xml.core.attributeexception: attribute '_class' not have match in class com.netflix.spinnaker.igor.jenkins.client.model.joblist @ line 1","error":"hystrix failure","message":"jenkins-jenkins-getjobs failed , no fallback available.","status":429,"timestamp":1462793896853}
when check in igor logs,there few exceptions occuring during getprojects jenkins poll
caused by: retrofit.converter.conversionexception: org.simpleframework.xml.core.attributeexception: attribute '_class' not have match in class com.netflix.spinnaker.igor.jenkins.client.model.projectslist @ line 2 @ retrofit.converter.simplexmlconverter.frombody(simplexmlconverter.java:38) @ retrofit.restadapter$resthandler.invokerequest(restadapter.java:367) ... 39 common frames omitted caused by: org.simpleframework.xml.core.attributeexception: attribute '_class' not have match in class com.netflix.spinnaker.igor.jenkins.client.model.projectslist @ line 2
4)connect jenkins , jobs being done in spinnaker code https://github.com/spinnaker/igor/blob/master/igor-web/src/main/groovy/com/netflix/spinnaker/igor/jenkins/client/jenkinsclient.groovy
resp = requests.get('http://jenkinserverip:8080/api/xml?tree=jobs[name,jobs[name,jobs[name,jobs[name,jobs[name,jobs[name,jobs[name,jobs[name,jobs[name,jobs[name]]]]]]]]]]',auth=('admin','password'))
print resp.text
<hudson _class='hudson.model.hudson'><job _class='hudson.model.freestyleproject'><name>hello build</name></job><job _class='hudson.model.freestyleproject'><name>hello poll</name></job></hudson>
so jenkins response having _class attribute ,retrofit throwing error @ line http://grepcode.com/file/repo1.maven.org/maven2/com.squareup.retrofit/retrofit/1.9.0/retrofit/restadapter.java#383
i wanted see how can fix looks version in compatibility of jenkins.
this bug around jenkins api in later version. believe 2.2 last compatible version, run 1.6 internally.
spinnaker jenkins integration
ReplyDeleteOpsMx can help you spinnaker jenkins integration and get Spinnaker up-and-running faster, and provide the support enterprises rely on?
Schedule Demo at your convenient time.