java cli able to create-job and delete-job but enable-job/disable-job fail

35 views
Skip to first unread message

eric....@broadcom.com

unread,
Nov 15, 2018, 3:48:25 PM11/15/18
to Jenkins Users
I am using jenkins 2.141 but I have had this problem since at least jenkins 2.122

I can create and delete jobs using the java cli

For example

wget http://jenkins/hnd/jnlpJars/jenkins-cli.jar -o /var/tmp/jenkins-cli.log -O $HOME/bin/jenkins-cli.jar

java -jar $HOME/bin/jenkins-cli.jar -user $LOGNAME -ssh -s http://jenkins/hnd create-job foo < foo/config.xml

java -jar $HOME/bin/jenkins-cli.jar -user $LOGNAME -ssh -s http://jenkins/hnd delete-job foo

But attempts to use 

java -jar $HOME/bin/jenkins-cli.jar -user eb888198 -ssh -s http://jenkins/hnd enable-job foo
Nov 15, 2018 12:45:22 PM org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver reloadHostConfigEntries
INFO: resolveEffectiveResolver($LOGNAME@jenkins:45259) loaded 1 entries from $HOME/.ssh/config

ERROR: object is not an instance of declaring class

I can do this successfully on other Jenkins instances but not this one, which implies some sort of configuration issue.
There aren't any error messages in the logs when I run the commands

--
Eric Boehm
Broadcom



Reply all
Reply to author
Forward
0 new messages