[JIRA] [cli] (JENKINS-28346) Inconsistent CLI failiures

1 view
Skip to first unread message

raymond.accary@gmail.com (JIRA)

unread,
May 11, 2015, 6:48:01 PM5/11/15
to jenkinsc...@googlegroups.com
Raymond Accary stopped work on Bug JENKINS-28346
 
Change By: Raymond Accary
Status: In Progress Open
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

raymond.accary@gmail.com (JIRA)

unread,
May 11, 2015, 6:48:01 PM5/11/15
to jenkinsc...@googlegroups.com
Raymond Accary started work on Bug JENKINS-28346
 
Change By: Raymond Accary
Status: Open In Progress

raymond.accary@gmail.com (JIRA)

unread,
May 11, 2015, 6:48:01 PM5/11/15
to jenkinsc...@googlegroups.com
Raymond Accary created an issue
 
Jenkins / Bug JENKINS-28346
Inconsistent CLI failiures
Issue Type: Bug Bug
Assignee: Unassigned
Components: cli
Created: 11/May/15 10:47 PM
Environment: Using Jenkins 1.599 (org.jenkins-ci.main:jenkins-war:1.599) with following plugins:

analysis-core checkstyle.jpi disk-usage.bak jenkins-multijob-plugin.bak mailer.jpi.pinned metrics-diskusage script-security tasks.jpi
analysis-core.bak conditional-buildstep disk-usage.jpi jenkins-multijob-plugin.jpi mapdb-api metrics-diskusage.jpi script-security.jpi throttle-concurrents
analysis-core.jpi conditional-buildstep.jpi diskcheck jquery mapdb-api.jpi metrics.jpi sloccount throttle-concurrents.jpi
ant console-column-plugin diskcheck.jpi jquery.jpi matrix-auth nodelabelparameter sloccount.jpi timestamper
ant.jpi console-column-plugin.jpi email-ext junit matrix-auth.bak nodelabelparameter.jpi ssh-credentials timestamper.bak
antisamy-markup-formatter credentials email-ext.jpi junit.bak matrix-auth.jpi pam-auth ssh-credentials.bak timestamper.jpi
antisamy-markup-formatter.bak credentials.bak envinject junit.jpi matrix-auth.jpi.pinned pam-auth.bak ssh-credentials.jpi token-macro
antisamy-markup-formatter.jpi credentials.jpi envinject.bak junit.jpi.pinned matrix-project pam-auth.jpi ssh-credentials.jpi.pinned token-macro.jpi
antisamy-markup-formatter.jpi.pinned credentials.jpi.pinned envinject.jpi ldap matrix-project.bak pam-auth.jpi.pinned ssh-slaves translation
build-name-setter cvs external-monitor-job ldap.bak matrix-project.jpi parameterized-trigger ssh-slaves.jpi translation.bak
build-name-setter.jpi cvs.bak external-monitor-job.jpi ldap.jpi matrix-project.jpi.pinned parameterized-trigger.bak subversion translation.jpi
build-timeout cvs.jpi javadoc ldap.jpi.pinned maven-plugin parameterized-trigger.jpi subversion.bak translation.jpi.pinned
build-timeout.bak cvs.jpi.pinned javadoc.bak leastload.jpi maven-plugin.bak run-condition subversion.jpi windows-slaves
build-timeout.jpi dashboard-view javadoc.jpi mailer maven-plugin.jpi run-condition.jpi subversion.jpi.pinned windows-slaves.jpi
checkstyle dashboard-view.jpi javadoc.jpi.pinned mailer.bak maven-plugin.jpi.pinned scm-api tasks
checkstyle.bak disk-usage jenkins-multijob-plugin mailer.jpi metrics scm-api.jpi tasks.bak

Labels: cli authentication ssh connection
Priority: Blocker Blocker
Reporter: Raymond Accary

I keep running into this. It's not a consistent behavior as the same CLI command passes/fails randomly.

The command from CLI is: java -jar jenkins-cli.jar -s http://my-URL build job_name --username "admn" --password "admn1234" -p p1=$var p2=$othervar -w

And here's the obtained error:
May 11, 2015 3:04:05 PM WARNING org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator authenticate
CLI authentication failure
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:323)
at java.io.DataInputStream.readUTF(DataInputStream.java:572)
at java.io.DataInputStream.readUTF(DataInputStream.java:547)
at hudson.cli.Connection.readUTF(Connection.java:85)
at hudson.cli.Connection.verifyIdentity(Connection.java:244)
at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:39)
at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)

daniel@beckweb.net (JIRA)

unread,
May 12, 2015, 4:52:01 AM5/12/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

Does it fail randomly for the same user, on the same machine? As the error is in SSH Key authentication, it is dependent on your environment.

raymond.accary@gmail.com (JIRA)

unread,
May 12, 2015, 9:47:01 AM5/12/15
to jenkinsc...@googlegroups.com
Raymond Accary commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

Hi Daniel,
It's the same user. Two machines submitting to the same master often fail.
However, I spent some time looking at things yesterday, and I realized that even in the case where the CLI build submission is actually invoked, the log would still show:
May 12, 2015 6:41:53 AM WARNING org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator authenticate


CLI authentication failure
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:323)
at java.io.DataInputStream.readUTF(DataInputStream.java:572)
at java.io.DataInputStream.readUTF(DataInputStream.java:547)
at hudson.cli.Connection.readUTF(Connection.java:85)
at hudson.cli.Connection.verifyIdentity(Connection.java:244)
at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:39)
at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)

Any ideas?

daniel@beckweb.net (JIRA)

unread,
May 12, 2015, 12:32:01 PM5/12/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

Try to add the -noKeyAuth option to the java -jar jenkins-cli.jar invocation.

raymond.accary@gmail.com (JIRA)

unread,
May 12, 2015, 4:07:01 PM5/12/15
to jenkinsc...@googlegroups.com
Raymond Accary commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

-noKeyAuth, can you explain a bit on what this option would do?
Note that: the master is password-protected.

daniel@beckweb.net (JIRA)

unread,
May 12, 2015, 4:26:01 PM5/12/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

It will prevent trying to authorize using an SSH key (e.g. ~/.ssh/id_rsa) which the CLI does by default.

raymond.accary@gmail.com (JIRA)

unread,
May 12, 2015, 4:33:01 PM5/12/15
to jenkinsc...@googlegroups.com
Raymond Accary commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

How will it handle the authorization then?
Another thing, had this been always failing or passing, I wouldn't be this skeptical on this solution.
The fact that it's an inconsistent/random/intermittent failure is the troubling part. Any ideas on what could be the reason?

daniel@beckweb.net (JIRA)

unread,
May 12, 2015, 4:41:01 PM5/12/15
to jenkinsc...@googlegroups.com

How will it handle the authorization then?

You're specifying user name and password on the command line.

dbeck@cloudbees.com (JIRA)

unread,
Jun 15, 2015, 5:24:03 PM6/15/15
to jenkinsc...@googlegroups.com

raymond.accary@gmail.com (JIRA)

unread,
May 3, 2016, 2:43:01 PM5/3/16
to jenkinsc...@googlegroups.com
Raymond Accary commented on Bug JENKINS-28346
 
Re: Inconsistent CLI failiures

It still shows in the logs as a warning.

raymond.accary@gmail.com (JIRA)

unread,
May 3, 2016, 4:44:01 PM5/3/16
to jenkinsc...@googlegroups.com
Raymond Accary updated an issue
Change By: Raymond Accary
Priority: Blocker Minor
Reply all
Reply to author
Forward
0 new messages