Letsencrypt Docker error

  • I try to setup letsencrypt in my OMV installation.
    I followed step by step this video Installation and Setup Videos - Beginning, Intermediate and Advanced
    OMV, phpmyadmin, duckdns, mariadb, nextcloud everything is up and runnig.
    But when i hit the Save button on the end of the docker configuration, i get this error:


    Fehler #0: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:450:443/tcp -p 0.0.0.0:90:80/tcp -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e PS1="$(whoami)@$(hostname):$(pwd)\$ " -e HOME="/root" -e TERM="xterm" -e DHLEVEL="2048" -e ONLY_SUBDOMAINS="false" -e AWS_CONFIG_FILE="/config/dns-conf/route53.ini" -e S6_BEHAVIOUR_IF_STAGE2_FAILS="2" -e PUID="1000" -e PGID="100" -e URL="duckdns.org" -e TZ="Europe/Berlin" -e VALIDATION="http" -e EMAIL="jxxxxxx@gmx.net" -e SUBDOMAINS="thegreatxxxx,thegreatxxxx2" -e ONLY_SUBDOMAINS="true" -v "/sharedfolders/Daten/letsencrypt":"/config":rw --name="letsencrypt" --label omv_docker_extra_args="--cap-add=NET_ADMIN --network my-net" --cap-add=NET_ADMIN --network my-net "linuxserver/letsencrypt: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'. in /usr/share/php/openmediavault/system/process.inc:182Stack trace:#0 /usr/share/openmediavault/engined/rpc/docker.inc(597): OMV\System\Process->execute()#1 [internal function]: OMVRpcServiceDocker->runContainer(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('runContainer', Array, Array)#4 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Docker', 'runContainer', Array, Array, 1)#5 {main}


    So whats wrong please help.

  • Ok my next problem is when i type in Putty "docker logs -f letsencrypt" i got this error at the end


    An unexpected error occurred:
    pkg_resources.ContextualVersionConflict: (cryptography 2.6.1 (/usr/lib/python3.7/site-packages), Requirement.parse('cryptography>=2.8'), {'PyOpenSSL'})
    Please see the logfile '/tmp/tmp8l9th1mp/log' for more details.
    ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container

  • S
    A new error pops when I re-build a new lets-encrypt container :

    Code
    pkg_resources.ContextualVersionConflict: (cryptography 2.6.1 (/usr/lib/python3.7/site-packages), Requirement.parse('cryptography>=2.8'), {'PyOpenSSL'})


    I found the fix in linuxserver forum. See the 'drumstyx response at 20/11/2019 to fix this issue:


    -Connect to your lets encrypt container bash and:


    Code
    apk add gcc musl-dev libffi-dev openssl-dev python3-dev; pip install cryptography --upgrade
  • I hope i get this right.
    So i open Putty Login as root and type in first: apk add gcc musl-dev libffi-dev openssl-dev python3-dev; pip install cryptography --upgrade
    ant then i can type docker logs -f letsencrypt?


    This is the whole output

  • first bash into your docker:
    docker exec -it letsencrypt bash
    then enter the aformentioned line:
    apk add gcc musl-dev libffi-dev openssl-dev python3-dev; pip install cryptography --upgrade


    also in case of the config of letsencrypt from your logs you need to change the Variable ONLY_SUBDOMAINS=false to ONLY_SUBDOMAINS=true. Cause right now you are trying to register a ssl-certficate for the domain duckdns.org

  • Ok did that.


    And then I got this


  • Ok deleted the old one. And now i have installed the new version of letsencrypt Docker.
    Does the error say that there is something wrong with duckdns?


  • Hello Again!
    Letsencrypt is working and i can reach my nextcloud docker from the internet with my the url https://xxx.duckdns.org:447
    So how do i get it to run without the Port 447 at the end? When i try to reach it without the Port i get only a timeout.
    I have setup mariadb, letsencrypt, nextcloud, duckdns, phpmyadmin everything is running.
    I know that i don`t need the "--network my-net" argument in letsencrypt docker.
    Now i have tryed with zwo different how to videos:

    Timecode 9:45
    and
    Timecode 1:04:53


    and both state that i have to add in the nextcloud extra args "--network my-net" see timecode.


    But when i do that, i get a container crash an it won't start so i have to setup nextcloud container from scratch.



    The difference between both videos is that Techno Dad is changing something in a nextcloud file "custom.cnf" at Timecode 8:35 i didn't do that.


    The Error shown after trying to set the "--network my-net" argument:

    @macom yep i should do that. With my previous ISP WillyTel i had a Fritzbox.

  • The guide is outdated. Remove the --network my-net. Then attach the container manually to the my-net network in the network tab of the docker gui

    etsencrypt is working and i can reach my nextcloud docker from the internet with my the url xxx.duckdns.org:447
    So how do i get it to run without the Port 447 at the end?

    What port does your nextcloud container expose? And why does your router lets port 447 trough did you open it?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!