How set JENKINS_JAVA_OPTIONS under Windows ( Exception: URI must start with a slash ) ?

3,519 views
Skip to first unread message

Ed Sutton

unread,
Apr 4, 2011, 3:02:43 PM4/4/11
to jenkins...@googlegroups.com
"Error 400 Status Code: 400< Exception: URI must start with a slash."

I do not understand why, but under Linux, editing /etc/sysconfig/jenkins fixed this problem. What is the equivalent configuration file under Windows XP?

-Ed


Under Linux, adding -Dhudson.DNSMultiCast.disabled=true to the /etc/sysconfig/jenkins JENKINS_JAVA_OPTIONS line seemed to fix. No clue why.

## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
# EES - Adding -Dhudson.DNSMultiCast.disabled=true seemed to fix a start-up hang problem:
# See http://jenkins.361315.n4.nabble.com/Can-t-get-past-quot-getting-ready-to-work-screen-quot-td2552479.html
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"


Richard Bywater

unread,
Apr 4, 2011, 5:25:55 PM4/4/11
to jenkins...@googlegroups.com
Setting it via Control Panel -> System -> Advanced -> Environment Variables should do the trick I'd think (either as a the Jenkins' user environment or System wide)  (Note I haven't done it myself so can't guarantee success :) )

Richard.

Geoff Bullen

unread,
Apr 4, 2011, 6:32:04 PM4/4/11
to Jenkins Users
Are you running it as a windows service? If so, just update the
<arguments> element in the service config file and restart the
service. The config file can be found at %JENKINS_HOME%\jenkins.xml

Cheers, Geoff

On Apr 5, 5:02 am, Ed Sutton <ESut...@fescorp.com> wrote:
> "Error 400 Status Code: 400< Exception: URI must start with a slash."
>
> I do not understand why, but under Linux, editing /etc/sysconfig/jenkins fixed this problem.  What is the equivalent configuration file under Windows XP?
>
> -Ed
>
> Under Linux, adding -Dhudson.DNSMultiCast.disabled=true to the /etc/sysconfig/jenkins JENKINS_JAVA_OPTIONS line seemed to fix. No clue why.
>
> ## Type:        string
> ## Default:     "-Djava.awt.headless=true"
> ## ServiceRestart: jenkins
> #
> # Options to pass to java when running Jenkins.
> #
> # EES - Adding -Dhudson.DNSMultiCast.disabled=true seemed to fix a start-up hang problem:
> # Seehttp://jenkins.361315.n4.nabble.com/Can-t-get-past-quot-getting-ready...
> JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"

Ed Sutton

unread,
Apr 5, 2011, 6:02:27 PM4/5/11
to jenkins...@googlegroups.com

On Apr 4, 2011, at 5:32 PM, Geoff Bullen wrote:

> Are you running it as a windows service? If so, just update the
> <arguments> element in the service config file and restart the
> service. The config file can be found at %JENKINS_HOME%\jenkins.xml

Yes, the Windows native package installs Jenkins as a Windows service and the config file was installed to:

C:\Program Files\Jenkins\jenkins.xml

As you suggested, I updated the <arguments> element and all is good! Thank you for your help!

Now if I can only figure out how to make the Windows Jenkins a slave to my Linux Jenkins master, then Jenkins will rule them all !

-Ed


>
> Cheers, Geoff
>
> On Apr 5, 5:02 am, Ed Sutton <ESut...@fescorp.com> wrote:
>> "Error 400 Status Code: 400< Exception: URI must start with a slash."
>>
>> I do not understand why, but under Linux, editing /etc/sysconfig/jenkins fixed this problem. What is the equivalent configuration file under Windows XP?
>>
>> -Ed
>>
>> Under Linux, adding -Dhudson.DNSMultiCast.disabled=true to the /etc/sysconfig/jenkins JENKINS_JAVA_OPTIONS line seemed to fix. No clue why.
>>
>> ## Type: string
>> ## Default: "-Djava.awt.headless=true"
>> ## ServiceRestart: jenkins
>> #
>> # Options to pass to java when running Jenkins.
>> #
>> # EES - Adding -Dhudson.DNSMultiCast.disabled=true seemed to fix a start-up hang problem:
>> # Seehttp://jenkins.361315.n4.nabble.com/Can-t-get-past-quot-getting-ready...
>> JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"


-Ed

Richard Mortimer

unread,
Apr 5, 2011, 7:25:28 PM4/5/11
to ESu...@fescorp.com, jenkins...@googlegroups.com

On 05/04/2011 23:02, Ed Sutton wrote:
>
> On Apr 4, 2011, at 5:32 PM, Geoff Bullen wrote:
>
>> Are you running it as a windows service? If so, just update the
>> <arguments> element in the service config file and restart the
>> service. The config file can be found at %JENKINS_HOME%\jenkins.xml
>
> Yes, the Windows native package installs Jenkins as a Windows service and the config file was installed to:
>
> C:\Program Files\Jenkins\jenkins.xml
>
> As you suggested, I updated the<arguments> element and all is good! Thank you for your help!
>
> Now if I can only figure out how to make the Windows Jenkins a slave to my Linux Jenkins master, then Jenkins will rule them all !
>

Take a look at
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service

The jnlp slave as a service setup is pretty easy.

Regards

Richard

Brian Smith

unread,
Apr 5, 2011, 8:15:50 PM4/5/11
to jenkins...@googlegroups.com, Ed Sutton
Ed

Sorry tried to make this clear in the other thread.

You simply do not need to install the Jenkins server on a slave node.  You are best off uninstalling it.

The master node, after being told about a slave node via the configuration page, will connect to the slave node and transfer to it the jars it needs in order to run a slave agent.  

It will, if configured, install the slave agent as a windows service too.  

You are able to set environment variables to be used in the slave agent's environment from the slave node's configuration page on the master.

Hope that's clearer.

Brian
Reply all
Reply to author
Forward
0 new messages