sradforth
sradforth

Reputation: 2186

Jenkins Windows Master to connect to Slave Mac OSX

I have Jenkins set up on both my Windows7 PC and a Mac mini in order to build the various platforms (Blackberry, Android and iOS projects)

Problem I've encounered is the Win7 Master jenkins can't seem to connect to the mac slaves. I've tried opening up port 22 on the firewall so don't think it's this (although not 100% certain) and doing some reading on it all the tutorials mention about setting up SSH public keys but they all refer to mac and linux rather than Win7 as this doesn't appear to be a valid approach from what I understand.

Has anyone done this and/or got any pointers as to why Win7 can't seem to see the mac? (I can ping it if that helps reassure they're on the same network)

Here's the console output should it be of any use.

    [10/04/12 23:10:35] [SSH] Opening SSH connection to 192.168.0.102:22.
java.io.IOException: There was a problem while connecting to 192.168.0.102:22
    at com.trilead.ssh2.Connection.connect(Connection.java:793)
    at com.trilead.ssh2.Connection.connect(Connection.java:565)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:650)
    at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:283)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:346)
    at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:454)
    at com.trilead.ssh2.Connection.connect(Connection.java:733)
    ... 9 more
[10/04/12 23:10:56] [SSH] Connection closed.

Upvotes: 2

Views: 5955

Answers (2)

Meir Gerenstadt
Meir Gerenstadt

Reputation: 3593

Configure SSH in your MAC:

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/<user>/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/<user>/.ssh/id_rsa.
Your public key has been saved in /home/<user>/.ssh/id_rsa.pub.

Configure SSH in your Jenkins slave configuration given the location for the ssh private key (slave path).

More details in my Blog

Upvotes: 3

Slav
Slav

Reputation: 27505

SSH method requires that an SSH server is running on the target that you try to connect to.

Maybe your Mac does not have SSH server running and/or configured.

Upvotes: 1

Related Questions