Jenkins server not opening ports for slave connection

bitnamiJenkins

I'm using Bitnami Jenkins virtual image with VMWare.

I'm getting a ConnectException Connection timed out to my Jenkins server when I try to connect a web start slave. I can access the Jenkins server from a web browser (port 80). Using nmap on the Jenkins server shows the port isn't open but using netstat shows that it's listening to the port.

Nmap:

bitnami@linux:~$ nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2015-05-18 17:45 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00057s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
8009/tcp open  ajp13

Netstat (shows port 59730 which I expect):

tcp6       0      0 :::59730                :::*                    LISTEN 

Any ideas why this isn't automatic or working with the bitnami virtual machine?

Best Answer

Bitnami VM images enable Uncomplicated Firewall by default and have only ports 80, 443 and 22 open.

Even though the port to start the slave is open, as netstat shows, you can't reach it from outside the VM because of the firewall. You should configure the firewall to open the port (59730 in your case), as explained in this FAQ and it should work.