Posts by markmarz

    I'm sorry, you're just wrong on this. I showed you there are 2 separate directories for containers & volumes. I also showed that docker rm container does not delete the volume. If you looked at my postings carefully, you'd see a detailed layout of all this.


    It doesn't prove your point that the portainer_data folder was created when running the docker command. It's true that folder was created on first run, but it is not removed when the command is rerun.


    I've done all I can to make this clear. I'm done. Thanks.

    Where did I say it was necessary? Go back and read every post I made, I never said it was necessary. I said there was sound reason behind doing so, including if you lose your container and container data for some reason (deleting, etc.).

    When you say "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" I think it's a legitimate conclusion from your comment that one would like to avoid doing that. But in fact there is no reason to avoid doing it, because the volume is already separate from the container. There is not "a good chance that volume isn't going to be there". Nothing chancy about it. Or legit.


    For clarity, I'm referring to avoiding doing this:

    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


    I just want to put the correct information out there for anyone else reading your comments and concluding there's something to avoid or there's some advantage to doing it your way. There isn't.


    BTW this isn't personal. It's technical. Let's keep it on that plane.

    Well, I've been digging and I'm sorry to say I don't think it's correct that it's necessary to bind to an external directory if using the following command to run a command in a new container:

    Code
    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

    The -v option creates a volume named portainer_data that's separate from the container. That's why removing the container portainer (docker rm portainer) doesn't also remove the volume. See also: https://www.ionos.com/digitalg…docker-container-volumes/


    Here's the layout on one of my servers:

    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?

    I'm using the same portainer data volume as first installed. Been working fine for years.


    The catch seems to be that you can't (or maybe just "I" can't! Hah-hah!) migrate directly from 1.24.1 to latest portainer. So for now I've reverted back to 1.24.1 and will work my way up to the latest.


    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.

    Code
    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: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.

    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:



    Yet portainer still isn't available. As before, it seems to be attempting to restart:

    Code
    root@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:

    Code
    docker 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.

    Thanks for your response!


    1. If I uninstall portainer from OMV GUI, will it affect the existing containers?
    2. 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.

    1. docker rm romantic_dubinsky
    2. docker stop portainer
    3. docker rm portainer
    4. 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):


    Code
    root@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:

    Code
    root@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.

    I've tried a couple ways to update portainer and failed. Now I can't bring up portainer at all.


    1. 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").
    2. 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

    I've been running OMV 5 for some time (currently 5.6.13-1) and after a long break tried yesterday to update with System->Update Management. Many updates were pending and it seemed to go well until it finally aborted with a message I unfortunately didn't record. But I believe it had to do with an unsigned repository. I then ran System->Update Management->Check which failed complaining about an unsigned repository. Probably the same one, I reckon.


    Found this thread and followed link omv-extras repos moving to github


    and tried suggestion in post #12:

    sudo rm /etc/apt/sources.list.d/omvextras.list

    sudo omv-salt deploy run omvextras

    sudo apt-get update


    Which did not fix Check. Note my failing repository message is different from OPs: "The repository 'https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release' is not signed."


    Now it's the morning after and I can see a new update has been posted to System->Update Management.


    But System->Update Management->Check continues to complain about the unsigned repository.

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get update 2>&1' with exit code '100': Get:1 file:/var/cache/openmediavault/archives InRelease Ign:1 file:/var/cache/openmediavault/archives InRelease Get:2 file:/var/cache/openmediavault/archives Release Ign:2 file:/var/cache/openmediavault/archives Release Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Get:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:5 file:/var/cache/openmediavault/archives Contents (deb) Ign:5 file:/var/cache/openmediavault/archives Contents (deb) Get:6 file:/var/cache/openmediavault/archives Contents (deb) Ign:6 file:/var/cache/openmediavault/archives Contents (deb) Hit:7 http://security.debian.org/debian-security buster/updates InRelease Hit:8 http://deb.debian.org/debian buster InRelease Hit:9 http://deb.debian.org/debian buster-updates InRelease Hit:10 https://openmediavault-plugin-developers.github.io/packages/debian usul InRelease Hit:11 https://download.docker.com/linux/debian buster InRelease Hit:12 http://httpredir.debian.org/debian buster-backports InRelease Get:13 https://openmediavault.github.io/packages usul InRelease [12.7 kB] Get:15 https://openmediavault-plugin-developers.github.io/packages/debian usul-extras InRelease [3918 B] Hit:16 http://packages.openmediavault.org/public usul InRelease Ign:14 https://www.scootersoftware.com bcompare4 InRelease Hit:17 https://www.scootersoftware.com bcompare4 Release Ign:19 https://netcologne.dl.sourceforge.net/project/d-apt d-apt InRelease Get:20 https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release [6617 B] Get:21 https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release.gpg [833 B] Ign:21 https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release.gpg Hit:22 http://linux.teamviewer.com/deb stable InRelease Reading package lists... W: GPG error: https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EDC4FB09C3AEEDD0 E: The repository 'https://netcologne.dl.sourceforge.net/project/d-apt d-apt Release' is not signed.


    I realize I should have taken better notes and I'm following along with proposed solutions without quite knowing what they're about. Still I'd like to be able to run System->Update Management->Check without errors.


    Any assistance would be well appreciated!


    Thanks,

    Mark M.

    Update 6/9/20 (final update): Tried re-installing OMV5 on my backup server and none of these problems appeared. So that's a clue. Did another fresh install of OMV5 on my production server and boom! all my difficulties vanished. Can't explain it. Just updating this note in case someone runs into similar problems. Wish I could give a more definitive answer as to what was fixed by starting over.



    Update 6/7/20: Turns out the attempt to alter contents of /etc/resolvconf was wrong-headed. OMV5 uses systemd-resolvd not resolvconf. There were therefore no contents in /etc/resolvconf which is why my initial


    echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/tail


    failed and my subsequent clueless


    echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d


    apparently worked but actually accomplished nothing. Can't explain why these steps seemed to fix domain resolution (briefly). Hallucinations?


    Tried the fix here: SOLVED Upgrade from OMV 4 to OMV5

    Code
    sudo systemctl disable systemd-resolved.service
    systemctl stop systemd-resolved.service
    sudo rm /etc/resolv.conf
    sudo vi /etc/resolv.conf
    nameserver 8.8.8.8
    systemctl start systemd-resolved.service
    sudo systemctl enable systemd-resolved.service


    .. using both 1.1.1.1 and 8.8.8.8; still no joy.


    ===


    6/6/2020:

    Sadly, failing again with exact same DNS issue. Can't explain how it could revert; perhaps I rebooted? Not that that explains anything.


    Well, I for one am putting this on the back burner. I have another machine running OMV4 that has none of these issues and will use it for this sort of network access (NzbGet, etc.) until I feel ready to start pulling hair out again.


    I'm just leaving this dispiriting note so no one is disappointed that the fix shown here doesn't last. For now.


    Thanks for the tip re translator, I should have thought of that! Duh! I checked out Update does not work - DNS problem and at the very bottom found this:


    I answer to myself:

    after reading the test thread again, I noticed a configuration change that I had to make earlier in a different context because a similar problem had occurred. The bug was then under OMV 2.0.x and has apparently persisted until today.


    You have to do the following:


    echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/tail


    You can also enter other servers instead of the Google DNS server; I once tried the DNS servers from Open-DNS, they also work the same way. You can also edit the file /etc/resolvconf/resolv.conf.d/tail with WinSCP ...


    and then restart the server.


    Code
    root@omv:/etc/resolvconf# echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/tail
    -bash: /etc/resolvconf/resolv.conf.d/tail: No such file or directory
    root@omv:/etc/resolvconf# echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d
    root@omv:/etc/resolvconf#
    root@omv:~# cat /etc/resolvconf/resolv.conf.d
    nameserver 1.1.1.1
    root@omv:~#


    I rebooted and it works!! If you could explain what the heck is happening here I'd really appreciate it!


    Also if you could please explain how the DNS setting in my router works with or against the OMV DNS setting. I haven't changed the router setting since I can't remember when.




    Thanks so much for your help! I don't know what I'd do without this forum.

    Hi - Hope I picked the right sub-forum for this. Just did a clean install of OMV5 and installed Docker for nzbget using pretty much the same parameters used for the same container in OMV4. Only some paths changed.


    I have 3 news servers configured in nzbget and every one of them fails if I use their regular domain names, but succeed if I use their corresponding IP address. This leads me to think it's a DNS issue. But I think DNS is configured properly. I have tried the Cloudfare DNS (1.1.1.1) and google (8.8.8.8). Makes no difference.




    root@omv:~# host news.usenetserver.com
    news.usenetserver.com is an alias for usa.na.news.geo.usenetserver.com.
    usa.na.news.geo.usenetserver.com is an alias for news.iad.usenetserver.com.
    news.iad.usenetserver.com has address 69.16.179.27
    news.iad.usenetserver.com has address 69.16.179.26
    root@omv:~#


    I've put in a ticket to Usenetserver but I'm not expecting a lot of help. It's not really their problem, just verifying configuration with them.


    Any ideas?


    Thanks,

    Mark M.


    PS: I did find one fairly recent posting about DNS problems but unfortunately I can't read German.