# Remote jenkins pipelien flow fails when calling from jenkins cli

**URL:** <https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422>\
**Category:** Community\
**Tags:** question, pipeline\
**Created:** [June 27, 2024, 7:29am UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422 "2024-06-27T07:29:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pridesai](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pridesai](https://community.jenkins.io/u/pridesai)\
**Post date:** [June 27, 2024, 7:29am UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422/1 "2024-06-27T07:29:17Z")

</div>

the parameters are not being recognised  
pipeline fails with null pointer exception

Failed because of java.lang.NullPointerException: Cannot invoke method trim() on null object

command used was

java -jar jenkins\_2.235.2/jenkins-cli.jar -s [https://jenkins](https://jenkins):port/ -auth _ **/** _ build ‘Testing Job’ -p BU=ABC

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [June 27, 2024, 7:43am UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422/2 "2024-06-27T07:43:20Z")

</div>

Hello and welcome to this community, @pridesai. 👋

The command you’re using seems to be missing the authentication token after `-auth`. As far as I know, the `-auth` option should be followed by a `username` and `token` in the format `username:token`.

---

<div class="post-metadata">

**Author:** ![pridesai](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pridesai](https://community.jenkins.io/u/pridesai)\
**Post date:** [June 27, 2024, 8:38am UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422/3 "2024-06-27T08:38:15Z")

</div>

Hi @poddingue ,

thanks for reply  
I am using auth - here I did not pasted

it is triggering the pipeline with correct parameters  
but once pipeline starts it fails with null pointer exception

thanks  
Priya

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [June 27, 2024, 8:54am UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422/4 "2024-06-27T08:54:30Z")

</div>

I’m afraid we would need some more logs to try and help. 🤷

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [June 27, 2024, 12:01pm UTC](https://community.jenkins.io/t/remote-jenkins-pipelien-flow-fails-when-calling-from-jenkins-cli/16422/5 "2024-06-27T12:01:39Z")

</div>

Have you passed all parameters that are defined in the job to the cli command?
