Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread Mark Waite
The "Installing Jenkins" page
 for Docker also
provides instructions that will allow a user to run some Docker commands
from inside a customer Docker image that they create based on the official
Jenkins images.

I agree with Ivan that running the Docker command line interface on the
Jenkins controller should not be done in production.  Jobs should run on
agents, not on the Jenkins controller.  I think you should use agents that
are able to run the Docker images and use separate agents to create Docker
images.

On Thu, Jan 28, 2021 at 9:24 AM Ivan Fernandez Calvo <
kuisathave...@gmail.com> wrote:

> If you are running Jenkins ins a Docker container with the official Docker
> container, the docker CLI command is not installed and that's your error,
> you need the docker CLI installed to access a Docker Host. One trick can be
> to mount the binary of the Docker Host where you are running that Jenkins
> and the Docker socket, but this configuration is for local testing never
> for a production environment. Something like this
>
> docker run -it -v $(command -v docker):/usr/bin/docker -v
> /var/run/docker.sock:/var/run/docker.sock jenkins:lts
>
>
> El jueves, 28 de enero de 2021 a las 11:59:06 UTC+1, anilkuma...@gmail.com
> escribió:
>
>> Hi,
>> I have Jenkins running as docker container and in my Jenkins File , in
>> initialize stage i have following which is working also , i have installed
>> docker from Docker hub latest. Not sure where is the problem . Pipeline is
>> failing with the following.
>>
>> ava.io.IOException: error=2, No such file or directory
>>
>>
>> 
>> at java.lang.UNIXProcess.forkAndExec(Native Method)
>>
>>
>> 
>> at java.lang.UNIXProcess.(UNIXProcess.java:247)
>>
>>
>> 
>> at java.lang.ProcessImpl.start(ProcessImpl.java:134)
>>
>>
>> 
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
>>
>>
>> Caused:
>> java.io.IOException: Cannot run program "docker": error=2, No such file or
>> directory
>>
>>
>> 
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
>>
>>
>> 
>> at hudson.Proc$LocalProc.(Proc.java:250)
>>
>>
>> 
>> at hudson.Proc$LocalProc.(Proc.java:219)
>>
>>
>> 
>> at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
>>
>>
>> 
>> at hudson.Launcher$ProcStarter.start(Launcher.java:454)
>>
>>
>> 
>> at hudson.Launcher$ProcStarter.join(Launcher.java:465)
>>
>>
>> 
>> at
>> org.jenkinsci.plugins.docker.commons.impl.RegistryKeyMaterialFactory.materialize(RegistryKeyMaterialFactory.java:101)
>>
>>
>>
>> 
>> at
>> org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:53)
>>
>>
>>
>> 
>> at
>> org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
>>
>>
>>
>> 
>> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>
>>
>> 
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>
>>
>> 

Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread Ivan Fernandez Calvo
If you are running Jenkins ins a Docker container with the official Docker 
container, the docker CLI command is not installed and that's your error, 
you need the docker CLI installed to access a Docker Host. One trick can be 
to mount the binary of the Docker Host where you are running that Jenkins 
and the Docker socket, but this configuration is for local testing never 
for a production environment. Something like this

docker run -it -v $(command -v docker):/usr/bin/docker -v 
/var/run/docker.sock:/var/run/docker.sock jenkins:lts


El jueves, 28 de enero de 2021 a las 11:59:06 UTC+1, anilkuma...@gmail.com 
escribió:

> Hi,
> I have Jenkins running as docker container and in my Jenkins File , in 
> initialize stage i have following which is working also , i have installed 
> docker from Docker hub latest. Not sure where is the problem . Pipeline is 
> failing with the following.
>
> ava.io.IOException: error=2, No such file or directory 
>
>
> 
>  
> at java.lang.UNIXProcess.forkAndExec(Native Method) 
>
>
> 
>  
> at java.lang.UNIXProcess.(UNIXProcess.java:247) 
>
>
> 
>  
> at java.lang.ProcessImpl.start(ProcessImpl.java:134) 
>
>
> 
>  
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) 
>
>
> Caused:
>  
> java.io.IOException: Cannot run program "docker": error=2, No such file or 
> directory 
>
>
> 
>  
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) 
>
>
> 
>  
> at hudson.Proc$LocalProc.(Proc.java:250) 
>
>
> 
>  
> at hudson.Proc$LocalProc.(Proc.java:219) 
>
>
> 
>  
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:936) 
>
>
> 
>  
> at hudson.Launcher$ProcStarter.start(Launcher.java:454) 
>
>
> 
>  
> at hudson.Launcher$ProcStarter.join(Launcher.java:465) 
>
>
> 
>  
> at 
> org.jenkinsci.plugins.docker.commons.impl.RegistryKeyMaterialFactory.materialize(RegistryKeyMaterialFactory.java:101)
>  
>
>
>
> 
>  
> at 
> org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:53)
>  
>
>
>
> 
>  
> at 
> org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
>  
>
>
>
> 
>  
> 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:1149)
>  
>
>
>
> 
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  
>
>
>
> 
>  
> at java.lang.Thread.run(Thread.java:748)
>
>
> On Monday, 27 November 2017 at 01:21:50 UTC+5:30 lynn.x...@gmail.com 
> wrote:
>
>>
>> Oleg Nenashev 

Re: Plugin Build fails with "JellyTestSuiteBuilder"

2021-01-28 Thread Stephan Watermeyer
Thanks. But its also failing for local mvn builds. 
ice...@googlemail.com schrieb am Donnerstag, 28. Januar 2021 um 16:19:44 
UTC+1:

> My first guess would be the  Jenkinsfile ( it seems like a null is passed 
> where null is not expected:
>
>
> buildPlugin(jenkinsVersions: [null, '1.651.2'], failFast: false)
>
>^^ 
>
> swate...@gmail.com schrieb am Donnerstag, 28. Januar 2021 um 15:05:04 
> UTC+1:
>
>> I am trying to release a new version of my plugin but the build keeps 
>> failing with the exception
>>
>> *Caused by: java.lang.IllegalArgumentException: Comparison method 
>> violates its general contract! at 
>> java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:744) at 
>> java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:481) at 
>> java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:406) at 
>> java.util.ComparableTimSort.sort(ComparableTimSort.java:213) at 
>> java.util.Arrays.sort(Arrays.java:1312) at 
>> java.util.Arrays.sort(Arrays.java:1506) at 
>> java.util.ArrayList.sort(ArrayList.java:1462) at 
>> java.util.Collections.sort(Collections.java:143) at 
>> hudson.ExtensionList.sort(ExtensionList.java:320) at 
>> hudson.ExtensionList.ensureLoaded(ExtensionList.java:255) at 
>> hudson.ExtensionList.iterator(ExtensionList.java:143) at 
>> hudson.diagnosis.NullIdDescriptorMonitor.verify(NullIdDescriptorMonitor.java:68)
>>  
>> at 
>> hudson.diagnosis.NullIdDescriptorMonitor.verifyId(NullIdDescriptorMonitor.java:89)
>>   *
>>
>> I dont have a clue where the exception is comming from or what is wrong 
>> in my plugin. I would need some advise how to fix it.
>>
>> Failing Build: 
>>
>> https://ci.jenkins.io/job/Plugins/job/maven-artifact-choicelistprovider-plugin/job/master/58/testReport/junit/org.jvnet.hudson.test.junit/FailedTest/windows_8___Build__windows_8org_jvnet_hudson_test_JellyTestSuiteBuilder$JellyTestSuite/
>>
>> Code:
>> https://github.com/jenkinsci/maven-artifact-choicelistprovider-plugin
>>
>

-- 
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/ef75343d-19fc-4e8a-91b2-049bac2eb07cn%40googlegroups.com.


Re: Plugin Build fails with "JellyTestSuiteBuilder"

2021-01-28 Thread 'Björn Pedersen' via Jenkins Users
My first guess would be the  Jenkinsfile ( it seems like a null is passed 
where null is not expected:


buildPlugin(jenkinsVersions: [null, '1.651.2'], failFast: false)

   ^^ 

swate...@gmail.com schrieb am Donnerstag, 28. Januar 2021 um 15:05:04 UTC+1:

> I am trying to release a new version of my plugin but the build keeps 
> failing with the exception
>
> *Caused by: java.lang.IllegalArgumentException: Comparison method violates 
> its general contract! at 
> java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:744) at 
> java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:481) at 
> java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:406) at 
> java.util.ComparableTimSort.sort(ComparableTimSort.java:213) at 
> java.util.Arrays.sort(Arrays.java:1312) at 
> java.util.Arrays.sort(Arrays.java:1506) at 
> java.util.ArrayList.sort(ArrayList.java:1462) at 
> java.util.Collections.sort(Collections.java:143) at 
> hudson.ExtensionList.sort(ExtensionList.java:320) at 
> hudson.ExtensionList.ensureLoaded(ExtensionList.java:255) at 
> hudson.ExtensionList.iterator(ExtensionList.java:143) at 
> hudson.diagnosis.NullIdDescriptorMonitor.verify(NullIdDescriptorMonitor.java:68)
>  
> at 
> hudson.diagnosis.NullIdDescriptorMonitor.verifyId(NullIdDescriptorMonitor.java:89)
>   *
>
> I dont have a clue where the exception is comming from or what is wrong in 
> my plugin. I would need some advise how to fix it.
>
> Failing Build: 
>
> https://ci.jenkins.io/job/Plugins/job/maven-artifact-choicelistprovider-plugin/job/master/58/testReport/junit/org.jvnet.hudson.test.junit/FailedTest/windows_8___Build__windows_8org_jvnet_hudson_test_JellyTestSuiteBuilder$JellyTestSuite/
>
> Code:
> https://github.com/jenkinsci/maven-artifact-choicelistprovider-plugin
>

-- 
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/0e708411-5e6f-4ff9-9441-0ab7781f23c3n%40googlegroups.com.


Plugin Build fails with "JellyTestSuiteBuilder"

2021-01-28 Thread Stephan Watermeyer
I am trying to release a new version of my plugin but the build keeps 
failing with the exception

*Caused by: java.lang.IllegalArgumentException: Comparison method violates 
its general contract! at 
java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:744) at 
java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:481) at 
java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:406) at 
java.util.ComparableTimSort.sort(ComparableTimSort.java:213) at 
java.util.Arrays.sort(Arrays.java:1312) at 
java.util.Arrays.sort(Arrays.java:1506) at 
java.util.ArrayList.sort(ArrayList.java:1462) at 
java.util.Collections.sort(Collections.java:143) at 
hudson.ExtensionList.sort(ExtensionList.java:320) at 
hudson.ExtensionList.ensureLoaded(ExtensionList.java:255) at 
hudson.ExtensionList.iterator(ExtensionList.java:143) at 
hudson.diagnosis.NullIdDescriptorMonitor.verify(NullIdDescriptorMonitor.java:68)
 
at 
hudson.diagnosis.NullIdDescriptorMonitor.verifyId(NullIdDescriptorMonitor.java:89)
  *

I dont have a clue where the exception is comming from or what is wrong in 
my plugin. I would need some advise how to fix it.

Failing Build: 
https://ci.jenkins.io/job/Plugins/job/maven-artifact-choicelistprovider-plugin/job/master/58/testReport/junit/org.jvnet.hudson.test.junit/FailedTest/windows_8___Build__windows_8org_jvnet_hudson_test_JellyTestSuiteBuilder$JellyTestSuite/

Code:
https://github.com/jenkinsci/maven-artifact-choicelistprovider-plugin

-- 
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/260866c9-2b2a-44a7-96fd-f8879382646cn%40googlegroups.com.


Jenkins wait 1 minute between each pipeline commands

2021-01-28 Thread Yannick Lacaute
Hi,

I am building a declarative pipeline, everything is working fine but 
Jenkins waits around 1 minute between each command !!

12:49:31 [pipeline-poc-sys_master-XYZ] Running shell script
12:50:32 + echo hello world !
12:50:32 hello world !

The command itself is ok (maven build time seems acceptable for example). 
The problem may come from the communication between the master and the 
slave.

Could this be a problem related to JNLP ?
Could this be a problem with k8s + declarative syntax (since we are not up 
to date, I have to use a yaml file for the pod template)

In spite of giving the solution,  could recommend a solutions to investgate 
?

Something has changed somewhere because it was working 1 month ago. But it 
is too compicated to know what is the root cause.

Context :
- Openshift,
- redhat persistent Jenkins
- Slave maven agent (not on master node)
- use JNLP (inbound-agent:4.3-4-alpine)
- declarative pipeline
- no shared workspace (hostpath volume)


Thanks

-- 
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/e8fb2ca9-d7b5-4253-945e-80ea69438106n%40googlegroups.com.


Re: run jenkins pipeline fails "docker": error=2, No such file or directory

2021-01-28 Thread anilkumar panditi
Hi,
I have Jenkins running as docker container and in my Jenkins File , in 
initialize stage i have following which is working also , i have installed 
docker from Docker hub latest. Not sure where is the problem . Pipeline is 
failing with the following.

ava.io.IOException: error=2, No such file or directory 


 
at java.lang.UNIXProcess.forkAndExec(Native Method) 


 
at java.lang.UNIXProcess.(UNIXProcess.java:247) 


 
at java.lang.ProcessImpl.start(ProcessImpl.java:134) 


 
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) 

Caused:
 
java.io.IOException: Cannot run program "docker": error=2, No such file or 
directory 


 
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) 


 
at hudson.Proc$LocalProc.(Proc.java:250) 


 
at hudson.Proc$LocalProc.(Proc.java:219) 


 
at hudson.Launcher$LocalLauncher.launch(Launcher.java:936) 


 
at hudson.Launcher$ProcStarter.start(Launcher.java:454) 


 
at hudson.Launcher$ProcStarter.join(Launcher.java:465) 


 
at 
org.jenkinsci.plugins.docker.commons.impl.RegistryKeyMaterialFactory.materialize(RegistryKeyMaterialFactory.java:101)
 



 
at 
org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:53)
 



 
at 
org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
 



 
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:1149) 



 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 



 
at java.lang.Thread.run(Thread.java:748)


On Monday, 27 November 2017 at 01:21:50 UTC+5:30 lynn.x...@gmail.com wrote:

>
> Oleg Nenashev 于2017年11月26日 周日上午8:55写道:
>
>> Hi,
>>
>> Docker CLI tool needs to be installed on the machine and available in 
>> PATH if you do not specify a Docker tool installation to be used. 
>> See the withTool() documentation if you need to specify a tool path: 
>> https://github.com/jenkinsci/docker-workflow-plugin/blob/f32bca9148471ff7381f5404a747b0151305996e/src/main/resources/org/jenkinsci/plugins/docker/workflow/DockerDSL/help.jelly#L31-L37
>>
>
> Thanks, but you can see from the log that Docker pull already succeeded so 
> curious why Docker inspect fails 
>
>>
>> Best regards,
>> Oleg Nenashev
>>
>>
>> пятница, 24 ноября 2017 г., 11:27:02 UTC+3 пользователь Lynn Lin написал:
>>
>>> hi
>>>
>>> I am following this guide to have a run jenkins pipeline in my mac  
>>> https://jenkins.io/doc/pipeline/tour/agents/ 
>>>
>>> pipeline {
>>> agent {