Remote build with token parameter crashing

27 views
Skip to first unread message

John Marks

unread,
Sep 15, 2015, 1:30:03 PM9/15/15
to Jenkins Users
I'm using the following linux command line to do a remote build using Jenkins version 1.613


What I get looks like a long HTML response that's expecting a log in followed by a stack trace which says it can't find method java.net.URLEncoder.encode().

A similar command line (host, build name and token differ) run against version 1.541 works flawlessly. I've tried the above using both Java 1.7. and 1.8 with the same result.

Can someone help me figure out what might be wrong?

zhu kane

unread,
Sep 16, 2015, 4:02:14 AM9/16/15
to jenkins...@googlegroups.com
IMO the remote api of parameter build does not work if you enabled authentication, there is no workaround especially you are using oauth2.

You can workaround it via Build Token Root plugin.



Kane

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4dfba08f-9091-43fb-a5b1-aa63a6ec8224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Marks

unread,
Sep 16, 2015, 8:35:52 AM9/16/15
to Jenkins Users
The same thing happens with the Build Token Root Plugin (XXXXX is used instead of the real server DNS):


I'm running with Tomcat 7.0.47, so I also made sure that URI encoding is UTF-8 (I don't get a warning in the Jenkins console anymore.)

Something else is wrong. Should I try running with a different container or installing the latest version?

Christopher Orr

unread,
Sep 17, 2015, 6:34:28 PM9/17/15
to jenkins...@googlegroups.com
It would probably help to post the error message somewhere.

Regarding the Build Token Root Plugin, its documentation says you should
use /buildByToken/build?job=NAME&token=TOKEN — so I guess that deciding
to use /job/NAME/buildByToken/build?token=TOKEN isn't likely to work.

Regards,
Chris
Reply all
Reply to author
Forward
0 new messages