Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Slave port number for firewall

We use Jenkins 1.504 on Windows.

We need to have Master and Slave in different sub-networks with firewall in between.
We can't have ANY to ANY port firewall rules, we must specify exact port numbers.

I know the port Master is listening on.

I also see that Slave opens connection to the Master from the arbitrary port dynamically assigned every run, and port on the Master side is also arbitrary.
I can fix Master's port by specifying it in Manage Jenkins > Configure Global Security > TCP port for JNLP slave agents).

How to fix Slave port?


UPDATE: Found Connection Mechanism described here: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI#JenkinsCLI-Connectionmechanism

I think it might work for us, but still would be better to have fixed-2-fixed ports connection.

like image 867
Ivan Avatar asked Jul 04 '13 14:07

Ivan


People also ask

What port does Jenkins slave use?

A slave isn't a server, it's a client type application. Network clients (almost) never use a specific port. Instead, they ask the OS for a random free port.

What ports are needed for Jenkins?

The default Jenkins installation runs on ports 8080 and 8443. Typically, HTTP/HTTPS servers run on ports 80 and 443, respectively. But these ports are considered privileged on Unix/Linux systems, and the process using them must be owned by root.

What is the 50000 port in Jenkins?

Docker, perfect for test-driving Jenkins Port 8080 exposes the web interface and port 50000 gives you access to a remote Java (JIRA) API.

What is Jenkins Jnlp port?

JNLP Port. Jenkins slaves running in OpenShift communicate with the Jenkins master using a separate TCP connection. The TCP port to make use of is specified in the Configure Global Security within Jenkins management page.


1 Answers

We had a similar situation, but in our case Infosec agreed to allow any to 1, so we didnt had to fix the slave port, rather fixing the master to high level JNLP port 49187 worked ("Configure Global Security" -> "TCP port for JNLP slave agents").

TCP 49187 - Fixed jnlp port 8080 - jenkins http port 

Other ports needed to launch slave as a windows service

TCP 135  139  445  UDP 137 138 
like image 59
Ganga Avatar answered Sep 28 '22 05:09

Ganga