I am trying for nginx proxy manager (running in a docker container) to connect to another docker container that has port 8080 open on it. When I setup the proxy to connect to 192.168.0.29:8080 the ip address of the host, but it doesn't work, the browser just says that the site didn't send any data.
I tried setting up the reverse proxy with other services (that weren't running inside a docker container), and they worked flawlessly. So, I've concluded, the problem is something with the docker containers.
First, I tried replacing the ip address with the address of the container (shown in portainer) which showed to be 172.17.0.2. But, that didn't work. I can confirm that both containers are in the same network, bridge.
I could not find any solutions for this problem either here, at Stack Overflow, or anywhere else. Hope there's enough data to solve this problem. Thanks ahead of time!
Edit:
running arp -na from within the container gives this output:
[root#docker-00244f7ab2cc:/app]# arp -na
? (172.17.0.1) at 02:42:d1:fc:fc:6b [ether] on eth0
I found the solution to my question after lots of searching and testing and it's quite simple. The solution is to start the nginx proxy manager docker container on the host network instead of the bridge network. Then, you can use localhost and then the port to refer to which service you want to redirect to.
Quite a beginner to Elasticsearch and Kibana. I followed the instructions on Docker Hub pages to install them on my Ubuntu 18.04 server. Below are the webpages that I referred to:
Elasticsearch 7.0.3
Kibana 7.0.3
After successfully installing the docker images, I can see both containers running on my server:
I can also get right results when curling locally:
However, both curl commands showed 'Failed to connect to [my server ip : the port number]: Time out' error if I curled from another machine. Two reasons that I could think of:
Firewall
The server is not listening on the correct ports
So I checked both. Below are the results:
I could be wrong but everything looks good to me. Any ideas?
-Updates
I forgot to mention that I am able to ping my ubuntu server because if I type [my server ip address] in my browser, it will give me this 'welcome to nginx' page
Edit your elasticsearch.yml/kibana.yml files and use 0.0.0.0 as network.host instead of localhost.
To use your curl command,replace localhost by the ip address.
I was following this tutorial https://www.youtube.com/watch?v=iZB4msyOaUs
Could finish all the steps and I have all my containers up and running (see picture below).
But when I run the browser and type the ip address, the port and /guacamole the only thing I can see is a blank screen.
What is the correct address to access it? I tried localhost, 192.168.100.99 (docker machine address), 0.0.0.0, all the ip listed on ipconfig but nothing happens.
Need help. Thx!
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.
I know many would say that this is a redundant question. But I am putting this thread as my last straw. I have gone through many threads in this community regarding my query, but was not able to achieve what I need.
Here's what I need to do.
Make docker containers such that it's IP would come in the same network as my host's. Just like a virtual machine in bridged network.
I need to be able to ssh to these dockers via external machines in my host m/c's network.
I simple replace Virtual Machines with docker in my system. And for that I need to ssh them just like I have been doing with the Virtual Machine nodes.
What I have tried?
Able to ssh the container via my host m/c. Where I installed ssh on container and enabled the port 22. Also I set UsePAM to no in /etc/ssh/sshd_config file.
Followed Ben Whaley on this thread.
I tried IP aliasing, But after all that, when I did ssh <IP address> -p 5000 , I got ssh: connect to host <IP address> port 5000: Connection refused error.
Tried to follow Regan on this page. But those documents were pulled down, and The documents that I found was not helpful either, as they were proving hard for me to understand.
Tried to make a bridge from this reference. But there too, my virtual0 bridge was not taking any IP address. If I manually give one to it, it wasn't accepting any connection through that IP.
Please can anyone help me out here?
I just need to replace my VM's with the docker containers so that I can improve my resource utilization.