Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding IP of a Jenkins node

Tags:

jenkins

A windows slave node connected to Jenkins server through "Java web start". The system information of the node doesn't have it's IP address.

I had to run through all the slaves node we had, and find which machine (ip address) corresponds to the slave node in Jenkins.

Is there a way to find the IP address of a slave node from Jenkins itself?

like image 830
deepak Avatar asked Feb 18 '13 05:02

deepak


People also ask

Where is Jenkins master node?

Click on Manage Jenkins in the left corner on the Jenkins dashboard. Click on Manage Nodes. Select New Node and enter the name of the node in the Node Name field. Select Permanent Agent and click the OK button.

Where is node properties in Jenkins?

Click on Manage Jenkins in the left corner on the Jenkins dashboard. Scroll down, Click on Manage Nodes and clouds.

How do I change my IP to Jenkins public IP?

In your jenkins Dashboard go to Manage Jenkins > Configure System. Under Jenkins Location set the Jenkins URL to the new IP address of your server computer. Save changes.

How to find the IP address of a slave node in Jenkins?

I had to run through all the slaves node we had, and find which machine (ip address) corresponds to the slave node in Jenkins. Is there a way to find the IP address of a slave node from Jenkins itself? Through the Script Console ( Manage Jenkins -> Nodes -> Select a node -> Script Console) of the node we can execute groovy script.

How to configure Jenkins to use Groovy scripts?

Navigate to the Script Console ( Manage Jenkins -> Nodes -> Select a node -> Script Console) In your Jenkins job if its in groovy or else echo the ifonfig sh "/sbin/ifconfig -a | grep inet" Can also be found through the Jenkins UI: Manage Jenkins --> Manage Nodes --> Click Node name --> Configure

How do I find the node MGMT IPS?

net int show -role node-mgmt will show you the node mgmt IPs. 2019-12-12 11:53 AM You'll want to ensure that all node management and cluster management LIFs are referenced in your firewall configuration to ensure proper AutoSupport functionality. Check TR-4444 for more details.

Are Jenkins agents allocated dynamically?

Jenkins agents may be statically allocated or they can be dynamically allocated through systems like Kubernetes, OpenShift, Amazon EC2, Azure, Google Cloud, IBM Cloud, Oracle Cloud, andd other cloud providers. This 30 minute tutorial from Darin Pope creates a Jenkins agent and connects it to a controller.


1 Answers

Through the Script Console (Manage Jenkins -> Nodes -> Select a node -> Script Console) of the node we can execute groovy script. Run the following command to get the IP address.

println InetAddress.localHost.canonicalHostName 
like image 153
deepak Avatar answered Oct 19 '22 23:10

deepak