title: jenkins-cli get node doesn't work
body: <p>I have created a jenkins node using jenkins-cli create node command. The node gets created successfully and I could see it in the web interface.</p>
  
  <pre><code>NODE_NAME=$1
  LABEL=$2
  cat &lt;&lt;EOF | java -jar jenkins-cli.jar -s http://myjenkins/jenkins/ create-node --username userId --password testPwd $1
  &lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;slave&gt;
    &lt;name&gt;${NODE_NAME}&lt;/name&gt;
    &lt;description&gt;&lt;/description&gt;
    &lt;remoteFS&gt;/Users/jenkins1/Desktop/workspace&lt;/remoteFS&gt;
    &lt;numExecutors&gt;1&lt;/numExecutors&gt;
    &lt;mode&gt;EXCLUSIVE&lt;/mode&gt;
    &lt;retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/&gt;
    &lt;launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.22"&gt;
      &lt;host&gt;test&lt;/host&gt;
      &lt;port&gt;22&lt;/port&gt;
      &lt;credentialsId&gt;test&lt;/credentialsId&gt;
      &lt;maxNumRetries&gt;0&lt;/maxNumRetries&gt;
      &lt;retryWaitTime&gt;0&lt;/retryWaitTime&gt;
      &lt;sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy"/&gt;
    &lt;/launcher&gt;
    &lt;label&gt;${LABEL}&lt;/label&gt;
    &lt;nodeProperties&gt;
      &lt;hudson.slaves.EnvironmentVariablesNodeProperty&gt;
        &lt;envVars serialization="custom"&gt;
          &lt;unserializable-parents/&gt;
          &lt;tree-map&gt;
            &lt;default&gt;
              &lt;comparator class="hudson.util.CaseInsensitiveComparator"/&gt;
            &lt;/default&gt;
            &lt;int&gt;1&lt;/int&gt;
            &lt;string&gt;MVN_REPOS&lt;/string&gt;
            &lt;string&gt;/Users/jenkins1/Desktop/workspace&lt;/string&gt;
          &lt;/tree-map&gt;
        &lt;/envVars&gt;
      &lt;/hudson.slaves.EnvironmentVariablesNodeProperty&gt;
    &lt;/nodeProperties&gt;
  &lt;/slave&gt;
  EOF
  </code></pre>
  
  <p>But when I try to get the node after it has been created using jenkins-cli I get no such node error. However, I am able to get the node after saving the configuration through Jenkins UI. Could you please help me to fix this error.</p>
  
  <p>java -jar jenkins-cli.jar -s <a href="http://myjenkins/jenkins/" rel="nofollow noreferrer">http://myjenkins/jenkins/</a> get-node 'tests' --username userId --password testPwd</p>
  
  <p>ERROR: No such node 'tests'</p>