Unable to connect to container's browser UI. #12859
-
Ask a Question!I feel stupid but I can't figure out what I'm doing wrong. I just deployed my first container in Portainer as a Stack. The container is NetAlertX. The stack is healthy and I mapped the container's recommended host port, 20211, to container port 8080 in the compose file. I also added the IP address of "my server" to the "local" Environment where the container is. When I try to launch the NetAlertX UI in my browser it will not connect. So, I need to know if I am making a bad assumption when it comes to the IP of my server. My setup is as follows; I have a Zimaboard on my network that I did a bare-metal install of Proxmox VE v9.0. I installed the Docker LXC container into Proxmox and during the install I also opted to install Portainer. My Portainer container has a network IP of 192.168.1.10 and Proxmox VE has a network IP of 192.168.1.248. I thought I should be using the Proxmox address with the NetAlertX port (https://192.168.1.248:20211) but I get nothing. I tried using http:// but I get the same result. The same thing happens if I use the Portainer IP. Should I be using the Proxmox IP or the Portainer IP to get into the container? Here is my compose file if it helps. I could really use some advice. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hey @Com177 Use the IP of the Docker host where NetAlertX is running. In your case that is the IP of the LXC container that’s running Docker, not the Proxmox node IP and not the Portainer container’s IP. Find it inside the LXC with hostname -I and then browse to http://'LXC-IP':20211. You also have a couple of compose issues that will block access:
Here are is a correct compose option. Option A: default bridge networking with a published port services:
netalertx:
image: jokobsk/netalertx:latest
container_name: netalertx
restart: on-failure:5
volumes:
- config:/app/config:rw
- db:/app/db:rw
- logs:/app/front/log:rw
ports:
- "20211:20211" # host:container
environment:
TZ: America/New_York
HOST_USER_ID: 1000
HOST_USER_GID: 1000
# PORT is optional if you stick with 20211 default
# PORT: 20211
volumes:
config:
db:
logs: |
Beta Was this translation helpful? Give feedback.
-
|
[SOLVED]- Hi @Nick-Portainer !!!! THANK YOU!! THANK YOU!! THANK YOU!! Your corrections to the compose file did the trick!!! The container deployed with only one error but it looks like it isn't a critical error. From the advice you gave about the IP, I took the hint from all of the clues I found pointing to the container's external IP being 192.168.1.10 . I searched the internet and found that if I open the Console in the container itself and type I am seeing a new problem now but I want to try to find a solution on my own before I ask you or anyone else for advice. Briefly, NetAlertX uses ARPSCAN to find devices on a LAN. It looks like other than my WAN gateway and the internal IP for the container itself (172.18.0.2), NetAlertX cannot find anything else. I believe the problem is that I need to create a bridge of some kind between Docker/Portainer and Proxmox to allow NetAlertX to arpscan my entire LAN. I have Pi-Hole running in a container directly on Proxmox and it can find all of my devices, so I think I need to find out how to make a useable interface between Docker/Portainer and Proxmox so that NetAlertX can scan my network. Thanks so much for your help. It made it possible for me to get NetAlertX up and running! Thanks again!! |
Beta Was this translation helpful? Give feedback.
Hey @Com177
Use the IP of the Docker host where NetAlertX is running. In your case that is the IP of the LXC container that’s running Docker, not the Proxmox node IP and not the Portainer container’s IP. Find it inside the LXC with hostname -I and then browse to http://'LXC-IP':20211.
You also have a couple of compose issues that will block access:
Port mapping is wrong
NetAlertX listens on 20211 in the container. You mapped 20211:8080, which points to a port the app is not using. Use 20211:20211 instead, or change the app to listen on 8080 and keep the mapping consistent.
network_mode and restart are in the wrong place
They are under environment right now, so they are being treated a…