Jenkins 2.x: jenkinscli failed to start pipeline build (freestyle does work)

80 views
Skip to first unread message

thomas....@teamaol.com

unread,
Jun 7, 2016, 7:26:44 AM6/7/16
to Jenkins Users
I've been creating two jobs:
  • FOO1 (pipeline)
  • FOO2 (freestyle).
No configuration; just creation of the jobs.
I have registered a SSH key with no passphrase at my user.
The jenkins-cli.jar has been downloaded from the Jenkins specified in the URL.
I'm using Jenkins 2.0-rc1 the moment.

$ cat build.sh 
#!/bin/bash
PROMPT="$(basename $0) :: "
echo "${PROMPT}Build job for ${JOB_NAME} ..."
java -jar jenkins-cli.jar -s ${JENKINS_URL} -i ${JENKINS_PRIVATE_KEY} build "${JOB_NAME}"

With "export JOB_NAME=FOO1; ./build.sh" I get following output:

build.sh :: Build job for FOO1 ...

ERROR: No such job 'FOO1'; perhaps you meant 'Build-and-run-Nginx'?

With "export JOB_NAME=FOO2; ./build.sh" I get no error and the freestyle job is really executed.

Regards,
Thomas

thomas....@teamaol.com

unread,
Jun 7, 2016, 7:47:48 AM6/7/16
to Jenkins Users
In Jenkins 2.8 I get both Job types running but the jenkinscli prints out following exception:

build.sh :: Build job for FOO2 ...
Jun 07, 2016 1:46:22 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run
SCHWERWIEGEND: I/O error in channel CLI connection to http://localhost:8080/
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2335)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2804)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:802)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

Reply all
Reply to author
Forward
0 new messages