Salve connection on windows - which is the most stable?

25 views
Skip to first unread message

Martin B.

unread,
Aug 19, 2011, 3:09:00 AM8/19/11
to jenkins...@googlegroups.com
Hi!

I'm having my slaves *run* as Windows Services *connecting* through
JNLP/WebStart.

Basically daily, some of the slaves goes offline with

java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.ObjectInputStream$
PeekInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$
BlockDataInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$
BlockDataInputStream.peekByte(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1030)

and to get them back online I need to restart their Windows Services.

(The windows service on the slave node keep running, although the slave
itself is offline.)

So I was thinking if one of the other methods would be more stable?

* "Control this Slave as a Windows service" doesn't work at all in my
company network. (For whatever reason.)
* SHH is Unix only. (or ???)
* "Command on the master" - what exactly could I use for Windows -> Windows?

cheers,
Martin

Costin Caraivan

unread,
Aug 19, 2011, 4:24:24 PM8/19/11
to jenkins...@googlegroups.com
Hello,

We're connecting from Windows 2008 -> Windows 2008, and JNLP works ok. You could try DCOM, see this fixes for some Windows issues:
https://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM

Lynn Lin

unread,
Aug 21, 2011, 7:55:35 PM8/21/11
to jenkins...@googlegroups.com

No, if the slave setup ssh server, it is fine

Martin B.

unread,
Aug 22, 2011, 3:11:18 AM8/22/11
to jenkins...@googlegroups.com
On 22.08.2011 01:55, Lynn Lin wrote:
>
> 在 2011-8-19 下午3:09,"Martin B." <0xCDC...@gmx.at
> <mailto:0xCDC...@gmx.at>>写道:

> >
> > Hi!
> >
> > I'm having my slaves *run* as Windows Services *connecting* through
> JNLP/WebStart.
> >
> > Basically daily, some of the slaves goes offline with
> >
> > java.net.SocketTimeoutException: Read timed out
> > at java.net.SocketInputStream.socketRead0(Native Method)
> > ...

> > and to get them back online I need to restart their Windows Services.
> >
> > (The windows service on the slave node keep running, although the
> slave itself is offline.)
> >
> > So I was thinking if one of the other methods would be more stable?
> >
> > * ...

> > * SHH is Unix only. (or ???)
>
> No, if the slave setup ssh server, it is fine

Thanks!

Maybe I should try that.

Is there any description / recommendations on using SSH on Windows on
the Wiki yet?

cheers,
Martin

Robert Simon

unread,
Sep 5, 2011, 5:58:01 AM9/5/11
to jenkins...@googlegroups.com

Hi Martin,

 

You can set up a scheduled task on your slave machine which checks if the slave-app is still running.

 

Call every minute a batch like:

for /f %%A in ('tasklist ^| find "javaw.exe"') do goto end

call "C:\Program Files\hudson_agent\start_hudson.bat"

:end

 

And in the start batch:

title hudson_agent

"C:\Java\jre1.6.0_23_x64\bin\javaws" http://MASTER/computer/SLAVE/slave-agent.jnlp

 

The limitation of this approach is that you need to know that there is only one javaw process running on the slave machine. If you have more than one you need to find a way to check for the one which runs the slave app. Second limitation is that tasklist doesn’t exist on all windows versions.

 

Regards,

Robert

Reply all
Reply to author
Forward
0 new messages