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.
Related
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.
I am creating a SaaS project that lets end-users run and access a dashboard as a web app which is a Docker container, which means every user has his own dashboard which is a running docker container, and I would like them to access their servers/containers using my domain (HTTP) as follow: user1: subdomain.mydomain.com/user1app, user2: subdomain.mydomain.com/user1app, etc.
Currently, I am using LocalTunnel however it is not stable and requires me to use 1 subdomain for every user, for example: user1.mydomain.com, user2.mydomain.com, etc.
but what if we scale and get more users? I need a dynamic and automatic way to create users custom URL link to expose their running docker containers and give them access such as, subdomain.mydomain.com/user123, subdomain.mydomain.com/user456, etc.
I tried to use ngrok, however, it is limited in many ways e.g. 40-requests/minute limit, and not free.
Thanks
I recommend running an nginx-revsere-proxy with docker and the you can host as many webapp as you want only with one single ip.
https://github.com/nginx-proxy/nginx-proxy
There you can add per host configs or even change the default configuration. So you can write for each dashboard a config or use variables and a bashscript to create the host configs
If you have multiple docker containers running locally, you can expose them to the internet using ngrok.
First, install ngrok:
$ npm install -g ngrok
Then, start ngrok and specify the port that your docker container is running on:
$ ngrok http 80
Ngrok will give you a URL that you can use to access your docker container from the internet.
I am trying to export metrics of an application by using jmx exporter. So basically i added java agent to jvm jmx parameters to run as a agent and configured it to expose localhost:5555. At the end with docker I created container.
So applications runs in remote machine. If it was running on my local I could check localhost:5555/metrics and I could see if metrics are exported. But in my case that apps runs in a container on remote machine. So how can I check if metrics are exported or not ? (Prometheus has not been configured yet so I cannot check on it.)
As long as the container is exposing 5555 to a port on its host (let's assume the same port 5555, i.e. it's running using something of the form docker run ... --publish=5555:5555 ...), then, as long as you can access the host machine, you can curl (or browse) the endpoint:
REMOTE_HOST=...
http://${REMOTE_HOST}:5555/metrics
I have JMeter Master (5.3) running in a Docker container, triggered by a Jenkins pipeline containing a 'docker run' command. It communicates to JMeter slaves that are located in a Kubernetes namespace, with an Ingress controller to handle input. (For this trial I'm using just one slave but there may be multiple in the future)
The Docker JMeter Master container is aware of Ingress and can reference it by name or by IP address. From within the JMeter Master container I am able to ping the JMeter slave hostname and it is giving the Ingress IP address which I would expect.
Ingress in turn has the ability to communicate with the JMeter slave, but I can't get from JMeter Master to JMeter slave. I have set server.rmi.localport=80 on both sides, the JMeter slave seems to register port 80 in the logs.
The error from the JMeter Master is 'operation timed out (connection timed out)'. I'm not sure where to start looking?
(For reference, we cannot move JMeter Master into Kubernetes, but conversely the slaves need to stay in Kubernetes in order to provide the workload).
Edit: I've done some more investigation. The problem seems to occur that while the base RMI port is port 80, it's also trying to open port 81 and port 82. This will obviously fail as I've only got port 80 available through ingress.
So the question is now 'how do I tell JMeter to only use a single port for RMI'?
As an update to this, basically I've come to the conclusion that 'you can't do this'. While the ports can be opened on Ingress, RMI can't communicate over them. So even if I could get it all on one port, it still wouldn't work.
There is a 'RMI over HTTP' implementation but I wouldn't have first idea on how to put that into JMeter.
What I have done is add a small webserver to the pod, such that I can control JMeter through normal web calls. For example, the jmx file can be PUT on to the pod, and a GET command can retrieve the results. That way I can start the pod up in the relevant location, where it will wait for whatever tests we want to run. It's also extendable if I need additional functionality.
I created Jenkins in default port 8080. After a week time some other organization level application takeover 8080 port now i am unable to connect to my jenkins.
So i thought of changing port number by running "java -jar jenkins.war --httpPort=9090"
but when i connect using new port 9090,it says you can create new jobs and none of my existing jobs are being displayed.
I have created many jobs if i started again it will be rework. Is there any way to recover everything but port only changed?