Java install for Windows agent?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Java install for Windows agent?

David Aldrich-3
Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

I don't know why it's choosing that path as I have not specified a Java path.

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

Thanks
David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Java install for Windows agent?

zil...@gmail.com
JDK11 is now available. Let the installer decide where to install it, and set your JAVA_HOME variable to point to it.

Chris

On Thursday, November 26, 2020 at 2:03:39 PM UTC-5 DavidA wrote:
Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

I don't know why it's choosing that path as I have not specified a Java path.

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

Thanks
David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/901455de-7a84-46c4-b43e-fd343d38f939n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout
In reply to this post by David Aldrich-3

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

Re: Java install for Windows agent?

David Aldrich-3

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

Any idea why it can't access remoting.jar?

Best regards
David


On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

Re: Java install for Windows agent?

David Aldrich-3
Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...

but cd does not change drive, it remains on C: and can't find \jenkins and so fails.

I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:


cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jason Pyeron

We use a junction.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jason Pyeron

Unlike most POSIX (Unix) like systems where there is only one root file system, windows has multiple.

 

As such you have multiple current working directories, one per root.

 

You may be in C:\Program Files\Java\jdk\bin and D:\home\myusername\ and E:\projects\projectx\ at the same time. You need to inform the system which file system (volume) is the current volume.

 

E.g.

 

Microsoft Windows [Version 10.0.18363.778]

(c) 2019 Microsoft Corporation. All rights reserved.

 

C:\Users\jpyeron.000>D:

 

D:\>C:

 

C:\Users\jpyeron.000>CD D:\inst

 

C:\Users\jpyeron.000>D:

 

D:\inst>CD \\?\C:\

'\\?\C:\'

CMD does not support UNC paths as current directories.

 

D:\inst>CD /D C:\

 

C:\>CD /?

Displays the name of or changes the current directory.

 

CHDIR [/D] [drive:][path]

CHDIR [..]

CD [/D] [drive:][path]

CD [..]

 

  ..   Specifies that you want to change to the parent directory.

 

Type CD drive: to display the current directory in the specified drive.

Type CD without parameters to display the current drive and directory.

 

Use the /D switch to change current drive in addition to changing current

directory for a drive.

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 11:34 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f3101d6c4de%243af7a3e0%24b0e6eba0%24%40pdinc.us.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jason Pyeron
In reply to this post by Jérôme Godbout

Should have been more clear –

 

We use a junction so actual files and directories are on the desired drives and paths. When setting up a node we identify the “default” CWD w/ active drive – this is either replaced with a junction or the subdirectories are made as junctions.

 

These junctions also include setting up various tools to directories without spaces in the name e.g. CWD\tools\junction-to-jdk -> c:\program files\Java\jdk-x.y.z\

 

-Jason

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 11:34 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f5701d6c4df%240f06e6f0%242d14b4d0%24%40pdinc.us.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout

Yeah I understand that part, but my point was more why does the CWD need to be the workDir prior to launch the remoting.jar, that seem to be useless, the remoting.jar should take care of it, it already has that path as --workDir, or maybe add a flag to avoid that requirement of moving to the root dir. That would also avoid that change root drive need under windows and clean the command too. I don’t see why this can’t be done no matter the junction usage.

 

cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

would become something:

C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -cwd c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

That would make more sens to me what do you thing? it would be easier to change cwd into the Java code and avoid those particular numerous root of Windows FS. Again I don’t have all the insight of the remoting.jar but from outside point of view that would make more sense.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 12:02 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Should have been more clear –

 

We use a junction so actual files and directories are on the desired drives and paths. When setting up a node we identify the “default” CWD w/ active drive – this is either replaced with a junction or the subdirectories are made as junctions.

 

These junctions also include setting up various tools to directories without spaces in the name e.g. CWD\tools\junction-to-jdk -> c:\program files\Java\jdk-x.y.z\

 

-Jason

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 11:34 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f5701d6c4df%240f06e6f0%242d14b4d0%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38440C6185FBD15027377BE6CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jason Pyeron

Oh, I did not understand your question.

 

C:\Java\1_8_0_261\/bin/java  -jar remoting.jar

 

Is the same as

 

C:\Java\1_8_0_261\/bin/java  -jar .\remoting.jar

 

Which is the same as

 

C:\Java\1_8_0_261\/bin/java  -jar CWD\remoting.jar

 

So unless an absolute path is used for the remoting.jar, it will assume a relative path.

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 1:10 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Yeah I understand that part, but my point was more why does the CWD need to be the workDir prior to launch the remoting.jar, that seem to be useless, the remoting.jar should take care of it, it already has that path as --workDir, or maybe add a flag to avoid that requirement of moving to the root dir. That would also avoid that change root drive need under windows and clean the command too. I don’t see why this can’t be done no matter the junction usage.

 

cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

would become something:

C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -cwd c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

That would make more sens to me what do you thing? it would be easier to change cwd into the Java code and avoid those particular numerous root of Windows FS. Again I don’t have all the insight of the remoting.jar but from outside point of view that would make more sense.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 12:02 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Should have been more clear –

 

We use a junction so actual files and directories are on the desired drives and paths. When setting up a node we identify the “default” CWD w/ active drive – this is either replaced with a junction or the subdirectories are made as junctions.

 

These junctions also include setting up various tools to directories without spaces in the name e.g. CWD\tools\junction-to-jdk -> c:\program files\Java\jdk-x.y.z\

 

-Jason

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 11:34 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f5701d6c4df%240f06e6f0%242d14b4d0%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38440C6185FBD15027377BE6CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f8601d6c4eb%24eb4d7910%24c1e86b30%24%40pdinc.us.
Reply | Threaded
Open this post in threaded view
|

RE: Java install for Windows agent?

Jérôme Godbout

Yeah right, did not saw it at first, you are right. If that’s only for the remoting.jar path, that would be easier to simply add it to the path escaped then:

C:\Java\1_8_0_261\/bin/java  -jar “C:\JenkinsSlave\remoting.jar” -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

would solve the drive root change too or anything else would be required? That would work crossplatform (inject variable per platform %var% for windows or ${var} for *nix):

 

%JAVA_HOME%/java -jar “%JENKINS_SLAVE_HOME%/remoting.jar” -workDir “%JENKINS_SLAVE_HOME%” -jar-cache ““%JENKINS_SLAVE_HOME%/remoting/jarCache”

 

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 1:34 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Oh, I did not understand your question.

 

C:\Java\1_8_0_261\/bin/java  -jar remoting.jar

 

Is the same as

 

C:\Java\1_8_0_261\/bin/java  -jar .\remoting.jar

 

Which is the same as

 

C:\Java\1_8_0_261\/bin/java  -jar CWD\remoting.jar

 

So unless an absolute path is used for the remoting.jar, it will assume a relative path.

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 1:10 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Yeah I understand that part, but my point was more why does the CWD need to be the workDir prior to launch the remoting.jar, that seem to be useless, the remoting.jar should take care of it, it already has that path as --workDir, or maybe add a flag to avoid that requirement of moving to the root dir. That would also avoid that change root drive need under windows and clean the command too. I don’t see why this can’t be done no matter the junction usage.

 

cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

would become something:

C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -cwd c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

That would make more sens to me what do you thing? it would be easier to change cwd into the Java code and avoid those particular numerous root of Windows FS. Again I don’t have all the insight of the remoting.jar but from outside point of view that would make more sense.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 12:02 PM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Should have been more clear –

 

We use a junction so actual files and directories are on the desired drives and paths. When setting up a node we identify the “default” CWD w/ active drive – this is either replaced with a junction or the subdirectories are made as junctions.

 

These junctions also include setting up various tools to directories without spaces in the name e.g. CWD\tools\junction-to-jdk -> c:\program files\Java\jdk-x.y.z\

 

-Jason

 

From: [hidden email] <[hidden email]> On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 11:34 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

You do a windows junction into the filesystem? why does it need the prior cd path && and not just jump into the junction path directly before/after the junction is created???

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of Jason Pyeron
Sent: November 27, 2020 10:20 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

We use a junction.

 

From: [hidden email] [[hidden email]] On Behalf Of Jérôme Godbout
Sent: Friday, November 27, 2020 10:15 AM
To: [hidden email]
Subject: RE: Java install for Windows agent?

 

Ho right, mine was into c:\JenkinsSlave

 

Starting agent process: cd "c:\JenkinsSlave" && C:\Java\1_8_0_261\/bin/java  -jar remoting.jar -workDir c:\JenkinsSlave -jar-cache c:\JenkinsSlave/remoting/jarCache

 

make me wonder why it need to change the directory before running since the working directory is already pass as an argument, the remoting.jar should change the current working directory by itself in a cross platform way. This seem like someone got lazy into the remoting.jar and put that awkward  cwd needs in front. Should maybe have a flag to move to cwd to workDir

--CwdFromWorkDir

if not all use case need that. That would avoid all that mess upfront and make it easier to have cross platform behavior. My 2 cents about this.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 9:24 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Thanks. The problem was that Jenkins executes:

cd "e:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar ...
 
but cd does not change drive, it remains on C: and can't find \jenkins and so fails.
 
I fixed it by putting 'E: && ' in the remote command prefix box.  Perhaps there is a better way ...

 

On Fri, Nov 27, 2020 at 2:02 PM Jérôme Godbout <[hidden email]> wrote:

Hi,

make sure Jenkins remote user does have access to your e:\jenkins  and clean that folder content of any previous data there. If this is not working, check the master remote file for any right or corruption.

 

Jerome

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 27, 2020 4:17 AM
To: [hidden email]
Subject: Re: Java install for Windows agent?

 

Still trying to connect to Jenkins Windows agent using ssh. I have configured JAVA_HOME on the agent and set the agent's configuration to:

JavaPath    %JAVA_HOME%\java.exe

but I get:

[11/27/20 09:15:15] [SSH] Copying latest remoting.jar...
Source agent hash is D866F0B482DB94F38E49B26B465D5DB5. Installed agent hash is D866F0B482DB94F38E49B26B465D5DB5
Verified agent jar. No update is necessary.
Expanded the channel window size to 4MB
[11/27/20 09:15:16] [SSH] Starting agent process: cd "E:\jenkins" && %JAVA_HOME%\java.exe  -jar remoting.jar -workDir E:\jenkins -jar-cache E:\jenkins/remoting/jarCache
Error: Unable to access jarfile remoting.jar
Agent JVM has terminated. Exit code=1
[11/27/20 09:15:16] Launch failed - cleaning up connection
[11/27/20 09:15:16] [SSH] Connection closed.

 

Any idea why it can't access remoting.jar?

Best regards

David

 

 

On Thu, Nov 26, 2020 at 9:26 PM Jérôme Godbout <[hidden email]> wrote:

You can inject the wanted java folder into the Node configuration into Jenkins master configuration panels:

 

Add environments variable into your node and set:

 

Name: JAVA_HOME

value: C:\Java\jdk1.8.0_261\

 

 

Take Care the Windows version doesn’t like Java path with a space in it, a patch have been made put you might end up into a version that doesn’t support it, for ease, just install java into a path without space.

This prevent having to define the JAVA_HOME for the whole machine and ease the multiple java version on that machine. Jenkins will change it and can will use it to load the slave properly.

 

 


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.

 

From: [hidden email] <[hidden email]> On Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: [hidden email]
Subject: Java install for Windows agent?

 

Hi 

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

 

I don't know why it's choosing that path as I have not specified a Java path.

 

I know this is basic, but please suggest which JRE/JDK I should use and where I should install it.

 

Thanks

David

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iej0V2wwMKmew2QadXfmM-%2B1Lzq16qjRPv35ER%3DZZp%2B%2BRA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844096416B890E2EDD60A5BCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJK_iei9UjOHH%3DPPXbmKGrzhVQj3ncKZhcjkQxU-deGS2_%2BnFQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844FE48121C2AD817B4518ECDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019801d6c4d0%24c3538280%2449fa8780%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB3844B1473C84E9750AC68308CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f5701d6c4df%240f06e6f0%242d14b4d0%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38440C6185FBD15027377BE6CDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1f8601d6c4eb%24eb4d7910%24c1e86b30%24%40pdinc.us.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB38445564E2CD6934708E0AFDCDF80%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.