I'm using Ubuntu 20.04.
I tried sudo vi /etc/default/jenkins and changed the port to HTTP_PORT = 8090
I also tried sudo ufw allow 8090 to open the port
But I couldn't able to open jenkins but it stills works well in 8080
Please help me figure out this problem.
Related
I'm starting to learn Docker.
For practice, I have set up an Nginx container on Ubuntu Server (separate PC).
Used this command docker run -it -d -p 8080:80 nginx
Then I did curl on it's home network IP (192.168.1.38:8080) and it worked fine. Showed Nginx starter page.
But then I tried to see that starter page on Windows, and curl 192.168.1.38:8080 didn't work there. It didn't open in the browser either. Gave ERR_CONNECTION_TIMED_OUT error.
I have tried to do it the other way around:
Set up the same Nginx container on a Windows machine and tried to curl it's IP:8080 from Ubuntu Server machine and it worked.
So seems like Windows lets access its IP:8080 from other devices, and Ubuntu doesn't.
sudo ufw allow 8080/tcp on your Ubuntu Server should fix this issue.
After changing the port number in 8080 to 9999 and it not changing in jenkins. And it showing the default port number 8080 only.
I restart the jenkins service with this command also
"service jenkins restart"
"systemctl jenkins restart"
but its not works, I worked on "Ubuntu 20.04.4 LTS" server
port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=9999
--httpPort=8080
Please refer to this link: https://askubuntu.com/a/1401952/1586251
I answered the same question.
TLDR;
Refer to the documentations in: https://www.jenkins.io/doc/book/installing/linux/#debianubuntu
It says that you can modify by: systemctl edit jenkins
Then add the following lines:
[Service] Environment="JENKINS_PORT=9999"
Port should be your desired port to use. Save it and then restart jenkins: sudo systemctl restart jenkins
I’m learning to set up Nginx using docker.
I created a docker 17.12.0 ce on 16.04 at DigitalOcean.
I followed the instruction to setup .
I run the docker and bind the port using -p 80:80. I tried to access but connection is refused.
Failed to connect to 139.59.245.108 port 80: Connection refused
Container info:
docker ps
Btw, I noticed the messages:
"ufw" has been enabled. All ports except 22 (SSH), 80 (http) and 443 (https)
have been blocked by default
No sure why now it is working... But I guess maybe I need to set sudo ufw allow 80, I shut down the docker and start a new docker. Then docker port <my-container>, it finally shows up 80/tcp -> 0.0.0.0:80
I am running 'Docker version 1.10.3, build 20f81dd' on Ubuntu 14.04. Now my requirement is to create/delete/manage new container from the REST API (HTTP) from outside world. So, for this how could I enable Docker to run on a port.
It will be helpful if I get details step as in net I tried few but didn't work.
I found the solution and it's very easy at all. Here is the configuration.
Got To:
vi /etc/default/docker
Add DOCKER_OPTS="-H tcp://127.0.0.1:2375"
restart docker service.
Run netstat -lnp and see docker is running on port 2375
My OS is Windows 10. I've run Docker via the boot2docker image. IDE I use is PHPStorm. What I want to do is debug with XDebug, but I don't get it running. I searched the Web and tried the examples I found but nothing helps. Is there anyone with the same architecture who can help me?
Edit: Nginx ist running on the server.
Current setup:
xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PhpStorm
PhpStorm server
Host is same IP I connect for SSH. Path mappings is enabled. Debugger is Xdebug
I tried already with a specific DBPg Proxy but no success
I got it. I just forgot to forward the port. I've to run the container via docker run -d -p 80:80 -p 9000:9000 -v /mnt/www/foo:/var/www/foo foo.
php.ini
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
; Set to host.docker.internal on Mac and Windows, otherwise, set to host real ip
xdebug.remote_host = host.docker.internal
xdebug.remote_port = 9000
xdebug.remote_log = /var/log/php/xdebug.log
I used the following setting in ini file:
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal