I create an organization and a repo in it. Using the credentials, the project and it's Jenkinsfile were found, so a job for the master branch was created.
If the master branch Job is run, it does not work:
It takes forever (until a timeout is reached) at the git fetch command
started by user user.name
Checking out git https://bitbucket.org/organizationname/csdummyproject.git to read Jenkinsfile
Installer "Extract *.zip/*.tar.gz" cannot be used to install "Default" on the node "Jenkins"
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://bitbucket.org/organizationname/csdummyproject.git # timeout=10
Fetching upstream changes from https://bitbucket.org/organizationname/csdummyproject.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
Setting http proxy: <IP>:<PORT>
> git fetch --tags --progress https://bitbucket.org/organizationname/csdummyproject.git +refs/heads/master
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.org/organizationname/csdummyproject.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:812)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1079)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1110)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://bitbucket.org/organizationname/csdummyproject.git +refs/heads/master" returned status code -1:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
... 8 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
I wonder why
1) The job runs on the Jenkins master node. It might be the case that there is a proxy related issue.
I cloned the repo manually on my master node then and executed the git fetch command manually and it succeeded.
2) In my jenkins.err.log file I have the following proxy related issues:
(Masked : and organizationname)
Jun 26, 2017 3:04:57 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Required proxy credentials not available for BASIC <any realm>@<IP>:<PORT>
Jun 26, 2017 3:04:57 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Preemptive authentication requested but no default proxy credentials available
Jun 26, 2017 3:04:57 PM org.apache.commons.httpclient.HttpMethodBase readResponseBody
INFO: Response content length is not known
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool freeConnection
SEVERE: Host connection pool not found, hostConfig=HostConfiguration[host=https://bitbucket.org, proxyHost=http://<IP>:<PORT>]
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Required proxy credentials not available for BASIC <any realm>@<IP>:<PORT>
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Preemptive authentication requested but no default proxy credentials available
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool freeConnection
SEVERE: Host connection pool not found, hostConfig=HostConfiguration[host=https://bitbucket.org, proxyHost=http://<IP>:<PORT>]
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool freeConnection
SEVERE: Host connection pool not found, hostConfig=HostConfiguration[host=https://bitbucket.org, proxyHost=http://<IP>:<PORT>]
Jun 26, 2017 3:04:58 PM com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener registerHooks
INFO: Registering hook for organizationname/csdummyproject
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Required proxy credentials not available for BASIC <any realm>@<IP>:<PORT>
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodDirector authenticateProxy
WARNING: Preemptive authentication requested but no default proxy credentials available
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodBase readResponseBody
INFO: Response content length is not known
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.HttpMethodBase readResponseBody
INFO: Response content length is not known
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool freeConnection
SEVERE: Host connection pool not found, hostConfig=HostConfiguration[host=https://bitbucket.org, proxyHost=http://<IP>:<PORT>]
Jun 26, 2017 3:04:58 PM jenkins.branch.MultiBranchProject$BranchIndexing run
INFO: playground/organizationname2/csdummyproject #20170626.150455 branch indexing action completed: SUCCESS in 2.5 sec
Jun 26, 2017 3:04:58 PM org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool freeConnection
SEVERE: Host connection pool not found, hostConfig=HostConfiguration[host=https://bitbucket.org, proxyHost=http://<IP>:<PORT>]
Jun 26, 2017 3:04:58 PM com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1 doRun
WARNING: Could not register hooks for playground/organizationname2/csdummyproject
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 400: Bad Request.
{"type": "error", "error": {"fields": {"url": ["Invalid URL"]}, "message": "Bad request"}}
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.postRequest(BitbucketCloudApiClient.java:636)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.postRequest(BitbucketCloudApiClient.java:661)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.registerCommitWebHook(BitbucketCloudApiClient.java:352)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHooks(WebhookAutoRegisterListener.java:155)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.access$000(WebhookAutoRegisterListener.java:60)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1.doRun(WebhookAutoRegisterListener.java:106)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Howeever, using the GitHub Jenkins plugins for scanning an organization and building it's repos works very well on the same machine
Hello,
I create an organization and a repo in it. Using the credentials, the project and it's Jenkinsfile were found, so a job for the master branch was created.
If the master branch Job is run, it does not work: It takes forever (until a timeout is reached) at the git fetch command
I wonder why
1) The job runs on the Jenkins master node. It might be the case that there is a proxy related issue. I cloned the repo manually on my master node then and executed the git fetch command manually and it succeeded.
2) In my jenkins.err.log file I have the following proxy related issues:
(Masked: and organizationname)
Howeever, using the GitHub Jenkins plugins for scanning an organization and building it's repos works very well on the same machine
What could be the cause for the job to fail?