timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-9911] JNLP slave JVM options are ignored when installing as a service #6585

Open timja opened 13 years ago

timja commented 13 years ago

Under node configuration, advanced launch options, JVM options are not copied to the jenkins-slave.xml file after executing install windows service function. We can work around this issue by manually editing the jenkins-slave.xml file.


Originally reported by awaragi, imported from: JNLP slave JVM options are ignored when installing as a service
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 12 years ago

garen:

For me this also happens if the launch method is "Let Jenkins control this Windows slave as a Windows service."

Jenkins should use the JDK/JRE path to java.exe already installed on the slave system if present, if it did it would also fix JENKINS-6957 for me (system couldn't find java.exe without manually hacking jenkins-slave.xml or adding C:\Windows\SysWOW64 to PATH).

timja commented 11 years ago

thiagoc:

Same problem here.

timja commented 10 years ago

danielbeck:

Did anyone try this recently? Did it work? From a cursory reading of the sources, this appears to still be unresolved as of 1.584 or so:
https://github.com/jenkinsci/windows-slave-installer-module/blob/master/src/main/java/org/jenkinsci/modules/windows_slave_installer/WindowsSlaveInstaller.java#L97
https://github.com/jenkinsci/windows-slave-installer-module/blob/master/src/main/resources/org/jenkinsci/modules/windows_slave_installer/jenkins-slave.xml
No VMARGS are set, so no way to add anything between -Xrs and -jar.

timja commented 9 years ago

kamrup:

I tried it on 1.599 - doesn't work.

timja commented 7 years ago

oleg_nenashev:

I agree the behavior may be unexpected. It needs to be fixed or documented

timja commented 7 years ago

oleg_nenashev:

For newly installed agents it should work correctly: https://github.com/jenkinsci/windows-slave-installer-module/blob/master/src/main/resources/org/jenkinsci/modules/windows_slave_installer/jenkins-slave.xml#L44 . Works for me at least

timja commented 7 years ago

ifernandezcalvo:

I tested on 2.46.3 with Windows 2012R2 and the JVM Options are ignored when you install the service from the launch button.

 



jenkinsslave-c__jenkins
jenkinsslave-c__jenkins
This service runs a slave for Jenkins continuous integration system.

C:\Program Files\Java\jre1.8.0_111\bin\java.exe
-Xrs -jar "%BASE%\slave.jar" -jnlpUrl http://192.168.100.5:8080/computer/test/slave-agent.jnlp -secret 5c0dda278f8249acb70a83dccb040537a413655fb3665cac373f9e0ed3ee3ab1

rotate

"restart" />
timja commented 2 years ago

[Originally duplicated by: JENKINS-9908]

timja commented 2 years ago

[Originally duplicated by: JENKINS-9909]

timja commented 2 years ago

[Originally duplicated by: JENKINS-9910]

timja commented 2 years ago

[Originally related to: JENKINS-2452]

timja commented 2 years ago

[Originally related to: JENKINS-16061]