-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portainer not accessible both from localhost and remote hosts #3540
Comments
127.0.0.1 is the container itself, not the host, you need to access Portainer using the hosts ip address. Docker doesnt support access containers on the host using loopback.
Rgds,
Neil Cresswell
On 2/02/2020, at 4:13 AM, Metal-Mighty <notifications@github.com> wrote:
Bug description
Portainer cannot be accessed both from the host (curl 127.0.0.1:9000), with ssh port binding, and a reverse proxy. The page tries to load until the container restarts due to the 5mins of inactivity.
Expected behavior
The webui is expected to show up with the first connection form
Portainer Logs
2020/02/01 14:47:31 server: Reverse tunnelling enabled
2020/02/01 14:47:31 server: Fingerprint 34:a6:57:6b:73:89:4b:31:c7:a3:75:e8:0a:aa:94:22
2020/02/01 14:47:31 server: Listening on 0.0.0.0:8000...
2020/02/01 14:47:31 Starting Portainer 1.23.0 on :9000
2020/02/01 14:47:31 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2020/02/01 14:52:31 No administrator account was created after 5 min. Shutting down the Portainer instance for security reasons.
2020/02/01 14:52:35 Templates already registered inside the database. Skipping template import.
2020/02/01 14:52:35 server: Reverse tunnelling enabled
2020/02/01 14:52:35 server: Fingerprint 34:a6:57:6b:73:89:4b:31:c7:a3:75:e8:0a:aa:94:22
2020/02/01 14:52:35 server: Listening on 0.0.0.0:8000...
2020/02/01 14:52:35 Starting Portainer 1.23.0 on :9000
2020/02/01 14:52:35 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
[...]
Steps to reproduce the issue:
Followed the installation guide on Portainer.io and official ReadTheDocs page
Technical details:
* Portainer version: 1.23.0
* Docker version (managed by Portainer):
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:25:58 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea838
Built: Wed Nov 13 07:24:29 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
* Platform (windows/linux): Linux
* Command used to start Portainer (docker run -p 9000:9000 portainer/portainer):
docker run -d -p 8000:8000 -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name Portainer portainer/portainer
* Browser: Firefox, curl
Additional context
* Ports are bound to 127.0.0.1 on the host, not on 0.0.0.0
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de005053b62c portainer/portainer "/portainer" 33 minutes ago Up 2 minutes 127.0.0.1:8000->8000/tcp, 127.0.0.1:9000->9000/tcp Portainer
* A simple Nginx container has been started both on a random port and port 9000; it can be accessed in both cases so it shouldn't be related to networking
* Docker has been completely deleted and installed again after clearing all the data (graph folder, config), no change
* Changing the port binding to something else (I tried 9005) doesn't work
* I have compared the container's configuration with another Portainer instance on another machine and saw nothing out of the ordinary
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_portainer_portainer_issues_3540-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAFQ2XFKD3IIFRLUNQ45PA4DRAWGSJA5CNFSM4KOTVP32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IKK3J4Q&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=FipoBU42ZySSMzFlQRaP2xlL85L0C3IZDhUooIdpTwg&s=xtpU5B6XLAU9FnUytBILx7oMZ-YvZeR5zUvwK1xgSWg&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AFQ2XFK3OFHFGZRIHPXQDD3RAWGSJANCNFSM4KOTVP3Q&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=FipoBU42ZySSMzFlQRaP2xlL85L0C3IZDhUooIdpTwg&s=0p396HCGft1a0LMkgoGsmxFYHHRQXITSRQwjzjpIyzE&e=>.
|
I feel like there has been a misunderstanding here. When I mention 127.0.0.1, both with my curl command and the exposed ports, I do mention the host and not the container. The curl command and port forwarding are done on the host, not on the container. Also, I have created a Portainer container on another server that I own with the same command (the one provided in my first post), and I can access it both from a remote host or with a port forwarding. So the problem resides somewhere in my first host somehow, but I don't have a clue where. |
I Have the same problem! |
This issue has been marked as stale as it has not had recent activity, it will be closed if no further activity occurs in the next 7 days. If you believe that it has been incorrectly labelled as stale, leave a comment and the label will be removed. |
Since no further activity has appeared on this issue it will be closed. If you believe that it has been incorrectly closed, leave a comment mentioning |
I have the same issue. |
I have the same issue on raspberry pi 3b and dietpi. |
yes i have same issue on raspberry pi 3b and dietpi. |
I had the same issue, but the caddy file broke and I had to update it, |
Bug description
Portainer cannot be accessed both from the host (curl 127.0.0.1:9000), with ssh port binding, and a reverse proxy. The page tries to load until the container restarts due to the 5mins of inactivity.
Expected behavior
The webui is expected to show up with the first connection form
Portainer Logs
Steps to reproduce the issue:
Followed the installation guide on Portainer.io and official ReadTheDocs page
Technical details:
docker run -p 9000:9000 portainer/portainer
):docker run -d -p 8000:8000 -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name Portainer portainer/portainer
Additional context
The text was updated successfully, but these errors were encountered: