Re: java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among steps

2018-11-01 Thread dean warren
What is the format for the scanForIssues line including the
'reportEncoding'.
I've done this e.g.
def checkstyle = scanForIssues tool: [$class: 'CheckStyle'],
reportEncoding='UTF-8', pattern: '**/mof-api/target/checkstyle-results.xml'
but it throws an error e.g.
java.lang.IllegalArgumentException: Expected named arguments but got
[{tool={$class=CheckStyle},
pattern=**/mof-api/target/checkstyle-results.xml}, null]

And as requested the check-style file is generated from this command e.g.
sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c
/home/user/Metrics_Checkstyle.xml -f xml -o target/checkstyle-results.xml
src'

On Tue, Oct 30, 2018 at 2:32 PM Ullrich Hafner 
wrote:

> and one additional question: how is the checkstyle file created?
>
> Am 30.10.2018 um 15:30 schrieb Ullrich Hafner :
>
> Can you add the encoding property:
>
> checkstyle = scanForIssues reportEncoding='YOUR-ENCODING‘, ...
>
> and replace YOUR-ENCODING with the encoding that is defined in the xml
> line of your checkstyle results.xml file?
>
> If this does not work, please create an issue in our issue tracker and
> attach the XML file. (Or if it is confidential you may also send it via
> email).
>
>
> Am 30.10.2018 um 13:47 schrieb deanwarrenuk :
>
> Have reduced the check-style from 200+ issues to just two. Works fine now.
>
> So something incompatible with checkstyle-resutls.xml generated and the
> scanForIssues.
> @Ullrich, can I send you the checkstyle-resutls.xml to debug (email?
> would prefer not to post file directly here)?
>
> Or perhpas advise on how I can progress?
>
>
> On Tuesday, 30 October 2018 12:16:41 UTC, deanwarrenuk wrote:
>
>> Looks like this is def an issue with the line
>> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern:
>> '**/mof-api/target/checkstyle-results.xml'
>>
>> As removed all steps except that above and issue still occurs.
>>
>>
>> Do you have a known working checkstyle-results.xml file, just in case
>> somethink funny with mine?
>>
>>
>> On Tuesday, 30 October 2018 11:46:24 UTC, deanwarrenuk wrote:
>>
>>> StackTrace:
>>>
>>> java.nio.charset.MalformedInputException: Input length = 1
>>> at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
>>> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
>>> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
>>> at java.io.InputStreamReader.read(InputStreamReader.java:184)
>>> at java.io.BufferedReader.fill(BufferedReader.java:161)
>>> at java.io.BufferedReader.readLine(BufferedReader.java:324)
>>> at java.io.BufferedReader.readLine(BufferedReader.java:389)
>>> at java.io.BufferedReader$1.hasNext(BufferedReader.java:571)
>>> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to moftpa
>>> at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
>>> at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
>>> at hudson.remoting.Channel.call(Channel.java:908)
>>> at hudson.FilePath.act(FilePath.java:986)
>>> at hudson.FilePath.act(FilePath.java:975)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:148)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInWorkspace(IssuesScanner.java:92)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:71)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:173)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:138)
>>> at
>>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
>>> at hudson.security.ACL.impersonate(ACL.java:260)
>>> at
>>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
>>> at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused: java.io.UncheckedIOException
>>> at java.io.BufferedReader$1.hasNext(BufferedReader.java:574)
>>> at
>>> java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1811)
>>> at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
>>> at
>>> edu.hm.hafner.analysis.FullTextFingerprint.extractContext(FullTextFingerprint.java:111)
>>> at
>>> edu.hm.hafner.analysis.FullTextFingerprint.createFingerprint(FullTextFingerprint.java:84)
>>> at
>>> edu.hm.hafner.analysis.FullTextFingerprint.compute(FullTextFingerprint.java:73)
>>> at
>>> edu.hm.hafner.analysis.FingerprintGenerator.run(FingerprintGenerator.java:35)
>>> at
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.createFingerprint

Re: java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among steps

2018-11-01 Thread Ullrich Hafner
Colon not Equals:

reportEncoding: 'UTF-8'

You are using an ancient checkstyle version, maybe this is the problem? Current 
version is 8.12.

> Am 01.11.2018 um 10:55 schrieb dean warren :
> 
> What is the format for the scanForIssues line including the 'reportEncoding'.
> I've done this e.g.
> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], 
> reportEncoding='UTF-8', pattern: '**/mof-api/target/checkstyle-results.xml'
> but it throws an error e.g.
> java.lang.IllegalArgumentException: Expected named arguments but got 
> [{tool={$class=CheckStyle}, 
> pattern=**/mof-api/target/checkstyle-results.xml}, null]
> 
> And as requested the check-style file is generated from this command e.g.
> sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c 
> /home/user/Metrics_Checkstyle.xml -f xml -o target/checkstyle-results.xml src'
> 
> On Tue, Oct 30, 2018 at 2:32 PM Ullrich Hafner  > wrote:
> and one additional question: how is the checkstyle file created?
> 
>> Am 30.10.2018 um 15:30 schrieb Ullrich Hafner > >:
>> 
>> Can you add the encoding property:
>> 
>> checkstyle = scanForIssues reportEncoding='YOUR-ENCODING‘, ...
>> 
>> and replace YOUR-ENCODING with the encoding that is defined in the xml line 
>> of your checkstyle results.xml file?
>> 
>> If this does not work, please create an issue in our issue tracker and 
>> attach the XML file. (Or if it is confidential you may also send it via 
>> email).
>> 
>> 
>>> Am 30.10.2018 um 13:47 schrieb deanwarrenuk >> >:
>>> 
>>> Have reduced the check-style from 200+ issues to just two. Works fine now.
>>> 
>>> So something incompatible with checkstyle-resutls.xml generated and the 
>>> scanForIssues.
>>> @Ullrich, can I send you the checkstyle-resutls.xml to debug (email? would 
>>> prefer not to post file directly here)?
>>> 
>>> Or perhpas advise on how I can progress?
>>> 
>>> 
>>> On Tuesday, 30 October 2018 12:16:41 UTC, deanwarrenuk wrote:
>>> Looks like this is def an issue with the line
>>> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: 
>>> '**/mof-api/target/checkstyle-results.xml'
>>> 
>>> As removed all steps except that above and issue still occurs.
>>> 
>>> 
>>> Do you have a known working checkstyle-results.xml file, just in case 
>>> somethink funny with mine?
>>> 
>>> 
>>> On Tuesday, 30 October 2018 11:46:24 UTC, deanwarrenuk wrote:
>>> StackTrace:
>>> 
>>> java.nio.charset.MalformedInputException: Input length = 1
>>> at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
>>> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
>>> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
>>> at java.io.InputStreamReader.read(InputStreamReader.java:184)
>>> at java.io.BufferedReader.fill(BufferedReader.java:161)
>>> at java.io.BufferedReader.readLine(BufferedReader.java:324)
>>> at java.io.BufferedReader.readLine(BufferedReader.java:389)
>>> at java.io.BufferedReader$1.hasNext(BufferedReader.java:571)
>>> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to moftpa
>>> at 
>>> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
>>> at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
>>> at hudson.remoting.Channel.call(Channel.java:908)
>>> at hudson.FilePath.act(FilePath.java:986)
>>> at hudson.FilePath.act(FilePath.java:975)
>>> at 
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:148)
>>> at 
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInWorkspace(IssuesScanner.java:92)
>>> at 
>>> io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:71)
>>> at 
>>> io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:173)
>>> at 
>>> io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:138)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
>>> at hudson.security.ACL.impersonate(ACL.java:260)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
>>> at 
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused: java.io.UncheckedIOException
>>> at java.io.BufferedReader$1.ha

Re: java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among steps

2018-11-01 Thread dean warren
Ok so changed the scanForIssues line using the encoding as suggested. Even
when using the latest checkstyle (8.14) I get the same error
e.g.
java.nio.charset.MalformedInputException: Input length = 1

Below is my current script (note we are using java 1.7 on the target, so
have to explicity utilise 1.8 for latest checkstyle).

sh '/home/user/jdk1.8.0_144/bin/java -jar
/home/user/checkstyle/checkstyle-8.14-all.jar
-c /home/user/Metrics_Checkstyle.xml -f xml -o
target/checkstyle-results.xml mof-api/src'

def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern:
'**/target/checkstyle-results.xml', reportEncoding: 'UTF-8'
publishIssues issues:[checkstyle]

What next?

On Thu, Nov 1, 2018 at 11:02 AM Ullrich Hafner 
wrote:

> Colon not Equals:
>
> reportEncoding: 'UTF-8'
>
> You are using an ancient checkstyle version, maybe this is the problem?
> Current version is 8.12.
>
> Am 01.11.2018 um 10:55 schrieb dean warren :
>
> What is the format for the scanForIssues line including the
> 'reportEncoding'.
> I've done this e.g.
> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'],
> reportEncoding='UTF-8', pattern: '**/mof-api/target/checkstyle-results.xml'
> but it throws an error e.g.
> java.lang.IllegalArgumentException: Expected named arguments but got
> [{tool={$class=CheckStyle},
> pattern=**/mof-api/target/checkstyle-results.xml}, null]
>
> And as requested the check-style file is generated from this command e.g.
> sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c
> /home/user/Metrics_Checkstyle.xml -f xml -o target/checkstyle-results.xml
> src'
>
> On Tue, Oct 30, 2018 at 2:32 PM Ullrich Hafner 
> wrote:
>
>> and one additional question: how is the checkstyle file created?
>>
>> Am 30.10.2018 um 15:30 schrieb Ullrich Hafner :
>>
>> Can you add the encoding property:
>>
>> checkstyle = scanForIssues reportEncoding='YOUR-ENCODING‘, ...
>>
>> and replace YOUR-ENCODING with the encoding that is defined in the xml
>> line of your checkstyle results.xml file?
>>
>> If this does not work, please create an issue in our issue tracker and
>> attach the XML file. (Or if it is confidential you may also send it via
>> email).
>>
>>
>> Am 30.10.2018 um 13:47 schrieb deanwarrenuk :
>>
>> Have reduced the check-style from 200+ issues to just two. Works fine now.
>>
>> So something incompatible with checkstyle-resutls.xml generated and the
>> scanForIssues.
>> @Ullrich, can I send you the checkstyle-resutls.xml to debug (email?
>> would prefer not to post file directly here)?
>>
>> Or perhpas advise on how I can progress?
>>
>>
>> On Tuesday, 30 October 2018 12:16:41 UTC, deanwarrenuk wrote:
>>
>>> Looks like this is def an issue with the line
>>> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern:
>>> '**/mof-api/target/checkstyle-results.xml'
>>>
>>> As removed all steps except that above and issue still occurs.
>>>
>>>
>>> Do you have a known working checkstyle-results.xml file, just in case
>>> somethink funny with mine?
>>>
>>>
>>> On Tuesday, 30 October 2018 11:46:24 UTC, deanwarrenuk wrote:
>>>
 StackTrace:

 java.nio.charset.MalformedInputException: Input length = 1
 at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
 at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
 at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
 at java.io.InputStreamReader.read(InputStreamReader.java:184)
 at java.io.BufferedReader.fill(BufferedReader.java:161)
 at java.io.BufferedReader.readLine(BufferedReader.java:324)
 at java.io.BufferedReader.readLine(BufferedReader.java:389)
 at java.io.BufferedReader$1.hasNext(BufferedReader.java:571)
 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to
 moftpa
 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
 at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
 at hudson.remoting.Channel.call(Channel.java:908)
 at hudson.FilePath.act(FilePath.java:986)
 at hudson.FilePath.act(FilePath.java:975)
 at
 io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:148)
 at
 io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInWorkspace(IssuesScanner.java:92)
 at
 io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:71)
 at
 io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:173)
 at
 io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep$Execution.run(ScanForIssuesStep.java:138)
 at
 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
 at hudson.security.ACL.impersonate(ACL.java:260)
 at
 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
 at
 java.util.concurrent.Executors$RunnableAdapter.call

Is there a way to force reconnect / redeploy of nodes after a Java update?

2018-11-01 Thread Adam von Nieda

   Hi folks,

   My situation is that I have to keep OpenJDK up to date on all of my Redhat 7 
Linux boxes, and updating Java does not necessarily mean a system boot. Is 
there a way that I can tell the agents on a number of machines (preferably by 
label) to redeploy / restart, so that they will pick up the new Java? What 
happens is I update the JDK, and then jobs start failing because libraries no 
longer exist for the previous version of java, which is still running 
“remoting.jar”. 

   Thanks very much for the advice,

  -Adam 

--
Adam vonNieda
a...@vonnieda.org


-- 
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/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.


Re: java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among steps

2018-11-01 Thread Ullrich Hafner
Sorry, my fault. I should have read the stack trace more carefully.

Can you please set

sourceEncoding: 'YOUR-SOURCE-FILES-ENCODING‘

as well? The error is thrown during the fingerprinting. Here a different 
encoding is used.

Which encoding is used for your source code?

I created an issue:
https://issues.jenkins-ci.org/secure/RapidBoard.jspa?rapidView=421&view=planning&selectedIssue=JENKINS-54398
 

The plugin should rather report a helpful text...

> Am 01.11.2018 um 12:22 schrieb dean warren :
> 
> Ok so changed the scanForIssues line using the encoding as suggested. Even 
> when using the latest checkstyle (8.14) I get the same error
> e.g.
> java.nio.charset.MalformedInputException: Input length = 1
> 
> Below is my current script (note we are using java 1.7 on the target, so have 
> to explicity utilise 1.8 for latest checkstyle).
> 
> sh '/home/user/jdk1.8.0_144/bin/java -jar 
> /home/user/checkstyle/checkstyle-8.14-all.jar -c 
> /home/user/Metrics_Checkstyle.xml -f xml -o target/checkstyle-results.xml 
> mof-api/src'
> 
> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: 
> '**/target/checkstyle-results.xml', reportEncoding: 'UTF-8'
> publishIssues issues:[checkstyle]
> 
> What next?
> 
> On Thu, Nov 1, 2018 at 11:02 AM Ullrich Hafner  > wrote:
> Colon not Equals:
> 
> reportEncoding: 'UTF-8'
> 
> You are using an ancient checkstyle version, maybe this is the problem? 
> Current version is 8.12.
> 
>> Am 01.11.2018 um 10:55 schrieb dean warren > >:
>> 
>> What is the format for the scanForIssues line including the 'reportEncoding'.
>> I've done this e.g.
>> def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], 
>> reportEncoding='UTF-8', pattern: '**/mof-api/target/checkstyle-results.xml'
>> but it throws an error e.g.
>> java.lang.IllegalArgumentException: Expected named arguments but got 
>> [{tool={$class=CheckStyle}, 
>> pattern=**/mof-api/target/checkstyle-results.xml}, null]
>> 
>> And as requested the check-style file is generated from this command e.g.
>> sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c 
>> /home/user/Metrics_Checkstyle.xml -f xml -o target/checkstyle-results.xml 
>> src'
>> 
>> On Tue, Oct 30, 2018 at 2:32 PM Ullrich Hafner > > wrote:
>> and one additional question: how is the checkstyle file created?
>> 
>>> Am 30.10.2018 um 15:30 schrieb Ullrich Hafner >> >:
>>> 
>>> Can you add the encoding property:
>>> 
>>> checkstyle = scanForIssues reportEncoding='YOUR-ENCODING‘, ...
>>> 
>>> and replace YOUR-ENCODING with the encoding that is defined in the xml line 
>>> of your checkstyle results.xml file?
>>> 
>>> If this does not work, please create an issue in our issue tracker and 
>>> attach the XML file. (Or if it is confidential you may also send it via 
>>> email).
>>> 
>>> 
 Am 30.10.2018 um 13:47 schrieb deanwarrenuk >>> >:
 
 Have reduced the check-style from 200+ issues to just two. Works fine now.
 
 So something incompatible with checkstyle-resutls.xml generated and the 
 scanForIssues.
 @Ullrich, can I send you the checkstyle-resutls.xml to debug (email? would 
 prefer not to post file directly here)?
 
 Or perhpas advise on how I can progress?
 
 
 On Tuesday, 30 October 2018 12:16:41 UTC, deanwarrenuk wrote:
 Looks like this is def an issue with the line
 def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: 
 '**/mof-api/target/checkstyle-results.xml'
 
 As removed all steps except that above and issue still occurs.
 
 
 Do you have a known working checkstyle-results.xml file, just in case 
 somethink funny with mine?
 
 
 On Tuesday, 30 October 2018 11:46:24 UTC, deanwarrenuk wrote:
 StackTrace:
 
 java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at java.io.BufferedReader$1.hasNext(BufferedReader.java:571)
 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to moftpa
at 
 hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
at hudson.remoting.Channel.call(Channel.java:908)
at 

Jenkins Backup and Restore

2018-11-01 Thread gotviseryon
We have a Jenkins instance running and we are trying to setup a backup and 
restore mechanism in case of any mishaps.  We are looking for a full backup 
of the Jenkins and so decided to go with PeriodicBackup plugin.  With this 
plugin, the backup works fine.  But, we are trying to restore it in a 
completely new Jenkins setup and not able to restore.  When we pick the 
backup file that we want to restore from, it says restoring, but nothing 
happens.  Even after waiting out for over 30 mins, nothing is restored.  As 
a work around, I stopped the Jenkins service, renamed the 'JENKINS_HOME' 
(/var/lib/jenkins) folder to 'jenkins_backup' and created another folder 
called 'jenkins' in the same location.  In this folder, I copied all the 
files from the backup and then started Jenkins (NOTE: I didn't change the 
.owner file.  I'm using the .owner file of the new Jenkins only).  Jenkins 
came up and I was able to see all the configurations from the old one.  
Everything was fine.  I let it like that overnight and in the morning when 
I came and tried to access it, Jenkins was way too slow and I was not able 
to save any new configuration.  When I try I'm getting 
java.io.ioexception: too many open files jenkins
error.  I restarted the jenkins and it's taking too long for the UI to come 
up.  Am I doing anything wrong here?  Any suggestions for my requirement?

P.S. - I tried SCMSync plugin and ThinBackup.  But, problem with these are 
that they don't do full backup.  But, with ThinBackup both backup and 
restore works fine.

-- 
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/0c58b4fa-4e8b-4c53-9ca9-b99397078fae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Backup and Restore

2018-11-01 Thread Rob Pickerill
Hi

Have you taken a look through:
https://wiki.jenkins.io/display/JENKINS/I%27m+getting+too+many+open+files+error
and
https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
- these give guidance on handling and increasing the open file limit so you
can restore your backup.

Thanks

On Thu, 1 Nov 2018 at 20:36,  wrote:

> We have a Jenkins instance running and we are trying to setup a backup and
> restore mechanism in case of any mishaps.  We are looking for a full backup
> of the Jenkins and so decided to go with PeriodicBackup plugin.  With this
> plugin, the backup works fine.  But, we are trying to restore it in a
> completely new Jenkins setup and not able to restore.  When we pick the
> backup file that we want to restore from, it says restoring, but nothing
> happens.  Even after waiting out for over 30 mins, nothing is restored.  As
> a work around, I stopped the Jenkins service, renamed the 'JENKINS_HOME'
> (/var/lib/jenkins) folder to 'jenkins_backup' and created another folder
> called 'jenkins' in the same location.  In this folder, I copied all the
> files from the backup and then started Jenkins (NOTE: I didn't change the
> .owner file.  I'm using the .owner file of the new Jenkins only).  Jenkins
> came up and I was able to see all the configurations from the old one.
> Everything was fine.  I let it like that overnight and in the morning when
> I came and tried to access it, Jenkins was way too slow and I was not able
> to save any new configuration.  When I try I'm getting
> java.io.ioexception: too many open files jenkins
> error.  I restarted the jenkins and it's taking too long for the UI to
> come up.  Am I doing anything wrong here?  Any suggestions for my
> requirement?
>
> P.S. - I tried SCMSync plugin and ThinBackup.  But, problem with these are
> that they don't do full backup.  But, with ThinBackup both backup and
> restore works fine.
>
> --
> 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/0c58b4fa-4e8b-4c53-9ca9-b99397078fae%40googlegroups.com
> 
> .
> 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/CAKotrh3N0yO5H-n7fcGf%3D%3DZJQyh76Qhag_ZcVjkw3mNrFuJafQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


help with plugin Openid Connect Authentication Plugin

2018-11-01 Thread Shiva Konduru
Hi,


I am using the above plugin to configure open id.


Here is my configuration:

[image: image.png]

I do have client id, client secret, token server url and authorization
server url.  I get the following exception after I get successfully
authenticated.  Can some one help me out with this?

Java.lang.NullPointerException
at 
org.jenkinsci.plugins.oic.OicSecurityRealm.doFinishLogin(OicSecurityRealm.java:564)
at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
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:734)
Caused: javax.servlet.ServletException
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:784)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
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:734)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
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:865)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
at 
hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:105)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
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:93)
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 
hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at 
hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at 
org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at 
hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at 
org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)

Re: Is there a way to force reconnect / redeploy of nodes after a Java update?

2018-11-01 Thread Jan Monterrubio
Yeah, you can access the agents via Jenkins.getNodes()

Then in a loop do something like:

agent.setOffline()
agent.reconnect()

Here’s some references that might help.

1:
https://javadoc.jenkins.io/jenkins/model/Jenkins.html#getNodes--
2:
https://wiki.jenkins.io/plugins/servlet/mobile?contentId=63144072#content/view/63144072

On Thu, Nov 1, 2018 at 08:05 Adam von Nieda  wrote:

>
>Hi folks,
>
>My situation is that I have to keep OpenJDK up to date on all of my
> Redhat 7 Linux boxes, and updating Java does not necessarily mean a system
> boot. Is there a way that I can tell the agents on a number of machines
> (preferably by label) to redeploy / restart, so that they will pick up the
> new Java? What happens is I update the JDK, and then jobs start failing
> because libraries no longer exist for the previous version of java, which
> is still running “remoting.jar”.
>
>Thanks very much for the advice,
>
>   -Adam
>
> --
> Adam vonNieda
> a...@vonnieda.org
>
>
> --
> 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/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org
> 
> .
> 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/CADgiF9Lxp-KfwJBrF--wSEg-w8MLbZOCWnBo47fNaYdwbQGtrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to force reconnect / redeploy of nodes after a Java update?

2018-11-01 Thread Adam von Nieda

  Thanks very much Jan, that’s very helpful, and I appreciate the response :) 

  -Adam 

--
Adam vonNieda
a...@vonnieda.org




> On Nov 1, 2018, at 6:14 PM, Jan Monterrubio  wrote:
> 
> Yeah, you can access the agents via Jenkins.getNodes()
> 
> Then in a loop do something like:
> 
> agent.setOffline() 
> agent.reconnect()
> 
> Here’s some references that might help. 
> 
> 1: 
> https://javadoc.jenkins.io/jenkins/model/Jenkins.html#getNodes-- 
> 
> 2: 
> https://wiki.jenkins.io/plugins/servlet/mobile?contentId=63144072#content/view/63144072
>  
> 
> 
> On Thu, Nov 1, 2018 at 08:05 Adam von Nieda  > wrote:
> 
>Hi folks,
> 
>My situation is that I have to keep OpenJDK up to date on all of my Redhat 
> 7 Linux boxes, and updating Java does not necessarily mean a system boot. Is 
> there a way that I can tell the agents on a number of machines (preferably by 
> label) to redeploy / restart, so that they will pick up the new Java? What 
> happens is I update the JDK, and then jobs start failing because libraries no 
> longer exist for the previous version of java, which is still running 
> “remoting.jar”. 
> 
>Thanks very much for the advice,
> 
>   -Adam 
> 
> --
> Adam vonNieda
> a...@vonnieda.org 
> 
> 
> 
> -- 
> 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/168289C0-76F3-4C7D-9605-C34EB4DEF986%40vonnieda.org
>  
> .
> 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/CADgiF9Lxp-KfwJBrF--wSEg-w8MLbZOCWnBo47fNaYdwbQGtrQ%40mail.gmail.com
>  
> .
> 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/C1FC8183-1A80-4412-99EB-716E1A90EC22%40vonnieda.org.
For more options, visit https://groups.google.com/d/optout.