Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Install Slave as Windows Service(How to install slave as windows service with Hudson 3.0.0)
Install Slave as Windows Service [message #1016519] Wed, 06 March 2013 18:19 Go to next message
Daniel Lindberg is currently offline Daniel Lindberg
Messages: 2
Registered: March 2013
Junior Member
I've seen the bug report for this issue, https://bugs.eclipse.org/bugs/show_bug.cgi?id=401530. Unfortunately, I didn't see a work around for this. Is there a way to install a slave as a windows service with Hudson 3.0?

Thanks -- Dan'l
Re: Install Slave as Windows Service [message #1017073 is a reply to message #1016519] Fri, 08 March 2013 20:47 Go to previous messageGo to next message
Daniel Lindberg is currently offline Daniel Lindberg
Messages: 2
Registered: March 2013
Junior Member
it looks like that bug link is no longer valid. Here's another one. https://bugs.eclipse.org/bugs/show_bug.cgi?id=382490
That one hasn't suggested a workaround either.
Re: Install Slave as Windows Service [message #1022852 is a reply to message #1017073] Fri, 22 March 2013 16:40 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 426
Registered: August 2011
Location: Fremont, CA USA
Senior Member
The issue happened because of Java Native Access library required to install as windows service was moved to a plugin. This broke installing as service. I marked the bug to be fixed for 3.0.2, and we will look in to that try to fix fro 3.0.2.

Winston Prakash
Eclipse Hudson team
Re: Install Slave as Windows Service [message #1048142 is a reply to message #1022852] Wed, 24 April 2013 05:07 Go to previous messageGo to next message
Winston Prakash is currently offline Winston Prakash
Messages: 426
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I have fixed it in Hudson 3.1.0. But it will be released in beginning of July. Mean while I created a war (version 3.0.1-b3) for immediate use

http://hudson-ci.org/download/war/3.0.1-b3/hudson-3.0.1-b3.war


Winston Prakash
Eclipse Hudson team
Re: Install Slave as Windows Service [message #1065756 is a reply to message #1048142] Thu, 27 June 2013 11:58 Go to previous messageGo to next message
k z is currently offline k z
Messages: 71
Registered: October 2012
Member
I've just tiried that. I'm using role-based authorization strategy and active directory plugins for security. The service installed itself successfully but there is a problem with connection.

If I do not specify credentials I got 403 exception
Failing to obtain https://<MyTestHudsonURL>/computer/nemedia/slave-agent.jnlp
java.io.IOException: Failed to load https://<MyTestHudsonURL>/computer/nemedia/slave-agent.jnlp: 403 Forbidden
	at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:222)
	at hudson.remoting.Launcher.run(Launcher.java:184)
	at hudson.remoting.Launcher.main(Launcher.java:160)
Waiting 10 seconds before retry


If I specify credentials (-jnlpCredentials <user>:<password>) I got NoClassDefFoundError exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
	at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:213)
	at hudson.remoting.Launcher.run(Launcher.java:184)
	at hudson.remoting.Launcher.main(Launcher.java:160)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Base64
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 3 more


The only way I was able to get slave connected to master was to either grant Anonymous user Read permission (which is not acceptable in production env) or download slave-agent.jnlp to my file system and point out to that file in config. In both cases exception was thrown but the connection was successful.

May 29, 2013 8:37:54 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
May 29, 2013 8:37:54 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://<MyTestHudsonURL>/, https://<MyTestHudsonURL>:443/]
May 29, 2013 8:37:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to <MyTestHudsonURL>:51996
May 29, 2013 8:37:55 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
May 29, 2013 8:37:56 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
May 29, 2013 8:37:58 AM org.eclipse.hudson.jna.NativeUtils <init>
INFO: Error getting Native Support Extensions
java.lang.NullPointerException
	at org.eclipse.hudson.jna.NativeUnixSupport.all(NativeUnixSupport.java:46)
	at org.eclipse.hudson.jna.NativeUtils.getAvailableNativeUnixSupports(NativeUtils.java:74)
	at org.eclipse.hudson.jna.NativeUtils.<init>(NativeUtils.java:48)
	at org.eclipse.hudson.jna.NativeUtils.<clinit>(NativeUtils.java:44)
	at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
	at java.io.ObjectStreamClass.computeDefaultSUID(Unknown Source)
	at java.io.ObjectStreamClass.access$100(Unknown Source)
	at java.io.ObjectStreamClass$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.io.ObjectStreamClass.getSerialVersionUID(Unknown Source)
	at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at hudson.remoting.UserRequest.deserialize(UserRequest.java:171)
	at hudson.remoting.UserRequest.perform(UserRequest.java:91)
	at hudson.remoting.UserRequest.perform(UserRequest.java:41)
	at hudson.remoting.Request$2.run(Request.java:276)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:53)
	at java.lang.Thread.run(Unknown Source)


Are you planning to integrate slave windows service somehow better with hudson security model or I should use workaround with local slave-agent.jnlp file ?
Re: Install Slave as Windows Service [message #1387607 is a reply to message #1065756] Wed, 25 June 2014 10:17 Go to previous message
Lukasz Jader is currently offline Lukasz Jader
Messages: 35
Registered: October 2013
Member
Hi, this part of slave .jnlp has no effect since java java 7u45:
<property name="hudson.showWindowsServiceInstallLink" value="true"/>
This property is not passed so menu option is NOT shown - starting from java 7u45 launch descriptor (JNLP file) need to be signed in order to set 'insecure' system properties.

This also needs to be fixed.

Taken from: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382490
Previous Topic:What would you like to see in Hudson 3.2?
Next Topic:Hudson/Ant issue with Websphere Application Server 7
Goto Forum:
  


Current Time: Tue Sep 30 22:09:25 GMT 2014

Powered by FUDForum. Page generated in 0.01632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software