Skip to content
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

Closed
Metal-Mighty opened this issue Feb 1, 2020 · 9 comments
Closed

Portainer not accessible both from localhost and remote hosts #3540

Metal-Mighty opened this issue Feb 1, 2020 · 9 comments
Labels
kind/question Questions on the platform status/stale

Comments

@Metal-Mighty
Copy link

Metal-Mighty commented Feb 1, 2020

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 exposed 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 exposed ports on the host to something else (I tried 9005) doesn't work
  • I have compared the container's configuration with another Portainer instance on another machine (created with the same command) and saw nothing out of the ordinary
@ncresswell
Copy link
Member

ncresswell commented Feb 1, 2020 via email

@Metal-Mighty
Copy link
Author

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.

@ghost ghost added the kind/question Questions on the platform label Feb 3, 2020
@hassench
Copy link

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 exposed 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 exposed ports on the host to something else (I tried 9005) doesn't work
  • I have compared the container's configuration with another Portainer instance on another machine (created with the same command) and saw nothing out of the ordinary

I Have the same problem!
I can access the portainer with a curl from the host, but not outside the host. Ports are opened, I ran a different service on the same port that I chose and I was able to access it. But not the portainer for a reason that I ignore.
I have an nginx server

@github-actions
Copy link

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.

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

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 portainer/support and one of our staff will then review the issue. Note - If it is an old bug report, make sure that it is reproduceable in the latest version of Portainer as it may have already been fixed.

@github-actions github-actions bot closed this as completed Nov 3, 2021
@skiunke
Copy link

skiunke commented Nov 13, 2021

I have the same issue.

@m4mandar
Copy link

I have the same issue on raspberry pi 3b and dietpi.

@MandarMG
Copy link

yes i have same issue on raspberry pi 3b and dietpi.

@zedverse
Copy link

I had the same issue, but the caddy file broke and I had to update it,
Is there any way to diagnose this issue?
I had to try hundred other things including solutions on this thread (thanks) before I came across Caddy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions on the platform status/stale
Projects
None yet
Development

No branches or pull requests

7 participants