My windows slave is running as unix slave in Jenkins? - jenkins

it is weird that jenkins no recognizing slave as windows. it is launched as JAVA WEBSTART but it runs as unix slave. How can i have this run as windows slave?
JNLP agent connected from /198.112.40.148
<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 2.21
This is a Unix slave
WARNING: C:\softs\jenkins looks suspiciously like Windows path. Maybe you meant C:/softs/jenkins?
Copied maven-agent.jar
Copied maven3-agent.jar
Copied maven3-interceptor.jar
Copied maven-interceptor.jar
Copied maven2.1-interceptor.jar
Copied plexus-classworld.jar
Copied classworlds.jar
Slave successfully connected and online

Jenkins tries to guess the OS based on parth.separator. For some reason your java process has it set wrongly.
Are you over-riding the path.separator property in your command line?

If cygwin is involved with this, then perhaps you are connecting to a Unix-ish environment on top of Windows.

Related

linux slave is not coming online after jenkins service restart. Jenkins master is on windows

I have my jenkins installed on windows . and have two linux node added to it.
for some reason I needed to restart the jenkins service and now my linux is not coming online.but
when I go to these nodes I can see the option to mark them offline Which I believe comes when node is actually online like below
[![enter image description here][2]][2]
How To bring these nodes back online. before jenkins restart everything was fine and I have not made any changes to slaves.
**Changes I made to jenkins.xml before restart was **
Changed the java version
<executable>C:\Program Files\Java\jdk-17.0.5\bin\java.exe</executable>
Added keystore value in pre existing argument
<arguments>-Xrs -Xmx512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhudson.model.DirectoryBrowserSupport.CSP="" -jar "%BASE%\jenkins.war" --httpPort=-1 --httpsPort=8000 -httpsKeyStore="jenkins.jks" --httpsKeyStorePassword=xxxxx -webroot="%BASE%\war"</arguments>
I don't think your changes had anything to do with the error. Try these options:
Go into the Linux VMs and make sure they are online
Ping the Linux VMs from the master VM to see if they are reachable
Edit the slave node configuration, check everything is as it was before, and save
Finally, remove the slave nodes and add them again

How to set / connect jenkins slave agent back on previous machine

Is there any possibility to set a slave agent back to the previous machine without deleting the agent / node? Will the node be completely deleted if i'm deleting the agent?
In my case for example, if someone has installed by accident the agent via "Launch"-Button (Java WS) on an other machine. But this other machine is not intended to have an connection with the agent (because of missing files and wrong user).
He got the option displayed to add an agent for his current used machine (wrong machine) which led to the problem, but now i don't see this option ("Launch"-Button) anymore to reconnect the agent with the previous necessary machine.
Maybe this could be a resolution?
Already tried:
Using following command line on required slave machine in C:\Jenkins:
java -jar slave.jar -jnlpUrl http://<<build-server:port>>/computer/<<agent name>>/slave-agent.jnlp
Execution wasn't successful..
Thanks in advance!!

Jenkins ssh from Linux server to a Windows node

Linux is the operating system for my Jenkins server. How to configure a job to run a .bat script on a windows node? Is this even possible to go cross platform like that?
We have Ubuntu Jenkins server that runs jobs on Windows slave nodes. We had a Windows Jenkins server and we use the same jobs, without modification, running on the Ubuntu master. Maybe this or this link could be helpful.
We connect Windows nodes to the Ubuntu master the same way we connected them to the Windows master. For more info about connecting nodes see this article.

Jenkins Master on Linux to trigger PowerShell script on windows slave

I have a Linux server where I have installed Jenkins and I have a windows slave server too. Just wanted to know is it possible to run powershell task from windows slave as we have Jenkins installed on Linux server? Or do I need to make a windows master to run all these powershell tasks?
This is possible. Make sure that you select the appropriate slave (using label expressions) to execute the job.

Why does my Jenkins Slave Java Web Start Require Sudo?

I get symptoms similar to jenkins slave can't get started except my slave is a Mac, my master is a linux box, and I've discovered that running the javaws https-blah-blah.jnlp command only works if I use sudo.
How can I investigate this and get to the point of not needing sudo? When I run javaws, I only see a tiny Jenkins slave agent window. Is there a log file somewhere -- or is there a verbose mode?

Resources