hygieia/hygieia-build-jenkins-collector

Jenkins Collector Issue: build url returned by Jenkins and the Jenkins instance url in your Hygieia configuration do not match

droy2017 opened this issue · 3 comments

Hi There, I have set up Hygieia in my local system and tried connecting to Jenkins running in my local system.

Please note that authentication is disabled in my local Jenkins, that's why I kept it blank.

My local instance of Jenkins is running locally, please see the snapshot attached.
image

Application Properties:

Jenkins server (required) - Can provide multiple

jenkins.servers[0]=http://localhost:9080/

If using username/token for API authentication

(required for Cloudbees Jenkins Ops Center) For example,

#jenkins.servers[1]=http://username:token@jenkins.company.com

Another option: If using same username/password Jenkins auth,

set username/apiKey to use HTTP Basic Auth (blank=no auth)

jenkins.usernames[0]=
jenkins.apiKeys[0]=

Determines if build console log is collected - defaults to false

jenkins.saveLog=true

Log Stack Below:

2020-07-16 11:04:20,286 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - Finished 1s
2020-07-16 11:05:00,001 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - Running Collector: Hudson
2020-07-16 11:05:00,033 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - -----------------------------------
2020-07-16 11:05:00,033 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - http://localhost:9080/
2020-07-16 11:05:00,033 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - -----------------------------------
2020-07-16 11:05:00,040 [taskScheduler-1] INFO c.c.d.collector.DefaultHudsonClient - Fetching jobs 0/13 pageSize 1000...
2020-07-16 11:05:00,067 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - Fetched jobs 0s
2020-07-16 11:05:00,067 [taskScheduler-1] INFO c.c.d.collector.CollectorTask - New jobs 0 0s
2020-07-16 11:05:00,079 [taskScheduler-1] WARN c.c.d.collector.DefaultHudsonClient - Credentials for the following url was not found. This could happen if the domain/subdomain/IP address in the build url returned by Jenkins and the Jenkins instance url in your Hygieia configuration do not match: "http://localhost:8080/job/aep_parametrised_pipeline05/1/api/json?tree=number,url,timestamp,duration,building,result,culprits[fullName],changeSets[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind],changeSet[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind,revisions[module,revision]],actions[lastBuiltRevision[SHA1,branch[SHA1,name]],remoteUrls]"
2020-07-16 11:05:00,087 [taskScheduler-1] ERROR c.c.d.collector.DefaultHudsonClient - Client exception loading build details: 404 Not Found. URL =http://localhost:8080/job/aep_parametrised_pipeline05/1/
2020-07-16 11:05:00,101 [taskScheduler-1] WARN c.c.d.collector.DefaultHudsonClient - Credentials for the following url was not found. This could happen if the domain/subdomain/IP address in the build url returned by Jenkins and the Jenkins instance url in your Hygieia configuration do not match: "http://localhost:8080/job/aep_parametrised_pipeline05/2/api/json?tree=number,url,timestamp,duration,building,result,culprits[fullName],changeSets[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind],changeSet[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind,revisions[module,revision]],actions[lastBuiltRevision[SHA1,branch[SHA1,name]],remoteUrls]"
2020-07-16 11:05:00,108 [taskScheduler-1] ERROR c.c.d.collector.DefaultHudsonClient - Client exception loading build details: 404 Not Found. URL =http://localhost:8080/job/aep_parametrised_pipeline05/2/
2020-07-16 11:05:00,124 [taskScheduler-1] WARN c.c.d.collector.DefaultHudsonClient - Credentials for the following url was not found. This could happen if the domain/subdomain/IP address in the build url returned by Jenkins and the Jenkins instance url in your Hygieia configuration do not match: "http://localhost:8080/job/aep_parametrised_pipeline05/3/api/json?tree=number,url,timestamp,duration,building,result,culprits[fullName],changeSets[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind],changeSet[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind,revisions[module,revision]],actions[lastBuiltRevision[SHA1,branch[SHA1,name]],remoteUrls]"
2020-07-16 11:05:00,136 [taskScheduler-1] ERROR c.c.d.collector.DefaultHudsonClient - Client exception loading build details: 404 Not Found. URL =http://localhost:8080/job/aep_parametrised_pipeline05/3/
2020-07-16 11:05:00,148 [taskScheduler-1] WARN c.c.d.collector.DefaultHudsonClient - Credentials for the following url was not found. This could happen if the domain/subdomain/IP address in the build url returned by Jenkins and the Jenkins instance url in your Hygieia configuration do not match: "http://localhost:8080/job/aep_parametrised_pipeline05/4/api/json?tree=number,url,timestamp,duration,building,result,culprits[fullName],changeSets[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind],changeSet[items[user,author[fullName],revision,id,msg,timestamp,date,paths[file]],kind,revisions[module,revision]],actions[lastBuiltRevision[SHA1,branch[SHA1,name]],remoteUrls]"

Have you resolved this issue now? I got the same issue. Can you share your resolution?

Just a suggestion for a much easier setup. I suggest you'd better use the hygieia jenkins publisher plugin.. it's much easier to setup and it already works for DEPLOY and BUILD widget.

Here's the repo: https://github.com/Hygieia/hygieia-publisher-jenkins-plugin

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.