openmediavault-docker-gui Testing

  • Alright - what worked yesterday doesn't work today. Server was turned-off by my normal scheduled job last night, As soon as booted-up, I reset the permissions to default with the tab next to shared folders, and then tried to run the docker container, which resulted in the following errors.


    When I tried to disable and the enable the plugin on the settings screen, I receive the following:

    Code
    Error #0: exception
    'OMVModuleDockerException' in /usr/share/omvdocker/Utils.php:551 Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/docker.inc(227):
    OMVModuleDockerUtil::exec('docker rmi cf70...', Array, 1) #1 [internal
    function]: OMVRpcServiceDocker->deleteImage(Array, Array) #2
    /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array,
    Array) #3 /usr/share/php/openmediavault/rpc.inc(79):
    OMVRpcServiceAbstract->callMethod('deleteImage', Array, Array) #4
    /usr/sbin/omv-engined(500): OMVRpc::exec('Docker', 'deleteImage', Array, Array,
    1) #5 {main}


    When trying to uninstall from Systems/plugins:

    Code
    Error #3008:
    exception 'OMVException' with message 'Failed to load configuration (Fatal error 4: Document is empty (line=1, column=1); Fatal error 4: Start tag expected, '<' not found (line=1, column=1))' in /usr/share/php/openmediavault/config.inc:577
    Stack trace:
    #0 /usr/share/php/openmediavault/env.inc(22): require_once()
    #1 /var/www/openmediavault/rpc.php(23): require_once('/usr/share/php/...')
    #2 {main}


    Any suggestions?


    Edit: The following removed the plugin:
    rm /var/lib/dpkg/info/openmediavault-docker.postrm
    apt-get purge openmediavault-docker


    Checked the update manager and installed the latest OMV, and then installed Docker-gui 0.2.12 again. When clicking on the docker under services, I get:

    Code
    Error #0:
    exception 'OMVModuleDockerException' with message 'Error: "couldn't connect to host" - Code: 7' in /usr/share/omvdocker/Utils.php:63
    Stack trace:
    #0 /usr/share/omvdocker/Utils.php(203): OMVModuleDockerUtil::doApiCall('http://localhos...')
    #1 /usr/share/openmediavault/engined/rpc/docker.inc(352): OMVModuleDockerUtil::getContainers('42005')
    #2 [internal function]: OMVRpcServiceDocker->getContainers(Array, Array)
    #3 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('getContainers', Array, Array)
    #5 /usr/sbin/omv-engined(500): OMVRpc::exec('Docker', 'getContainers', Array, Array, 1)
    #6 {main}


    When I installed it the last time I remember there was a docker-gui by default, but nothing is there now.


    Edit2:
    The DockerUI could be accessed via port 9800 and showed some old containers. In the OMV docker settings, the old settings I had set prior to removing the plugin was still there. Once setting the location to the docker base path to none, the original container dockerui/dockerui showed up in the GUI. It also shows a repository named none, which can't be deleted (it doesn't show up in the dockerui). I could download the image again and run it.

  • openemdiavault-docker is what I installed a while back and left it without using it. The openmediavault-docker-gui was installed yesterday. I thought they were merged since only the openmediavault-docker-gui shows up in the plugin screen (have both docker and docker testing repositories enabled)


    Zitat

    The first one, has several errors in the postrm script, is a PITA to remove.

    That's maybe what I'm fighting here. :) What's the trick?


    The permission denied error happend when I clicked on the container and then clicked start.
    Ther Error 0 (shown in my edit comment) happend when I clicked on the Docker icon in the menu on the left (services/docker). It was already enabled by default (which probably means I didn't properly remove it previously.


    Note that is now working (still don't get tinymediamanager container to work properly (doesn't show menues properly and can't access my media) so I will give that one some rest for a while and try another as a test case.


    Thanks again for the help

    • Offizieller Beitrag

    The error starting the container is probably because the drive mounted has noexec. The workaround discuss here is that the plugin does a mount bind to /var/lib/docker, so in this case my guess that's not happening.


    You can check with mount | grep "/var/lib/docker" If nothing comes, then it means is not binded.


    Check you have a bind entry at fstab with cat /etc/fstab | grep bind


    If is present then run mount -a and try start the container

  • FYI: Was not binded. fstab showed two identical entries with

    Code
    /Docker /var/lib/docker/openmediavault none bind,defaults 0 0

    . After mount -a, the mount | grep "/var/lib/docker" shows the same entry as fstab twice.

  • It looks like the docker-gui plugin managed to create an extra bind-mount entry in the configuration file and then died before it could remove the old one. I've done some changes to the code in version 0.2.13, which I hope shall prevent this kind of problem in the future.


    How can we make sure that the docker plugin is not installed when setting up the docker-gui plugin? When doing configuration changes and relocating the base path it's essential that the docker service is stopped (otherwise you'll probably end up with the situation above) and I have no way of guaranteeing that if another plugin might start the service in the middle of my config changes...


    To restore your system you need to make some changes to the /etc/openmediavaul/config.xml file (make a backup first!!!). Next make sure that the docker service is completely stopped. This part is very important :)


    Locate a part that looks like this in your config.xml:

    Code
    <mntent>
    <uuid>0778e379-fbd4-4d38-9856-ab357f808aab</uuid>
    <fsname>/media/dd689df4-0a5c-4277-aad3-7d1950ed9df9/EXT4</fsname>
    <dir>/var/lib/docker/openmediavault</dir>
    <type>none</type>
    <opts>bind,defaults</opts>
    <freq>0</freq>
    <passno>0</passno>
    <hidden>0</hidden>
    </mntent>


    In your case you'll probably have two such entries (with other fsnames, but the rest looking the same). Delete both entries.


    Next locate a part that looks like this:

    Code
    <docker>
    <dockermntent>0778e379-fbd4-4d38-9856-ab357f808aab</dockermntent>
    <enabled>1</enabled>
    <apiPort>42005</apiPort>
    <sharedfolderref>f6a4baa4-4a41-4c9e-a193-cc9b35b447bc</sharedfolderref>
    </docker>


    Here you need to make it look like this:

    Code
    <docker>
    <dockermntent></dockermntent>
    <enabled>1</enabled>
    <apiPort>42005</apiPort>
    <sharedfolderref></sharedfolderref>
    </docker>


    Save and close the file. Execute the command export LANG=C; omv-mkconf fstab 2>&1. Verify that there are no bind-mounts present in /etc/fstab.


    Open up your /etc/default/docker file and remove the part that looks like this:

    Code
    ### Do not change these lines. They are added and updated by the OMV Docker GUI plugin.
    OMVDOCKER_API="-H unix:///var/run/docker.sock -H tcp://127.0.0.1:42005"
    OMVDOCKER_IMAGE_PATH="-g /var/lib/docker/openmediavault"
    DOCKER_OPTS="$DOCKER_OPTS $OMVDOCKER_API $OMVDOCKER_IMAGE_PATH"
    ### Do not add any configuration below this line. It will be removed when the plugin is removed


    Save and close the file. Start the Docker service.


    Open up the docker-gui plugin and relocate to your shared folder again. All images and containers should show up properly again and it should be possible to start up the containers. If you get an error -7 (like you did before), try changing the port the plugin uses to 42006 (or some other port of choice) and save the settings. This error comes from the Docker service not starting up as it should and changing the port setting will most likely bring it back up.


    A lot of things to fix to get it back up unfortunately, but I hope you'll make it work.

  • Now that the Repo tab (hopefully) is visible it's time to populate the list with good images. What are you using and why? I've added two superb images from the linuxserver.io team (Couchpotato and SABnzbd) which I've set up on my own NAS with good results. I've also added a Sickrage image that I put together myself based on the Couchpotato image. More good images wanted! :)

    • Offizieller Beitrag

    I use the watchdog kodi from your repo and coppit/filebot.


    The last one watches a input folder and renames (unpacks also) all files to movies or series. I use this for movies that are being pulldown from my seedbox with syncthing. It uses inotify, so under certain settings it waits for the folder to "calm down" before start moving files.


    There are also very useful downloaders (transmission or deluge) that are combined with openvpn an iptables rules all in one container. All traffic is forced through vpn, and no leakage if the vpn goes down. The only i have tried is binhex/arch-delugevpn but there are plenty more.

  • I use the watchdog kodi from your repo and coppit/filebot.


    The last one watches a input folder and renames (unpacks also) all files to movies or series. I use this for movies that are being pulldown from my seedbox with syncthing. It uses inotify, so under certain settings it waits for the folder to "calm down" before start moving files.


    There are also very useful downloaders (transmission or deluge) that are combined with openvpn an iptables rules all in one container. All traffic is forced through vpn, and no leakage if the vpn goes down. The only i have tried is binhex/arch-delugevpn but there are plenty more.


    Transmission plus openvpn sound nice. I found an image that I'll probably use as base for my own version. Next week's project :)

  • Hello


    I still have the problem with the "permission denied" after a reboot


    What I did for Testing:
    I did a fresh install of openmediavault in a Virtualbox.
    Then installed the Plugin in version 2.14
    I activated the Plugin
    Then I changed the base path
    Then I rebooted the System
    After the system was up i tried a docker build from the console via ssh.
    It pulls the ubuntu image and when the docker build process tries to run the commands (starting containers) I get permission denied error


    Then I run "/etc/rc.local" and after that the build process runs fine.
    Then I created a container from the new build image and everything runs fine.
    Then I did a reboot to test if the container starts automatically, but it didn't
    I tried to start it from the webIF, and I get the permission error again
    So logged in through ssh and I need to run "/etc/rc.local" twice, after that I can start the Container from the webIF


    Here are the messages from running /etc/rc.local twice


    Do I need to set some special permissions to the base path folder after I have created it, or is there somthing else wrong in my workflow?


    Permission of the shared folder

  • Hello,


    here's the /etc/default/docker


    and /etc/rc.local

  • /etc/fstab


    Code
    # >>> [openmediavault]
    UUID=3be179f1-269f-40ce-bcab-d5ea8ae755dd /media/3be179f1-269f-40ce-bcab-d5ea8ae755dd ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    UUID=fa7865a4-2fb3-4da2-8af6-5d13861c3d0a /media/fa7865a4-2fb3-4da2-8af6-5d13861c3d0a ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    UUID=148fec83-bb0d-4039-beeb-dcebfef3425a /media/148fec83-bb0d-4039-beeb-dcebfef3425a ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    UUID=7f8e400a-4a91-4379-bb8b-3175203b0446 /media/7f8e400a-4a91-4379-bb8b-3175203b0446 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
    /media/148fec83-bb0d-4039-beeb-dcebfef3425a/s_docker /var/lib/docker/openmediavault none bind,defaults 0 0
    # <<< [openmediavault]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!