Jenkins stopped working

2017-07-04 Thread Ruchir Brahmbhatt
Today suddenly jenkins stopped working, throwing below error. I updated 
jenkins to latest version but that doesn't help.

Stack trace

java.lang.IllegalArgumentException: Cannot get String from a null object
at org.scribe.utils.Preconditions.check(Preconditions.java:82)
at org.scribe.utils.Preconditions.checkNotNull(Preconditions.java:29)
at org.scribe.utils.StreamUtils.getStreamContents(StreamUtils.java:20)
at org.scribe.model.Response.parseBodyContents(Response.java:41)
at org.scribe.model.Response.getBody(Response.java:67)
at 
org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:59)
at 
org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:39)
at 
org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:44)
at 
org.jenkinsci.plugins.api.BitbucketApiService.createRquestToken(BitbucketApiService.java:43)
at 
org.jenkinsci.plugins.BitbucketSecurityRealm.doCommenceLogin(BitbucketSecurityRealm.java:107)
at 
java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
at 
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
Caused: javax.servlet.ServletException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at 
org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at 
io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at 
hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at 
hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
at 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at 
hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at 

Re: ERROR: Timeout after 10 minutes

2017-02-21 Thread Ruchir Brahmbhatt
Thanks Mark for comprehensive reply. Yes timeout is due to large 
repository. I can try the solution of generating custom command through 
pipeline syntax and creating reference repo but when I start the built, it 
will checkout automatically and that step will itself fail due to timeout 
so Jenkinsfile will never get chance to get executed.

On Monday, 20 February 2017 18:53:09 UTC+5:30, Mark Waite wrote:
>
> A common source of timeout on fetch (clone) is incorrect or missing 
> credentials.  If your repository is private and you have not assigned 
> credentials during the checkout, the checkout may fail with a timeout 
> rather than providing a clear error message that access was denied.
>
> A less common source of timeout on fetch (clone) is embedding the username 
> / password credentials directly into the https URL.  JENKINS-41066 
> describes that problem for Bitbucket, GitHub, and Visual Studio Online 
> repositories.
>
> Another less common source of timeout on fetch (clone) is using the wrong 
> type of credential.  The git plugin supports username / password 
> credentials with https URL's to the repository, and it supports private key 
> credentials with ssh/scp URL's to the repository.  It does not support 
> private key credentials with https URL's.  It does not support username / 
> password credentials with ssh/scp URL's.
>
> If you've verified that credentials are assigned to the pipeline checkout 
> command correctly and are working as expected (for example, the log file 
> includes progress indicators which show that it has started to read some of 
> the repository, but then that operation is killed after 10 minutes), then 
> you probably need to extend the timeout with the CloneOption rather than 
> the CheckoutOption.
>
> Use the "Pipeline Syntax" link on the job definition page, select 
> "checkout: General SCM" from the drop down list, and select Git as the 
> SCM.  It will allow you to add "Additional Behaviours" including "Advanced 
> clone behaviours".  Within the "Advanced clone behaviours", you can define 
> a reference repository (local pointer to a bare git repository which acts 
> as a cache to reduce data transfer time) and you can define the timeout for 
> clone.
>
> If you have a slow local file system (SMB/CIFS, NFS, AFS, etc.) and a 
> large repository, you may find that the checkout option also needs a 
> timeout value set.  That is much less common, and usually means that you 
> should improve the performance of your file systems rather than increase 
> the timeout of the checkout.
>
> Thanks,
> Mark Waite
>
> On Mon, Feb 20, 2017 at 2:48 AM Victor Martinez <victormar...@gmail.com 
> > wrote:
>
>> Hi,
>>
>> Default git checkout timeout is 10 minutes, you can tweak that value:
>> - 
>> https://jenkins.io/doc/pipeline/steps/workflow-scm-step/#checkout-general-scm
>>
>> $class: *CheckoutOption* timeout
>>
>> +
>> Specify a timeout (in minutes) for checkout. 
>> This option overrides the default timeout of 10 minutes. 
>> You can change the global git timeout via the property org.jenkinsci.
>> plugins.gitclient.Git.timeOut (see JENKINS-11286 
>> <https://issues.jenkins-ci.org/browse/JENKINS-11286>). Note that 
>> property should be set on both master and slave to have effect (see 
>> JENKINS-22547 <https://issues.jenkins-ci.org/browse/JENKINS-22547>).
>>
>> Type: int
>>
>> Cheers
>>
>>
>> On Monday, 20 February 2017 08:55:14 UTC, Ruchir Brahmbhatt wrote:
>>>
>>> Hi,
>>>
>>> I have configured bitbucket team/project pipeline and using jenkinsfile. 
>>> One of the repository is large and timing out during fetch as below.
>>> ERROR: Timeout after 10 minutes
>>> ERROR: Error fetching remote repo 'origin'
>>> hudson.plugins.git.GitException: Failed to fetch from 
>>> https://bitbucket.org/ecosmobteam/test-cawsup-awpbx-voip.git
>>> at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:806)
>>> at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
>>> at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
>>> at 
>>> org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
>>> at 
>>> org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
>>> at hudson.model.ResourceController.execute(ResourceController.java:98)
&

Re: Build project inside docker

2017-02-20 Thread Ruchir Brahmbhatt
the repository structure is like that and makefile is  within that folder.

On Sunday, 19 February 2017 14:42:29 UTC+5:30, Indra Gunawan (ingunawa) 
wrote:
>
> What is usr/local/src/freeswitch?  You missed “/” before usr.
>
>  
>
> *From: *<jenkins...@googlegroups.com > on behalf of Ruchir 
> Brahmbhatt <ruchir.b...@gmail.com >
> *Reply-To: *"jenkins...@googlegroups.com " <
> jenkins...@googlegroups.com >
> *Date: *Saturday, February 18, 2017 at 2:26 AM
> *To: *Jenkins Users <jenkins...@googlegroups.com >
> *Subject: *Build project inside docker
>
>  
>
> Hi, 
>
>  
>
> I'm trying to build a project inside docker container so that all 
> dependencies required for project are available and doesn't require 
> installation in jenkins system. Below is my Jenkinsfile.
>
>  
>
> node{
>
> stage ('Build'){
>
>  checkout scm
>
>  docker.image('bettervoice/freeswitch-container:1.6.9').inside {
>
> sh 'cd usr/local/src/freeswitch-1.4.26'
>
> sh './rebootstrap'
>
> sh './configure'
>
> sh 'make'
>
> }
>
>   }
>
> }
>
>  
>
> But I get error as below.
>
> [st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A]
>  Running shell script
>
> + usr/local/src/freeswitch-1.4.26/rebootstrap
>
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  2: 
> /var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
>  usr/local/src/freeswitch-1.4.26/rebootstrap: not found
>
>  
>
> Any hints on what is wrong with the file?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/fbaf0dbb-20e8-4413-b157-a56161167fb9%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/fbaf0dbb-20e8-4413-b157-a56161167fb9%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/52f74542-9e6d-4a28-845c-0168d1067eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ERROR: Timeout after 10 minutes

2017-02-20 Thread Ruchir Brahmbhatt
Hi,

I have configured bitbucket team/project pipeline and using jenkinsfile. 
One of the repository is large and timing out during fetch as below.
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from 
https://bitbucket.org/ecosmobteam/test-cawsup-awpbx-voip.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:806)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at 
org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at 
org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
at 
org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
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:404)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
--progress https://bitbucket.org/ecosmobteam/test-cawsup-awpbx-voip.git 
+refs/heads/master" returned status code 143:

I found links mentioning increasing timeout for git in jobs but didn't find 
way to do  it with bitbucket repo and jenkinsfile.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5402ec84-27bb-4e24-8de6-bc6ae1dd0cb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Build project inside docker

2017-02-18 Thread Ruchir Brahmbhatt
Hi,

I'm trying to build a project inside docker container so that all 
dependencies required for project are available and doesn't require 
installation in jenkins system. Below is my Jenkinsfile.

node{stage ('Build'){ checkout scm 
docker.image('bettervoice/freeswitch-container:1.6.9').inside {
sh 'cd usr/local/src/freeswitch-1.4.26'

sh './rebootstrap'

sh './configure' sh 'make' } } }


But I get error as below.

[st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A]
 Running shell script
+ usr/local/src/freeswitch-1.4.26/rebootstrap
/var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
 2: 
/var/lib/jenkins/workspace/st-cawsup-awpbx-voip_master-ZVTVQJCM4MJ75YVFR46JVXULPIMRLC6U3ILUY4WLDZ7ISHOVOE6A@tmp/durable-776c465c/script.sh:
 usr/local/src/freeswitch-1.4.26/rebootstrap: not found


Any hints on what is wrong with the file?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fbaf0dbb-20e8-4413-b157-a56161167fb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


sonarqube quality gates with jenkinsfile

2017-01-28 Thread Ruchir Brahmbhatt
Hi,

I tried to 
follow https://gist.github.com/vdupain/832964527b4b8d7d4c648169dae8c656 
without maven for a test php project in bitbucket team repository. It gives 
me below error after sonarqube analysis stage.

Unable to process url: 
http://localhost:9000/api/ce/task?id=AVnksRksMwjM7SNQESTh

Any idea what could be wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8b235bd6-810a-4877-974a-6fb4ff3377ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


folder computation takes too long for bitbucket team configuration

2017-01-27 Thread Ruchir Brahmbhatt
Hi,

I have configured bitbucket team project with jenkinsfile pipeline as code. 
We have obviously many repositories in the team account. Jenkins takes too 
long to finish folder computation. I'm afraid this may delay in reflecting 
the changes to repositories(new repositories may not reflect fast enough). 
Is this normal or can be improved?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cfb84f0c-ef9e-435a-80df-c26cbd84345a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.