0

My OS is almalinux 9.2. Accessing https://server_ip:9443 (portainer) from browser gives error:

This page isn’t working
<server_ip> didn’t send any data.
ERR_EMPTY_RESPONSE

I installed docker and portainer using the below commands:

dnf install -y yum-utils device-mapper-persistent-data
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf -y  install docker-ce --nobest
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Firewall is stopped.

[root@localhost ~]# systemctl status firewalld.service
○ firewalld.service
     Loaded: masked (Reason: Unit firewalld.service is masked.)
     Active: inactive (dead)
[root@localhost ~]# docker ps
CONTAINER ID   IMAGE                           COMMAND        CREATED          STATUS          PORTS                                                                                            NAMES
257d85751d44   portainer/portainer-ce:latest   "/portainer"   16 minutes ago   Up 13 minutes   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp, 9000/tcp   portainer

Docker logs:

[root@localhost ~]# docker logs portainer
2023/07/31 04:07AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:495 > encryption key file not present | filename=portainer
2023/07/31 04:07AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:518 > proceeding without encryption key |
2023/07/31 04:07AM INF github.com/portainer/portainer/api/database/boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
2023/07/31 04:07AM INF github.com/portainer/portainer/api/internal/ssl/ssl.go:80 > no cert files found, generating self signed SSL certificates |
2023/07/31 04:07:11 server: Reverse tunnelling enabled
2023/07/31 04:07:11 server: Fingerprint ea:06:0e:9f:40:10:f6:2f:a6:fe:8e:13:f6:e6:d9:b3
2023/07/31 04:07:11 server: Listening on 0.0.0.0:8000...
2023/07/31 04:07AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:766 > starting Portainer | build_number=32198 go_version=1.19.4 image_tag=linux-amd64-2.18.4 nodejs_version=18.16.1 version=2.18.4 webpack_version=5.68.0 yarn_version=1.22.19
2023/07/31 04:07AM INF github.com/portainer/portainer/api/http/server.go:345 > starting HTTPS server | bind_address=:9443
2023/07/31 04:07AM INF github.com/portainer/portainer/api/http/server.go:330 > starting HTTP server | bind_address=:9000
2023/07/31 04:09AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:495 > encryption key file not present | filename=portainer
2023/07/31 04:09AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:518 > proceeding without encryption key |
2023/07/31 04:09AM INF github.com/portainer/portainer/api/database/boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
2023/07/31 04:09:21 server: Reverse tunnelling enabled
2023/07/31 04:09:21 server: Fingerprint ea:06:0e:9f:40:10:f6:2f:a6:fe:8e:13:f6:e6:d9:b3
2023/07/31 04:09:21 server: Listening on 0.0.0.0:8000...
2023/07/31 04:09AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:766 > starting Portainer | build_number=32198 go_version=1.19.4 image_tag=linux-amd64-2.18.4 nodejs_version=18.16.1 version=2.18.4 webpack_version=5.68.0 yarn_version=1.22.19
2023/07/31 04:09AM INF github.com/portainer/portainer/api/http/server.go:345 > starting HTTPS server | bind_address=:9443
2023/07/31 04:09AM INF github.com/portainer/portainer/api/http/server.go:330 > starting HTTP server | bind_address=:9000

Port 9443:

[root@localhost ~]# lsof -i:9443
COMMAND      PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
docker-pr 626347 root    4u  IPv4 18960777      0t0  TCP *:tungsten-https (LISTEN)
docker-pr 626355 root    4u  IPv6 18995578      0t0  TCP *:tungsten-https (LISTEN)
[root@localhost ~]# sestatus
SELinux status:                 disabled
jay
  • 1
  • 2
  • what is full URL that you are trying to access? – rzlvmp Jul 31 '23 at 05:24
  • It worked now after adding --net=host in the docker run command. Command: 'docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always --net=host -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest' – jay Jul 31 '23 at 05:52

0 Answers0