Adding Extra Arguments: Error #0

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Adding Extra Arguments: Error #0

      I'm trying to follow this tutorial on setting up NextCloud remote access. At about 9:57, when I go to put --network my-net into Extra arguments, I get this error:

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; docker run -d --restart=always -v /etc/localtime:/etc/localtime:ro --net=bridge -p 0.0.0.0:444:443/tcp -p 0.0.0.0:8080:80/tcp -h "fa47fe7d0d48" -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e PS1="root@HC2:/$ " -e HOME="/root" -e TERM="xterm" -e NEXTCLOUD_PATH="/config/www/nextcloud" -v "/sharedfolders/AppData/Nextcloud":"/config":rw -v "/sharedfolders/Nextcloud":"/data":rw --name="nextcloud" --label omv_docker_extra_args="--network my-net" --network my-net "linuxserver/nextcloud:latest" 2>&1' with exit code '125': docker: conflicting options: cannot attach both user-defined and non-user-defined network-modes. See 'docker run --help'.

      The details are as follows:

      Source Code

      1. Error #0:
      2. 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 run -d --restart=always -v /etc/localtime:/etc/localtime:ro --net=bridge -p 0.0.0.0:444:443/tcp -p 0.0.0.0:8080:80/tcp -h "fa47fe7d0d48" -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e PS1="root@HC2:/$ " -e HOME="/root" -e TERM="xterm" -e NEXTCLOUD_PATH="/config/www/nextcloud" -v "/sharedfolders/AppData/Nextcloud":"/config":rw -v "/sharedfolders/Nextcloud":"/data":rw --name="nextcloud" --label omv_docker_extra_args="--network my-net" --network my-net "linuxserver/nextcloud:latest" 2>&1' with exit code '125': docker: conflicting options: cannot attach both user-defined and non-user-defined network-modes.
      3. See 'docker run --help'. in /usr/share/php/openmediavault/system/process.inc:182
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/rpc/docker.inc(607): OMV\System\Process->execute()
      6. #1 /usr/share/openmediavault/engined/rpc/docker.inc(714): OMVRpcServiceDocker->runContainer(Array, Array)
      7. #2 [internal function]: OMVRpcServiceDocker->modifyContainer(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('modifyContainer', Array, Array)
      10. #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Docker', 'modifyContainer', Array, Array, 1)
      11. #6 {main}
      Display All
      Then I simply have to cancel modifying the container. After this, my nextcloud container completely disappears. I tried docker restart nextcloud, and it says no such container. So then I tried creating the container again, and Nextcloud was working fine and I could access it again. Then I tried to modify again adding the Extra Arguments, and the same error and same thing happened (container disappeared). So I tried creating the container again, but with the Extra arguments added right away the first time, and got the same error. I'm not sure how to resolve this.
    • So I have a question about this thread. Morlan wrote: "You can try joining the containers in the network settings of the docker gui.

      I wasn't sure what this meant, so in the Docker GUI, I went to the tab "Networks" clicked on "my-net" and chose the Nextcloud container. Is this what I'm supposed to do? If so, do I put my Odroid's IP address in the IP address section? (the IP address I use to log into OMV)

      I'm just confused about the solutions.
    • @Morlan,I did go ahead and went to the tab "Networks" clicked on "my-net" and chose the Nextcloud container and pressed okay (left everything else blank). Then I noticed that when clicking "Run Image" and adding all the info for Letsencrypt, that the tutorial is having me add --network -my-net again in Extra Arguments. Not a problem with repeating the process and adding Letsencrypt to my-net with the GUI like I did with Nextcloud. I just simply left --cap-add=NET_ADMIN by itself in Extra Arguments and was able to save it.

      But now I have a new problem, and I'm not sure if it's related, like, if it's because I didn't "join containers" properly. When I type docker logs -f letsencrypt in SSH terminal, I get the error over and over (not stopping until I hit Ctrl + C):

      Source Code

      1. nginx: [emerg] PEM_read_bio_DHparams("/config/nginx/dhparams.pem") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: DH PARAMETERS)
    • Update:

      I stopped the Letsencrypt service, deleted the container, deleted the Letsencrypt folder, and started over with Letsencrypt. It probably didn't work because I had initially created Letsencrypt without --cap-add=NET_ADMIN in the arguments, figuring that I would have to find a GUI way of adding Fail2ban. But then I decided to modify the Letsencrypt container and try adding --cap-add=NET_ADMIN to the Extra arguments, and it worked. But it was probably my modifying the container that screwed it up. So after I deleted it all and started over, I was able to execute docker logs -f letsencrypt successfully.
    • threehappypenguins wrote:

      @Morlan,I did go ahead and went to the tab "Networks" clicked on "my-net" and chose the Nextcloud container and pressed okay (left everything else blank). Then I noticed that when clicking "Run Image" and adding all the info for Letsencrypt, that the tutorial is having me add --network -my-net again in Extra Arguments. Not a problem with repeating the process and adding Letsencrypt to my-net with the GUI like I did with Nextcloud. I just simply left --cap-add=NET_ADMIN by itself in Extra Arguments and was able to save it.

      But now I have a new problem, and I'm not sure if it's related, like, if it's because I didn't "join containers" properly. When I type docker logs -f letsencrypt in SSH terminal, I get the error over and over (not stopping until I hit Ctrl + C):

      Source Code

      1. nginx: [emerg] PEM_read_bio_DHparams("/config/nginx/dhparams.pem") failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: DH PARAMETERS)
      I had this issue too. The issue is that techno dad video is out of date. In both videos he is missing permissions. For lets-encrypt and for nextcloud. To fix it I had to stop the dockers delete and remake the config folders and then enter all the permissions based off of what they said on docker hub (See links below).

      Lets-encrypt = hub.docker.com/r/linuxserver/letsencrypt/
      Nextcloud = hub.docker.com/r/linuxserver/nextcloud/

      The post was edited 2 times, last by cj2tech: I'm a idiot ().

    • cj2tech wrote:

      I had this issue too. The issue is that techno dad video is out of date. In both videos he is missing permissions. For lets-encrypt and for nextcloud. To fix it I had to stop the dockers delete and remake the config folders and then enter all the permissions based off of what they said on docker hub (See links below).

      Lets-encrypt = hub.docker.com/r/linuxserver/letsencrypt/
      Nextcloud = hub.docker.com/r/linuxserver/nextcloud/
      For Lets Encrypt you need the following permission:

      • Name set to letencrypt
      • PUID=1000
        PGID=100
        TZ=America/New_York
        URL=yourdomain.url
        SUBDOMAINS=www,
        VALIDATION=http
        EMAIL= fakeemail@fake.com
        ONLY_SUBDOMAINS=true
      • Sharedfolders/appdata/letsencrypt mounted to /config
      • Extra Arguments = --cap-add=NET_ADMIN


      For Nextcloud you need the following permissions
      • Name to be set to nextcloud
      • PUID=1000
        PGID=100
        TZ=America/New_York
      • /sharedfolders/appdata/nextcloud to be mounted to /config
        /sharedfolders/nextcloud to be mounted to /data
    • cj2tech wrote:

      cj2tech wrote:

      I had this issue too. The issue is that techno dad video is out of date. In both videos he is missing permissions. For lets-encrypt and for nextcloud. To fix it I had to stop the dockers delete and remake the config folders and then enter all the permissions based off of what they said on docker hub (See links below).

      Lets-encrypt = hub.docker.com/r/linuxserver/letsencrypt/
      Nextcloud = hub.docker.com/r/linuxserver/nextcloud/
      For Lets Encrypt you need the following permission:
      • Name set to letencrypt
      • PUID=1000
        PGID=100
        TZ=America/New_York
        URL=yourdomain.url
        SUBDOMAINS=www,
        VALIDATION=http
        EMAIL= fakeemail@fake.com
        ONLY_SUBDOMAINS=true
      • Sharedfolders/appdata/letsencrypt mounted to /config
      • Extra Arguments = --cap-add=NET_ADMIN


      For Nextcloud you need the following permissions
      • Name to be set to nextcloud
      • PUID=1000
        PGID=100
        TZ=America/New_York
      • /sharedfolders/appdata/nextcloud to be mounted to /config
        /sharedfolders/nextcloud to be mounted to /data

      Your instructions are the same as what's in the tutorial.
    • cj2tech wrote:

      I had this issue too. The issue is that techno dad video is out of date. In both videos he is missing permissions. For lets-encrypt and for nextcloud. To fix it I had to stop the dockers delete and remake the config folders and then enter all the permissions based off of what they said on docker hub (See links below).

      Lets-encrypt = hub.docker.com/r/linuxserver/letsencrypt/
      Nextcloud = hub.docker.com/r/linuxserver/nextcloud/
      For Lets Encrypt you need the following permission:

      • Name set to letencrypt
      • PUID=1000
        PGID=100
        TZ=America/New_York
        URL=yourdomain.url
        SUBDOMAINS=www,
        VALIDATION=http
        EMAIL= fakeemail@fake.com
        ONLY_SUBDOMAINS=true
      • Sharedfolders/letsencrypt mounted to /config
      • Extra Arguments = --cap-add=NET_ADMIN


      For Nextcloud you need the following permissions
      • Name to be set to nextcloud
      • PUID=1000
        PGID=100
        TZ=America/New_York
      • /sharedfolders/appdata/nextcloud to be mounted to /config
        /sharedfolders/nextcloud to be mounted to /data
      they are different I was up late when I wrote that so I could be wrong. I will send a screen cap of my current config. You also need to join the my-net network via the network tab in docker rather then have it in the extra augments.