Re: Slave Jenkins on an RHEL box

2016-11-15 Thread Fritz Elfert
On 15.11.2016 17:26, Fritz Elfert wrote:
> most likely somewhere else than with *your* user account. Therefore do
> the following on your jenkins master:
> 
> 1. sudo -i
> 2. su - jenkins
>(or whatever your jenkins user is named on the master)
> 3. ssh rhelhost
>(or ssh otheruser@hrelhost if named different than your master
>jenkins user)
> 

Forgot to tell: If you don't know the jenkins user on your master, you
can lookup in the GUI: Select "Manage Jenkins->System Information"

Look for the system property named "user.name". Also the homedir is
shown there as "user.home".

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/90c9b8d5-f8cd-1ff2-6161-44ce60f59da3%40fritz-elfert.de.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Slave Jenkins on an RHEL box

2016-11-15 Thread Fritz Elfert
On 15.11.2016 15:14, Peter Berghold wrote:
> wish that were the case.  Nope:  running the same command from the
> command line yields the results I'm after.  Since the script runs as
> tomcat8 and tomcat8 is trusted between the hosts I'm at a complete loss
> as to why this is happening.

Really?
When manuall trying ssh to a remote slave, you *must* do that *as the
jenkins user* not with your user-account. That's because ssh stores the
remote host keys in $HOME/.ssh/known_hosts and $HOME of jenkins points
most likely somewhere else than with *your* user account. Therefore do
the following on your jenkins master:

1. sudo -i
2. su - jenkins
   (or whatever your jenkins user is named on the master)
3. ssh rhelhost
   (or ssh otheruser@hrelhost if named different than your master
   jenkins user)

If *that* works *without* being asked any hostkey-questions, then
jenkins should be able to login too.

If *that* works *whithout* questions but jenkins still complains about
the host key, then the only explanation would be that $HOME inside the
running jenkins points somewhere else.

And BTW:
> I have Jenkins running merrily on an Ubuntu box and want to set
> up a slave on an RHEL box. 

If you merely want a slave host you neither need tomcat or any special
scripts for starting slave.jar, Just java on the rhel host.
If jenkins can login via ssh, it does everything automatically (copying
slave jar to the rhel-machine and starting it etc).

Cheers
 -Fritz

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ee74369e-c5a4-d8c6-a49f-23a4fdafc1c1%40fritz-elfert.de.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Slave Jenkins on an RHEL box

2016-11-15 Thread Dirk Heinrichs
Am 14.11.2016 um 17:28 schrieb Peter Berghold:

> [11/14/16 16:22:37] Launching agent
> $ /usr/share/tomcat8/startSlave0
> Host key verification failed.

There's a problem with the host key of the slave. This usually means
that the SSH server (your Jenkins slave) offers a different host key
than the one the SSH client (your Jenkins master) has in it's
known_hosts file already. Check the ~/.ssh/known_hosts file of the user
your Jenkins master runs as. If there's a key already present for the
slave host, delete it. Then establish a connection to the slave via SSH
from the command line (still as that very same user) and accept the new
host key of the slave.

HTH...

Dirk

-- 

*Dirk Heinrichs* | Senior Systems Engineer, Delivery Pipeline
http://mimage.opentext.com/alt_content/binary/images/email-signature/recommind-ot.png

*Tel*: +49 2226 159666 (Ansage) 1149
*Email*: dirk.heinri...@recommind.com 
*Skype*: dirk.heinrichs.recommind

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
HRB 10646

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.





http://www.recommind.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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ec458256-03ef-7e03-7f74-8075d87c82a6%40recommind.com.
For more options, visit https://groups.google.com/d/optout.


Re: Slave Jenkins on an RHEL box

2016-11-15 Thread Peter Berghold
wish that were the case.  Nope:  running the same command from the command
line yields the results I'm after.  Since the script runs as tomcat8 and
tomcat8 is trusted between the hosts I'm at a complete loss as to why this
is happening.

On Mon, Nov 14, 2016 at 5:45 PM Donald Morton  wrote:

> Sounds like the ssh command is failing. Maybe the password or private key
> is wrong?
>
>
> On Monday, November 14, 2016 at 10:28:20 AM UTC-6, Peter Berghold wrote:
>
> I have Jenkins running merrily on an Ubuntu box and want to set up a slave
> on an RHEL box.
>
> Created a script on the RHEL box that essentially launches a script that
> in turn launches the slave.jar.  Trying to invoke it over SSH and there's
> where things take a turn for the worse.
>
> I'm getting this:
>
> [11/14/16 16:22:37] Launching agent
> $ /usr/share/tomcat8/startSlave0
> Host key verification failed.
> ERROR: Unable to launch the agent for java.io.EOFException 
> : 
> unexpected stream termination
>   at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365) 
> 
>   at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310) 
> 
>   at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:388) 
> 
>   at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:131) 
> 
>   at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:261) 
> 
>   at 
> jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
>  
> 
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> 
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  
> 
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  
> 
>   at java.lang.Thread.run(Thread.java:745) 
> 
> ERROR: Process terminated with exit code 255
>
>
> That first line is a script on the master that does the SSH.What I'm not 
> sure about is exactly what is complaining about Host key verification.  Given 
> I can run that script by hand and it starts the jar file I'm a bit confused 
> about what's going on here.
>
>
> Has anybody gotten this to work?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/b9a359bf-eef0-4855-9178-515ee70acce6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAArvnv0AhkoJr%3DDcyyyTi74qp6iVdT%2Bo7KZmPX%2Bi0e9m-RK4Vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Slave Jenkins on an RHEL box

2016-11-14 Thread Donald Morton
Sounds like the ssh command is failing. Maybe the password or private key 
is wrong? 


On Monday, November 14, 2016 at 10:28:20 AM UTC-6, Peter Berghold wrote:
>
> I have Jenkins running merrily on an Ubuntu box and want to set up a slave 
> on an RHEL box. 
>
> Created a script on the RHEL box that essentially launches a script that 
> in turn launches the slave.jar.  Trying to invoke it over SSH and there's 
> where things take a turn for the worse.
>
> I'm getting this:
>
> [11/14/16 16:22:37] Launching agent
> $ /usr/share/tomcat8/startSlave0
> Host key verification failed.
> ERROR: Unable to launch the agent for java.io.EOFException 
> : 
> unexpected stream termination
>   at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365) 
> 
>   at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310) 
> 
>   at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:388) 
> 
>   at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:131) 
> 
>   at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:261) 
> 
>   at 
> jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
>  
> 
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> 
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  
> 
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  
> 
>   at java.lang.Thread.run(Thread.java:745) 
> 
> ERROR: Process terminated with exit code 255
>
>
> That first line is a script on the master that does the SSH.What I'm not 
> sure about is exactly what is complaining about Host key verification.  Given 
> I can run that script by hand and it starts the jar file I'm a bit confused 
> about what's going on here. 
>
>
> Has anybody gotten this to work?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b9a359bf-eef0-4855-9178-515ee70acce6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.