Recommended way to setup a windows agent nowadays ?

43 views
Skip to first unread message

Francois Marot

unread,
Nov 23, 2020, 6:24:01 AM11/23/20
to Jenkins Users

Hello Jenkins users,

I'm in the process of upgrading my Jenkins installation. My Jenkins Linux master has been updated with the latest LTS but not the agents for the moment.
I'm wondering how to update the Windows agents.
For exemple: one outputs the following logs:
> "WARNING: Remoting version is older than a minimum required one (3.14). Connection will not be rejected, but the compatibility is NOT guaranteed"

I think it was configured with JavaWebStart and runs as a service but I also think that Java Web Start is more or less deprecated in Java 8+.
On the other hand, configuring with the other way (WMI I think) leads to the following help message in Jenkins master:
> " This launch method relies on DCOM and is often associated with subtle problems. Consider using Launch agents using Java Web Start instead "

So my question is: what is the preffered way to setup a windows agent connected to a Linux master nowadays ? Isn't JNLP deprecated ? Is there an up to date definitive doc ?

Thanks

Jérôme Godbout

unread,
Nov 23, 2020, 9:12:23 AM11/23/20
to jenkins...@googlegroups.com

Hi,

 

if you are using Windows 10 for your slave, just enable the Windows Features for OpenSSH client and server. This would make it just like a Linux node. Make sure to put your Java install into a path without spaces (I think the fix is in the pipeline depending of the Jenkins version you have).

That make it easier as it do just like linux to log in and seem more safe to me, you just put the credentials into the Jenkins master for the ssh key.

 

 


une compagnie 

RAPPROCHEZ LA DISTANCE

Jérôme Godbout
Développeur Logiciel Sénior / 
Senior Software Developer

p: +1 (418) 800-1073 ext.:109

amotus.ca
statum-iot.com

   

COVID-19 : we are glad to inform you that Amotus are up and running with limited impact on our performance. We will keep you informed of any changes as they occur.

COVID-19 : nous sommes fiers d’informer nos collaborateurs que Amotus opèrent adéquatement et que l’impact sur notre productivité est minimisé. Nous vous tiendrons au courant de tout changement.

--
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/6dd94526-10df-4c77-b734-dda9d7308e54n%40googlegroups.com.

Slide

unread,
Nov 23, 2020, 12:22:19 PM11/23/20
to Jenkins User Mailing List
I would highly recommend switching to using SSH for Windows agents. The Win32-OpenSSH implementation from MS is supported from Windows 7 on (though Windows 7 is EOL). This makes it easier to maintain your agents because both the Windows and Linux agents are using the same mechanism. I've been meaning to write a blog post about this, but haven't had the time to. I switched all of my agents over to SSH last year and it has been working very well for me.

Regards,

Alex



--

Francois Marot

unread,
Nov 23, 2020, 5:00:51 PM11/23/20
to Jenkins Users
Thanks Jerome and Slide. Seems like SSH on Windows is the new way to go (it feels so strange to say these words, "ssh on Windows"...) !
Thanks

David Aldrich

unread,
Nov 26, 2020, 12:51:13 PM11/26/20
to jenkins...@googlegroups.com
I would like to connect to Windows agents via SSH (currently using JNLP). I've installed OpenSSH client and server on the Windows machine, but not sure what to do next. In the agent configuration I've selected:

'Launch agents via ssh'

but when I launch I get:

[11/26/20 17:49:12] [SSH] Opening SSH connection to jenkins-win02:22.
Searching for jenkins-win02 in /var/lib/jenkins/.ssh/known_hosts
Searching for jenkins-win02:22 in /var/lib/jenkins/.ssh/known_hosts
[11/26/20 17:49:18] [SSH] WARNING: No entry currently exists in the Known Hosts file for this host. Connections will be denied until this new host and its associated key is added to the Known Hosts file.
Key exchange was not finished, connection is closed.

What should I do now? (Don't know how to add the host to /var/lib/jenkins/.ssh/known_hosts).

Best regards
David


Jérôme Godbout

unread,
Nov 26, 2020, 1:57:10 PM11/26/20
to jenkins...@googlegroups.com

You might need to manually connect for a first time to the host to add it or here is the script command line I do when I want to add a host to the known host file:

 

"ssh-keygen -R ${domain} -f \"${know_host_path}\""

"ssh-keygen -t rsa ${domain} >> \"${know_host_path}\""

 

know_host_path is normally ~/.ssh/ known_hosts

 


une compagnie 

RAPPROCHEZ LA DISTANCE

Jérôme Godbout
Software / Firmware Lead

p: +1 (418) 800-1073 ext.:109

amotus.ca
statum-iot.com

   

COVID-19 : we are glad to inform you that Amotus are up and running with limited impact on our performance. We will keep you informed of any changes as they occur.

COVID-19 : nous sommes fiers d’informer nos collaborateurs que Amotus opèrent adéquatement et que l’impact sur notre productivité est minimisé. Nous vous tiendrons au courant de tout changement.

 

Reply all
Reply to author
Forward
0 new messages