portainer

No connection to portainer community edition


I try to install portainer via the docker image:

 docker run -d -p 8000:8000 -p 443:9443 --name portainer-be --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
docker ps
CONTAINER ID   IMAGE                           COMMAND        CREATED          STATUS          PORTS                                                                                          NAMES
d31b6a21fc60   portainer/portainer-ee:latest   "/portainer"   43 seconds ago   Up 42 seconds   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 9000/tcp, 0.0.0.0:443->9443/tcp, :::443->9443/tcp   portainer-be

I can connect to https://myhost and see portainer

docker stop d31b6a21fc60
d31b6a21fc60
root@myhost:~# docker run -d -p 8000:8000 -p 9443:9443 --name portainer-ce --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
docker ps
CONTAINER ID   IMAGE                           COMMAND        CREATED          STATUS                        PORTS     NAMES
7bf0d60a8f47   portainer/portainer-ce:latest   "/portainer"   32 seconds ago   Restarting (1) 1 second ago             portainer-ce

I can not connect to https://myhost and see portainer. Just as if portainer would not run.

What might I have done wrong?

Docker version 23.0.1, build a5ee5b1 Ubuntu 22.04.2 LTS Latest Portainer as of feb 23 2023


Solution

  • So far as I can see you have two portainer containers installed, parallely?

    Nevertheless you should be able to connect, if you have installed at least one of them, by typing https://localhost:9443. 9443 is pre-defined Port of your virtual machine / server. If you want to get to the container witch is located not on yout computer (via VirtualBox e.g.) so you replace localhost with the IP of your server, in case if myhost really doesn't work.

    Warning: Ports

    You should know that you have installed both versions, the Buisness Edition (portainer-ee) and Community Edition (portainer-ce) on the same port. Maybe you should first change one of the ports settet by default to another one. I recomend to use your favourite search engine to get information about witch port is not used by any other service you potentially may install in the future.

    You can find out which ports are already used by typing netstat -plant. -plant is the filter for that. -ant gives you a list of all opened and closed ports of your system.

    If you are connected to the VM via SSH in e.g. PuTTY on Windows, you can check in the cmd, if you have your device port open by typing netstat -ant | findstr XXXX. XXXX stands for the port on your computer you are remotly connecting to you VM via SSH. In this case it is belonged to your IP address and port. By default, I think, the port is 2522, I used it to connect to my VM in VirtualBox, but maybe it just belongs to VirtualBox and for you it is another one.

    I have my own problem to de-install portainer-ee properly to install portainer-ce, but it still wants a license key for buisness edition, so the proper de-installation wasn't successful. But what if I really install the second one parallely, like you did, which I haven't tried yet...