Can't access jenkins remotely - jenkins

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.

Related

connect ECONNREFUSED 127.0.0.1:8046 when connecting to host app from Docker container - Windows 10

I have a standalone app running on my machine (not in a docker container) listening to port 8046 (localhost:8046) using an ngrok tunnel (http ngrok 8046). I am trying to connect to it sending a POST from my docker container which I'm also running on my local machine using http://host.docker.internal:8046. I have tried many different approaches but nothing seems to work:
I have tried to disable my firewall to make sure that wasn't the issue.
Tried http://localhost:8046 in the container to connect to the app
Tried serving the standalone app on 0.0.0.0 with the same port 8046 and setting http://0.0.0.0:8046 in the container to connect to it, unsuccessfully
I keep having connect ECONNREFUSED 127.0.0.1:8046
my etc/hosts is configured with the IP added by docker desktop for host.docker.internal and gateway.docker.internal
I'm running out of ideas and can't figure out what I could be missing. Any ideas? Thanks in advance
Inside container localhost, 127.0.0.1, 0.0.0.0 represent the container itself. To connect to the host machine please try using its domain name or IP address in the LAN, which the host machine belongs to.

After changing the jenkins port from 8080 to 80, the jenkins server is not accessible in Browser

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.

Docker container can't connect to ip host

I have deployed a netflix hystrix dashboard with turbine on a docker container, I can access to http://ip:8081/hystrix but when I try to monitor the stream of turbine it freeze and doesn't return any information, I test using curl inside the container and execute curl http://localhost:8081/turbine.stream and curl http://containername:8081/turbine.stream, with those two command works perfectly but when I use the host ip as curl http://hostip:8081/turbine.stream the curl throws Failed to connect to hostip port 8081: No route to host, I can't found a solution, can someone help me with this issue?,
Thanks in advance.
In order to access the container through Host IP you need to ensure the following:
Port mapping is allowing through the Host/Public IP itself not only localhost.
You can check this by executing docker ps on the docker host and look for the PORTS column the default should be as the following 0.0.0.0:8081->8081/tcp which means it can accept connection from any interface either public, private or localhost.
The firewall is not blocking the connection on port 8081.
By default the firewall of the host should be managed by Docker daemon itself so the port 8081 will be allowed in the firewall but you might have a different case either Docker is not managing the firewall of the host or there is an extra layer that prevents the connection

nginx proxy_pass connection refused for flask development server [duplicate]

I'm trying to run a simple web server on a Raspberry Pi with Flask. When I run my Flask app, it says:
running on http://127.0.0.1:5000/
But when I enter this address on my laptop's in Chrome, I get
ERR_CONNECTION_REFUSED
I can open 127.0.0.1:5000 on the Raspberry Pi's browser. What do I need to do to connect from another computer?
Run your app like this:
if __name__ == '__main__':
app.run(host='0.0.0.0')
It will make the server externally visible. If the IP address of the machine is 192.168.X.X then, from the same network you can access it in 5000 port. Like, http://192.168.X.X:5000
when you are running the server via flask run change it to flask run --host=0.0.0.0
to connect, find the IPV4 address of the server that your script is running on. On the same network, go to http://[IPV4 address]:5000
A reason could also be in firewall refusing incoming connections on port 5000. Try:
sudo ufw allow 5000
app.run(host='0.0.0.0',port=5000)
if you run your app in this way then your server will be visible externally.
Steps by Setp:
Run your app by using the following command
app.run(host='0.0.0.0',port=5000)
Go to the window cmd . Type ipconfig and get the get the IPV4 adress suppose your IPV4 address is 192.168.X.X
Go to the mobile browser and type the 192.168.X.X:5000
If you have debug = True inside your app.run(), then it will not be visible to other machines either. Specify host and port inside app.run() without the debug = True.
You will have to run the development server such that it listens to requests on all interfaces and not just the local one
Ask Flask to listen on 0.0.0.0:PORT_NUMBER
or any other port you may choose
On MacOS 12.4 (Monterey) I couldn't load localhost nor my local IP but it worked with both of these:
0.0.0.0
127.0.0.1
Just change the URL in the browser if it loads with "localhost".
Both devices must be connected to same network.
Use app.run(host='0.0.0.0',port=5000) and run with your own Ipv4
address like his http://[Your Ipv4 address]:5000
If you are connecting this with android app then don't forget to
put INTERNET permission in manifest file.
Contrary to popular believe 127.0.0.1 is not the same a localhost.
I solved the issue above by setting 127.0.0.1 explicitly on both ends.
Well i was also here to know answer but i guess i found out problem. The reason is that you may not activated or run flask that's why it is showing error. For that you have to start from terminal "flask run" and then surely your flask will run...
The issue may occur, if VPN is on, so try to switch it off.

Port 8082 not available

I installed a Jenkins server on port 8080.
Then I installed GitBlit, which usually takes port 8080 too, so that I changed to port 8082.
On the machine I can call localhost:8082, but from remote 192.168.178.3:8082 is not available.
Jenkins response works on 192.168.178.3:8080
I opened the port on the hardware firewall. Still no response.
The last thing I could image is the Windows firewall, but even after opening the port for TCP for in and out its not working?
Or where do you think the problem is?
If you are using Gitblit GO, the default config for Gitblit GO will bind to localhost and will be unreachable from another machine. Check out server.httpBindInterface and server.httpsBindInterface.
Perhaps you need to do any port forwarding on your hardware firewall?
If you suspect Windows, you can add your program/service to the exception list in you Win Firewall settings. You can make this by going to:
START->Control Panel->Windows Firewall->Windows Firewall with Advanced Security
and modify Inbound and Outbound rules.

Resources