A very nice tool to look at docker logs is Dozzle amir20/dozzle
portainer: how to update to latest version
-
- gelöst
- OMV 5.x
- kattivius
-
-
A very nice tool to look at docker logs is Dozzle amir20/dozzle
Very nice indeed! Thanks gderf .
If you are relatively practiced using docker-compose it takes less than five minutes to deploy. Here's the GitHub page.
-
Just a short comment in general on KM0201 and chente in posts 37 - 40 above: This is the beauty of OMV - simple enough for a moron like me to set up a powerful and reliable server with zero command line skills, yet versatile and robust enough to carry along someone like me while I gradually learn the necessary commands to tweak and modify from the terminal.
-
A very nice tool to look at docker logs is Dozzle amir20/dozzle
That looks pretty cool. I'm gonna check that out this weekend
-
I've tried a couple ways to update portainer and failed. Now I can't bring up portainer at all.
- OMV GUI -> System -> OMV-Extras -> Docker tab -> Portainer + install. After running get no errors from message box. But can no longer open portainer ("This site can't be reached. 192.168.50.27 refused to connect").
- Used commands from gderf post #31 RE: portainer: how to update to latest version. This generated a new container id and no obvious errors, but same error as (1). The old container id for portainer is definitely gone and there's a new one to take its place. But there's also a container with a docker generated name "romantic_dubinsky"
CONTAINER ID NAMES
a4fee41b4ab3e10eceecb82308af77a4a544a68af13517f177b034531607407a portainer 0d00a7baf815846212d394f571203e8e41084e448e44f267c0ac8fa618131460 romantic_dubinsky 1fe05004fb6217348a891ced3fec0c26dff4a1a06549fa27fda5a311191835bd logitechmediaserver 227e360db746180175fa379cfdbcc55426f17ac9be1f7d7021cf8d6b54068ab4 plex 017f65b04305de3aa7bb21644de15cd2584376367eb9580b8e895ae2ad7e993c Kitana 101684eb84344322ca2989985df1b92ea51499e00566a4419607f3e1e74d5175 dashmachine c84a31c43e63d7388a1958047939ee4dea745aa94abf2bcd95a9b9475d6159c6 tautulli root@omv:~/bin#
The logs (docker logs -f portainer) show a repeated error:
Zitatlevel=info msg="2021/10/04 16:31:26 Migrating database from version 24 to 32."
level=info msg="2021/10/04 16:31:26 An error occurred during database migration: failed fetching environment docker id: failed getting snapshot info"
level=info msg="2021/10/04 16:31:26 failed migration: failed fetching environment docker id: failed getting snapshot info"
level=info msg="2021/10/04 16:32:17 Migrating database from version 24 to 32."
level=info msg="2021/10/04 16:32:17 An error occurred during database migration: failed fetching environment docker id: failed getting snapshot info"
level=info msg="2021/10/04 16:32:17 failed migration: failed fetching environment docker id: failed getting snapshot info"
The good news is all the containers are still running. Bad news is I broke portainer.
How best to fix this? At this point I'd be content to run the old version rather than update. Although I expect it's too late for that.
Thanks!
Mark M.
EDIT: running OMV 5.6.16-1
-
markmarz a couple of questions:
- What machine are you running omv on?
- Do you have a proven backup of your operating system?
Some of my methods are not as technical as they should be. I am more of a trial and error problem fixer, so I don’t want to go telling you to uninstall docker from the GUI and then reinstalling it, and then try to install Portainer again unless I know you have a good working and proved operating system backup. There are also some apt clean commands on the omv-extras GUI page.
Maybe someone with a little more technical expertise will put their oar in. In the meantime you might look into OS backups.
-
I've tried a couple ways to update portainer and failed. Now I can't bring up portainer at all.
- OMV GUI -> System -> OMV-Extras -> Docker tab -> Portainer + install. After running get no errors from message box. But can no longer open portainer ("This site can't be reached. 192.168.50.27 refused to connect").
- Used commands from gderf post #31 RE: portainer: how to update to latest version. This generated a new container id and no obvious errors, but same error as (1). The old container id for portainer is definitely gone and there's a new one to take its place. But there's also a container with a docker generated name "romantic_dubinsky"
CONTAINER ID NAMES
a4fee41b4ab3e10eceecb82308af77a4a544a68af13517f177b034531607407a portainer 0d00a7baf815846212d394f571203e8e41084e448e44f267c0ac8fa618131460 romantic_dubinsky 1fe05004fb6217348a891ced3fec0c26dff4a1a06549fa27fda5a311191835bd logitechmediaserver 227e360db746180175fa379cfdbcc55426f17ac9be1f7d7021cf8d6b54068ab4 plex 017f65b04305de3aa7bb21644de15cd2584376367eb9580b8e895ae2ad7e993c Kitana 101684eb84344322ca2989985df1b92ea51499e00566a4419607f3e1e74d5175 dashmachine c84a31c43e63d7388a1958047939ee4dea745aa94abf2bcd95a9b9475d6159c6 tautulli root@omv:~/bin#
The logs (docker logs -f portainer) show a repeated error:
The good news is all the containers are still running. Bad news is I broke portainer.
How best to fix this? At this point I'd be content to run the old version rather than update. Although I expect it's too late for that.
Thanks!
Mark M.
EDIT: running OMV 5.6.16-1
Most likely that new container name is your portainer instance. Sounds like it it didn't remove the old container (docker rm) and since you can't have containers with the same name, it created a new one (the one with the weird name)
You can use the button in OMV to uninstall portainer... Then use it to reinstall or just use docker-run/docker-compose as has been discussed in this thread. Also make sure you set a volume for portainer in the docker run if you go that route.
-
Thanks for your response!
- If I uninstall portainer from OMV GUI, will it affect the existing containers?
- When I reinstall portainer, will it pick up the existing container configurations? Or do I have to add them all back manually?
I think the answer to (1) is no and (2) is have to add back manually to the newly installed portainer. The thing is, I thought gderf's post removed the old portainer (docker rm portainer). Did it just not work? Anyway, I just did the following, really just redid the sequence suggested by gderf but made double sure the existing portainer was removed.
- docker rm romantic_dubinsky
- docker stop portainer
- docker rm portainer
- docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.9.0
Still 192.168.50.27 refused to connect. But you were right about existing portainer wasn't deleted. This time it was (no new funny named container):
Coderoot@omv:~/bin# docker ps -a --no-trunc --format "table {{.ID}}\t{{.Names}}" CONTAINER ID NAMES d13ccc1fd66eb51bc9ac59328731087c1b379c3a49f5ed75a92489f21b6ffb2e portainer 3a634fec2472cfd9afc3ad795c9678892c40d6b1c92ebd8ebdd58c17e2397e8a dozzle 1fe05004fb6217348a891ced3fec0c26dff4a1a06549fa27fda5a311191835bd logitechmediaserver 227e360db746180175fa379cfdbcc55426f17ac9be1f7d7021cf8d6b54068ab4 plex 017f65b04305de3aa7bb21644de15cd2584376367eb9580b8e895ae2ad7e993c Kitana 101684eb84344322ca2989985df1b92ea51499e00566a4419607f3e1e74d5175 dashmachine c84a31c43e63d7388a1958047939ee4dea745aa94abf2bcd95a9b9475d6159c6 tautulli root@omv:~/bin#
I guess portainer is attempting to restart itself:
Coderoot@omv:~/bin# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d13ccc1fd66e portainer/portainer-ce:2.9.0 "/portainer" 14 minutes ago Restarting (1) 35 seconds ago portainer 3a634fec2472 amir20/dozzle:latest "/dozzle" About an hour ago Up About an hour 0.0.0.0:8888->8080/tcp, :::8888->8080/tcp dozzle 1fe05004fb62 apnar/logitech-media-server:latest "/entrypoint.sh" 9 days ago Up 2 hours logitechmediaserver 227e360db746 linuxserver/plex:latest "/init" 9 days ago Up 2 hours plex 017f65b04305 pannal/kitana:latest "python kitana.py" 4 months ago Up 2 hours Kitana 101684eb8434 rmountjoy/dashmachine:latest "gunicorn --bind 0.0…" 15 months ago Up 2 hours dashmachine c84a31c43e63 linuxserver/tautulli:latest "/init" 16 months ago Up 2 hours tautulli root@omv:~/bin#
Oh, wait! Duh! I didn't make sure about the volume as you suggested. I'll get back on that, have to split now.
-
Thanks for your response!
- If I uninstall portainer from OMV GUI, will it affect the existing containers?
- When I reinstall portainer, will it pick up the existing container configurations? Or do I have to add them all back manually?
1. No.
2. Yes, it will pick them up so long as you did not delete the portainer data volume.
-
Thanks gderf!
I ensured portainer wasn't running and deleted it again (stop, rm).
Then I installed from OMV GUI dropdown with no apparent errors:
Code
Alles anzeigenDocker storage :: /var/lib/docker Agent port:: 8000 Web port:: 9000 Yacht port:: 8001 arch :: amd64 option :: portainer state :: install extras :: 5.6.2 DNS OK. Removing portainer/portainer-ce image ... Untagged: portainer/portainer-ce:latest Removing portainer/portainer image ... Pulling and starting portainer/portainer-ce ... d2da60dc21980b1946f7eb7f58e3e8b5b23d655ff7f92538221b8b3b262033d0 Done.
Yet portainer still isn't available. As before, it seems to be attempting to restart:
Coderoot@omv:~/bin# !493 docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d2da60dc2198 portainer/portainer-ce "/portainer" 49 seconds ago Restarting (1) 21 seconds ago portainer
And same error repeated in log:
Codedocker logs -f portainer level=info msg="2021/10/04 20:49:01 Migrating database from version 24 to 32." level=info msg="2021/10/04 20:49:01 An error occurred during database migration: failed fetching environment docker id: failed getting snapshot info" level=info msg="2021/10/04 20:49:01 failed migration: failed fetching environment docker id: failed getting snapshot info" level=info msg="2021/10/04 20:49:01 Migrating database from version 24 to 32." level=info msg="2021/10/04 20:49:01 An error occurred during database migration: failed fetching environment docker id: failed getting snapshot info" level=info msg="2021/10/04 20:49:01 failed migration: failed fetching environment docker id: failed getting snapshot info"
Any idea how to fix this?
Thanks,
Mark M.
-
Okay, I was able to revert back to 1.24.1. I used the instructions on this page:
https://docs.portainer.io/v/ce-2.9/admin/upgrade/docker
See section labeled 'Option 3: Upgrading from versions older than 1.24.1'
Note that the section descriptions appear to be off. The above section description says it's about upgrading to 1.24.2, but the code actually installs 1.24.1.
Codedocker stop portainer docker rm portainer docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:1.24.1
Now that I've successfully reverted to 1.24.1, I will play around with upgrading to 2.0.0+ using the same website. The way I read it, there will need to be an intermediate upgrade to 1.24.2 before 2.0.0+. I'll post results here.
Thanks!
Mark M.
-
Okay, I was able to revert back to 1.24.1. I used the instructions on this page:
https://docs.portainer.io/v/ce-2.9/admin/upgrade/docker
See section labeled 'Option 3: Upgrading from versions older than 1.24.1'
Note that the section descriptions appear to be off. The above section description says it's about upgrading to 1.24.2, but the code actually installs 1.24.1.
Codedocker stop portainer docker rm portainer docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:1.24.1
Now that I've successfully reverted to 1.24.1, I will play around with upgrading to 2.0.0 using the same website. The way I read it, there will need to be an intermediate upgrade to 1.24.2 before 2.0.0. I'll post results here.
Thanks!
Mark M.
I'm assuming you are properly mapping a data volume, rather than just using portainer_data
-
-
You don't have a bind mount for it, which means container data is being stored in the container volume somewhere...
See the difference in mine...
-
How does it matter?
-
How does it matter?
Because if you deleted your container, when you reinstall.. there is a good chance that volume isn't going to be there. That is why you map it somewhere outside of your container with a bind mount.
-
You also appear to be installing two separate versions of Portainer. Portainer (that you have installed now).. will deprecate in 1/22. It looks like there will be no upgrades past 1.24 for the version you're running now... you would have to tag it "latest" to get it to upgrade to portainer-ce, which is what the OMV button installs, and what most of have been suggesting in this thread.
https://hub.docker.com/r/portainer/portainer
ZitatThis repository is deprecated. Starting from January 2022, the latest tag of this repository will point to Portainer CE 2.X. Please use portainer/portainer-ce instead.
NOTE, This repo, portainer/portainer is the home of Portainer v1.24.x, and is now deprecated; all new releases for Portainer 2.0 will be published in portainer/portainer-ce
-
Good points, thanks.
Although I don't completely get what you mean by installing 2 versions of Portainer. I have 1 version: 1.24.1. I intend to upgrade through to the latest version. At that point I figured I'd use the tag 'latest'.
Whether or not it works with the GUI is not critically important to me. OTOH I'm not wed to cli updates only. And it would be nice to know I can safely use OMV GUI.
So can you suggest a good way to migrate my current portainer volume to a place outside the container?
Code
Alles anzeigenroot@omv:/var/lib/docker/volumes# docker inspect portainer [ { "Id": "d1ff367ca154ff1c144c6b6fb396c5f532640502506466da4917db083421b7ec", "Created": "2021-10-05T10:09:39.8951709Z", "Path": "/portainer", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 3530, "ExitCode": 0, "Error": "", "StartedAt": "2021-10-05T10:09:40.435398987Z", "FinishedAt": "0001-01-01T00:00:00Z" }, . . . "Mounts": [ { "Type": "bind", "Source": "/var/run/docker.sock", "Destination": "/var/run/docker.sock", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Type": "volume", "Name": "portainer_data", "Source": "/var/lib/docker/volumes/portainer_data/_data", "Destination": "/data", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" } ], . . . root@omv:~# cd /var/lib/docker/volumes/portainer_data/_data root@omv:/var/lib/docker/volumes/portainer_data/_data# ls -l total 272 drwx------ 2 root root 4096 Jun 9 2020 bin drwx------ 2 root root 4096 Oct 4 11:15 certs drwx------ 2 root root 4096 Jun 9 2020 compose -rw-r--r-- 1 root root 389 Oct 5 05:09 config.json drwx------ 2 root root 4096 Oct 4 11:15 docker_config -rw------- 1 root root 262144 Oct 5 07:19 portainer.db -rw------- 1 root root 227 Jun 9 2020 portainer.key -rw------- 1 root root 190 Jun 9 2020 portainer.pub drwx------ 2 root root 4096 Jun 9 2020 tls root@omv:/var/lib/docker/volumes/portainer_data/_data#
-
If you delete your current portainer, you can reinstall and map your data volume in docker run, or with the docker compose I posted earlier
All your containers will be there when you reinstall portainer... The only thing you will lose is any customizations (mainly, stacks.. they will be there but you will not be able to edit or redeploy them)
-
Thanks, I'll start digging.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!