[ Docker ] Enabling Docker from OMV Docker GUI throws error

  • Hello, following is my system configuration:


    RPI Model 3b+
    NAS Setup using OMV 4.1.15-1
    Storage Device: Ext4 formatted


    Issue in Brief: I've followed NAS installation setup by going through videos on this forum post. All things are working fine except I can't enable docker. Enabling it throws the following error:



    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; docker images 2>&1' with exit code '1': Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?


    I've also made the cardinal mistake to purge openmediavault-docker-gui via CLI.
    Tried to reinstall omv-extras but no luck.
    Now I have a non functionable docker plugin:


    Error #0: OMV\Rpc\Exception: RPC service 'Docker' not found. in /usr/share/php/openmediavault/rpc/rpc.inc:99 Stack trace: #0 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Docker', 'getNetworks', Array, Array, 1) #1 {main}



    I've already followed some threads (link1, link2) however I am unable to figure out what exactly I have to do, please consider me a beginner in using CLI and OMV.


    Should I reinstall omv?
    How do I format my usb stick to ext4 with nonexec flag?
    Overall, how to resolve the 1st error, because I think reinstalling omv will give me this error again?


    Any help would be appreciated.
    Thank you for your valuable time.

  • No, but have a look at this thread

    So I followed every procedure as follows:


    1. Completely remove docker gui and omv extras.
    2. Reinstalled again.
    3. Enabled the Docker CE plugin in OMV extras


    Problem: While the docker plugin is enabled, in services tab docker isn't running. It again throws the usual error.




    Code
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; docker images 2>&1' with exit code '1': Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? in /usr/share/php/openmediavault/system/process.inc:182
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/docker.inc(1543): OMV\System\Process->execute(Array)
    #1 [internal function]: OMVRpcServiceDocker->getDockerRepo(Array, Array)
    #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getDockerRepo', Array, Array)
    #4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Docker', 'getDockerRepo', Array, Array, 1)
    #5 {main}


    And the whole stack trace of my CLI:

  • In Services -> Docker -> Settings have you enabled it there?


    Yes I did, throws this following error: see file in attachments



    When I go and search for (say) "emby", throws me the following error:


    Code
    Error #0:
    OMVModuleDockerException: Error: "" - Code: 7 in /usr/share/omvdocker/Utils.php:74
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/docker.inc(313): OMVModuleDockerUtil::doApiCall('http::/images/s...')
    #1 [internal function]: OMVRpcServiceDocker->searchImages(Array, Array)
    #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('searchImages', Array, Array)
    #4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Docker', 'searchImages', Array, Array, 1)
    #5 {main}


    To be very honest, I believe there are few issues plaguing my docker plugin installation properly:


    1. I am unable to see IP tables, which means my iptables aren't set. (My Pi3b+ > lan cable > My router)
    2. Instead of eth0 : I have physical address : please see 2nd attachment image.
    3. I have DHCP enabled in network interfaces.
    4. In armbian configuration ... I cannot change my download source mirrors. It's only for UK and Estonia.
    4. Running a systemctl status docker give me this:



    5. Running a systemctl status docker.service gives me this:



  • I am seriously wondering if the SD card is corrupt, therefore OMV has not installed correctly, there are a few things we could try from the thread link, but it should just work.


    dpkg -l | grep openm

    Code
    ii  openmediavault                      4.1.15-1                          all          openmediavault - The open network attached storage solution
    ii  openmediavault-docker-gui           4.1.1                             all          OpenMediaVault plugin for Docker
    ii  openmediavault-flashmemory          4.2.1                             all          folder2ram plugin for OpenMediaVault
    ii  openmediavault-keyring              1.0                               all          GnuPG archive keys of the OpenMediaVault archive
    ii  openmediavault-netatalk             4.0.7-1                           all          OpenMediaVault netatalk (AppleTalk Protocol Suite) plugin
    ii  openmediavault-omvextrasorg         4.1.13                            all          OMV-Extras.org Package Repositories for OpenMediaVault
    ii  openmediavault-plexmediaserver      3.8.2                             all          OpenMediaVault Plex Media Server plugin
    ii  openmediavault-shellinabox          3.4                               all          Web-based SSH client.


    If I try to manually start docker and docker.service using systemctl start docker && docker.service , it doesn't start. If I do journalctl -xe  shows me a log which I've PFA here.


    Plex media server plugin is running fine without docker though!

    • Offizieller Beitrag

    Plex media server plugin is running fine without docker though!

    The Plex plugin does not require docker, the plugin is old and will not be updated as most now use docker.


    TBH, I think this is going to go around in circles, and I would suggest starting this over again as the problem is related to the SD card.


    Download and test the SD card using H2testw
    If the card is Ok download SDFormatter
    Use Etcher to flash the Pi image to the card
    Follow the read me instructions on the sourceforge page.


    This simply works and a lot of problems like this are SD card related, once up and running again, set the date and time, enable ssh including root logon, install all updates from the update manager, install omv-extras check update manager again, then start setting things up.


    I have 2 Pi's running one was running OMV but I have never had an issue as I use SanDisk Ultra Class 10 16 GB

  • You are right, I would like to appreciate you for the fact that you found time to reply to my queries. So I am going to do a clean install this time.
    I have just one last query ... I've tried to assign a static IP with DHCP with the router for my OMV NAS project. However it becomes a mess when I try to configure via either armbian-config > network and interfaces settings  or via omv-firstaid > configure network interfaces 


    What should be the proper way to setup a static ip for my NAS?

    • Do I do it when I do first install of OMV on my pi 3b+?
    • Or afterwards?

    Or just point me to the right thread.


    Thanks. :thumbup:

    • Offizieller Beitrag

    What should be the proper way to setup a static ip for my NAS?

    Use omv-firstaid Option 1 I think, as you have stated.


    The Pi will automatically use dhcp so wait for it to finish, then continue as I have suggested above, once you have done that then change the IP address.


    Any router or dhcp server cannot assign a static ip to a pc on the network, however is does need to know about it as most will perform some sort of dns.


    To assign a static IP to the Pi;


    Login to your router and locate the dhcp server option, it will display a scope/range of ip addresses which can be used on your network, it will be something like 192.168.2.2 -> 192.168.1.xxx or like mine 192.168.1.60 -> 192.168.1.253
    The static IP must be outside the scope i.e. after 192.168.1.xxx or before 192.168.1.60 why? because if you use an IP from that range, dhcp will not know about it and will/can issue it to something else leading to conflict. Some routers do allow an IP from the range to be assigned statically if and only if there is an option within the router to add an entry for xxx.xxx.xxx.xxx to y machine. My own router does not have that facility so any static IP's must be outside the scope.


    When you do do that double check the DNS entry by selecting the Network Interface click Edit and scroll down to DNS and ensure there is a DNS server entry, something like 1.1.1.1

Jetzt mitmachen!

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