Trying to connect on premise agent to Jenkins controller

Good day all.
I am running jenkins Controller/controller on a Linux server behind a reverse proxy.
I get an error “Unable to reach host on port 8000”

Port 8000 is the port the agent needs connect to controller.
I have opened firewall rule on that port to allow incoming connection but still fails.
What else do I need to do?

Hello @TheSysGuy and welcome to this community. :wave:

There could be several reasons why you can’t reach the host on port 8000.

  1. You could check if the service is running on the server. You can do this by running the command sudo systemctl status jenkins on the server.
  2. You could also check if the service is listening on the correct port. You could use the netstat command to check if the service is listening on port 8000. Run sudo netstat -tuln | grep 8000 on the server.
  3. Ensure that the reverse proxy configuration is correctly set up to forward requests to the Jenkins service on port 8000.
  4. You could also check the network connectivity, by trying to connect to the Jenkins service from another machine in the same network to rule out network connectivity issues. You could use the telnet command for this: telnet <jenkins-server-ip> 8000.
  5. What about the firewall rules now? Are they correctly set up to allow incoming connections on port 8000? You could check this with sudo ufw status.
  6. You could also check that the Jenkins configuration is configured to accept connections on port 8000. This is usually set in the Jenkins configuration file.
  7. Last but not least, if you’ve checked all of these and you are still having issues, there may be a problem with the Jenkins service itself. :person_shrugging:
    Check the Jenkins logs for any error messages that might indicate what the problem is. The logs are usually located in /var/log/jenkins/jenkins.log.
1 Like

Thank you so much. @poddingue the problem was I was trying to connect the agent to the controller via the proxy but instead it was supposed to connect to the controller directly

1 Like

That’s great news, thanks a lot for the feedback. :+1: