I am trying to change the Jenkins port from default 8080 to port 80.
so I modified the file /etc/sysconfig/jenkins and changed the variable JENKINS_PORT="8080" to JENKINS_PORT="80".
after changing the port I restarted jenkins service by systemctl restart jenkins and the service status was Active: active (exited).
I changed the port back to 8080 and after restart the service status was Active: active (running)which is good, I also tried to change the port to 8081 and the service status was Active: active (running) as well, just when I am trying to use port 80 the service status is Active: active (exited).
I tried to verify if port 80 is in use using netstat -pnltu | grep -i "80"
and the port not in use, I tried to configure port 83 just for testing and I get the same behavior as port 80 configured (Active: active (exited))
Am I missing something here?
There is another solution for Linux systems that mentioned in Jenkins Documentation here
If Jenkins fails to start because a port is in use, run:
systemctl edit jenkins
and add the following:
[Service]
Environment="JENKINS_PORT=8081"
This will change the port from 8080 to 8081.
You can do it in below way:
1. Go to the directory where you installed Jenkins (by default, it's under Program Files/Jenkins)
2. Open the Jenkins.xml configuration file.
3. You can find --httpPort=8080 and replace the 8080 with the new port number.
Restart your Jenkins server.
$ jenkins.exe restart
You can also refer How to configure Jenkins to run on port 80
I found a solution,
I changed the JENKINS_USER variable value from jenkins to root on /etc/sysconfig/jenkins.
Then I restarted Jenkins service using the command:
systemctl restart jenkins
and the service is running.
Ports 0-1024 are reserved for the operating system and core services - services running as root.
Sounds like you are following the Jenkins install instructions which suggest creating a jenkins user and group - this is why you can run the app on 8080 and others greater than 1024.
Depending on your OS, edit your jenkins.service file and change these settings there.
On Centos, edit /usr/lib/systemd/system/jenkins.service or systemctl edit jenkins to make modifications to these settings. Better practice would be to use systemctl edit.. when editing systemd files.
To change Default Port of Jenkins in Windows while using jenkins.war use httpPort, I have created a small Video.
Related
I changed the HTTP_PORT=8080 to 80 from sudo vi /etc/default/jenkins and restarted the jenkins service and it is in active state in UBUNTU.
But I am unable to access with the port changed to 80. It is showing Connection refused error in chrome browser. How to resolve this? Please help, as it is on high priority.
I have Deployed Jenkins On a Server. The Server runs a CentOS Linux 8 as Operating system. I Wanted to access the Jenkins from another Device (laptop/PC) which is already in same network. but firewall restricts me in doing this. whenever i disable firewall I'm able to access the Jenkins but disabling firewall isn't option for me what else can i do to resolve this problem.
Well you need to open the ports used by Jenkins in the Centos Firewall. As I understand Jenkins uses ports 8080 and 8443 by default. See this guide on how to open and close ports in Centos 8
You can open the ports used by Jenkins/Tomcat using this command:
firewall-cmd --perm --add-port=your-port/your-protocol for example, to open port 8080 in tcp use this
firewall-cmd --perm --add-port=8080/tcp
After doing that, you have to reload the FirewallD tables using:
firewall-cmd --reload
The --perm option makes your rule permanent upon reboot.
I try to run dnsmasq which have to provide DHCP + BOOTP,
but dnsmask doesn't open 67\udp port when it is running in container.
With similar configuration file on the host system it works properly.
I run container with flags -net host and -privileged, but it doesn't help me.
Why dnsmasq doesn't want to open 67/udp (BOOTP server) into container?
How I able to fix it for doing that?
the root cause isn't in docker configuration.
I missed to add configuration file /etc/dnsmasq.d/default.conf with required parameters.
After adding it 67 port was opened and exposing began works
Is it possible to configure puppet to run on any particular port?
Say if I need an agent to run under port 40000 - is it possible?
Well, it's the master that listens on a port (by default, 8140), whereas the agents open the connections back to the master.
If you wanted to change the master's port, run this on the master:
# puppet config set masterport 40000
This command will edit your puppet.conf file, which lives in $confdir.
I installed jenkins on my remote server.
If I do at the server:
wget http://server.url:8080
I get the page without any problem. At my computer, I get that:
--2014-01-09 14:11:33-- http://server.url:8080/
Resolving server.url (server.url)... 54.205.148.55
Connecting to server.url (server.url)|54.205.148.55|:8080... faied: Connection timed out.
Retrying.
I already tried changing --httpListenAddress= parameter at config file (I set it to 0.0.0.0) and nothing happens. It's installed on an Ubuntu 12.04 and it has Apache running on port 80.
Any idea?
Thanks!
EDIT: I also tried with no result disabling iptables and ufw.
Can you check the bind IP address of Jenkins, if you want to access your Jenkins from outside it should be 0.0.0.0:8080 or YOUR_SERVER_IP:8080
Check using the command: netstat -tunlp
Stop the firewall: systemctl stop ufw
From your output it looks like you are trying to connect on port 8080, but you said that you have apache listening on port 80.
If the port mismatch is not the issue it is probably another firewall blocking your traffic.
Can you run a telnet from your computer to the Jenkins server and see if you can connect?
telnet 54.205.148.55 8080
or
telnet 54.205.148.55 80
Depending on which port you are actually listening on.