nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

UNABLE to add Let's Encrypt Certificate for my domain website

Open eugenehw08 opened this issue 3 years ago • 8 comments

Below is the error when want to add in error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [122 lines of output] Collecting setuptools!=60.9.0,>=40.6.0 Using cached setuptools-63.4.2-py3-none-any.whl (1.2 MB) Collecting wheel Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB) Collecting cffi>=1.12 Using cached cffi-1.15.1.tar.gz (508 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting setuptools-rust>=0.11.4 Using cached setuptools_rust-1.4.1-py3-none-any.whl (23 kB) Collecting pycparser Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting typing-extensions>=3.7.4.3 Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB) Collecting semantic-version<3,>=2.8.2 Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB) Building wheels for collected packages: cffi Building wheel for cffi (setup.py): started Building wheel for cffi (setup.py): finished with status 'error' error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [36 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.linux-armv7l-3.7
        creating build/lib.linux-armv7l-3.7/cffi
        copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
        running build_ext
        building '_cffi_backend' extension
        creating build/temp.linux-armv7l-3.7
        creating build/temp.linux-armv7l-3.7/c
        arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
        c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
         #include 
                  ^~~~~~~~~~
        compilation terminated.
        error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
        [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: wheel, typing-extensions, setuptools, semantic-version, pycparser, setuptools-rust, cffi
    Running setup.py install for cffi: started
    Running setup.py install for cffi: finished with status 'error'
    error: subprocess-exited-with-error
  
    × Running setup.py install for cffi did not run successfully.
    │ exit code: 1
    ╰─> [36 lines of output]
        running install
        running build
        running build_py
        creating build
        creating build/lib.linux-armv7l-3.7
        creating build/lib.linux-armv7l-3.7/cffi
        copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
        copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
        running build_ext
        building '_cffi_backend' extension
        creating build/temp.linux-armv7l-3.7
        creating build/temp.linux-armv7l-3.7/c
        arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
        c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
         #include 
                  ^~~~~~~~~~
        compilation terminated.
        error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
        [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: legacy-install-failure
  
  × Encountered error while trying to install package.
  ╰─> cffi
  
  note: This is an issue with the package mentioned above, not pip.
  hint: See above for output from the failure.
  WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
  You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12)

this part : WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available. <= my pi server is already installed pip version 22.2.2, i tried to reboot my pi many times still same errors & i am using latest python 3.10 version image

Would like to have a good solution to above errors

eugenehw08 avatar Aug 07 '22 02:08 eugenehw08

Sorry, but are you posting in the right repository? NginxProxyManager has a webinterface to request and assign SSL certificates.

Which NginxProxyManager version are you running? v2.9.18? Have you tried adding a certificate via webinterface? Which option did you try? http-challenge? dns-challenge?

rezzorix avatar Aug 08 '22 08:08 rezzorix

I am using the latest version of nginx proxy manager from jc21 n tried both http challenge n dns challenge also give errors

eugenehw08 avatar Aug 08 '22 09:08 eugenehw08

Sorry, your error reporting here seems off... all dependencies are within the container. So you shouldnt have issues with the pip on your system itself...

Can you please give all the following info:

Checklist

Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    Yes / No
Are you sure you're not using someone else's docker image?
    Yes / No
Have you searched for similar issues (both open and closed)?
    Yes / No

Describe the bug

Nginx Proxy Manager Version

To Reproduce Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior

Screenshots

Operating System

Additional context

rezzorix avatar Aug 08 '22 11:08 rezzorix

Hello, I have the same issue.

Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    Yes   
Are you sure you're not using someone else's docker image?
    Yes 
Have you searched for similar issues (both open and closed)?
    Yes 

To Reproduce Steps to reproduce the behavior:

Go to 'SSL Certificates'
Click on 'Add SSL Certificate'
Scroll down to 'Let's Encrypt'
Select Cloudflare provider
Fill necesary data
Select 'Use a DNS Challenge'
See error described in the fitst post

When I do not select 'DNS Challenge' certificates are generated correctly For a wildcard certificate you need DNS.

I just checked it, version 2.9.14 works fine and gets the certificate with no errors. 2.9.16 and 2.9.17 also fail, I haven't tried 2.9.15

fcainzos avatar Aug 11 '22 17:08 fcainzos

I am running latest v2.9.18 without any issues.

Neither DNS challenge for wildcards nor http challenge.

Most likely the DNS challenge settings are wrongly entered, it needs to be ensured that correct api keys etc or whatever is required are used.

rezzorix avatar Aug 12 '22 09:08 rezzorix

Renewing certs on existing domains is currently broken if force SSL is ticked, untick force SSL, save and then update the cert, before tuning force SSL back on, at least until PR #2038 is merged and made live.

the1ts avatar Aug 12 '22 10:08 the1ts

I have the exact same problem. is there any update on this?

vascozorrinho avatar Aug 25 '22 10:08 vascozorrinho

@rezzorix

Sorry, your error reporting here seems off... all dependencies are within the container. So you shouldnt have issues with the pip on your system itself...

Sorry, I don't think you should be commenting on this issue.

NPM runs in a container, yes. That container is filled with processes and calls which depend on interlocking dependencies.

That is a very valid error and report. You see the exact same error in a HTML tag, but that doesn't mean it has any less value than a screenshot of the front-end.

I've also seen this error on a Pi 4 and if you care to look at the other issues returning errors for cffi in the Issue tracker you will see similar reporting and errors.

Most likely the DNS challenge settings are wrongly entered

Yes. The single box that says "ENV_VAR=API_KEY" was entered wrong. User error. Of course! /s


For everyone else, you can try this comment after entering the container with docker exec

https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1955#issuecomment-1085817627

apt update
apt-get install build-essential libssl-dev libffi-dev python3-dev cargo
pip install certbot-dns-duckdns~=0.6

fanuch avatar Sep 13 '22 06:09 fanuch

@rezzorix

Sorry, your error reporting here seems off... all dependencies are within the container. So you shouldnt have issues with the pip on your system itself...

Sorry, I don't think you should be commenting on this issue.

NPM runs in a container, yes. That container is filled with processes and calls which depend on interlocking dependencies.

That is a very valid error and report. You see the exact same error in a HTML tag, but that doesn't mean it has any less value than a screenshot of the front-end.

I've also seen this error on a Pi 4 and if you care to look at the other issues returning errors for cffi in the Issue tracker you will see similar reporting and errors.

Most likely the DNS challenge settings are wrongly entered

Yes. The single box that says "ENV_VAR=API_KEY" was entered wrong. User error. Of course! /s

For everyone else, you can try this comment after entering the container with docker exec

#1955 (comment)

apt update
apt-get install build-essential libssl-dev libffi-dev python3-dev cargo
pip install certbot-dns-duckdns~=0.6

Those commands just nuked my instance

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [9/22/2022] [12:52:09 PM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite' [9/22/2022] [12:52:09 PM] [Migrate ] › ℹ info Current database version: none

rightsaidfred99 avatar Sep 22 '22 12:09 rightsaidfred99

I'm having this issue as well. I'll wait until I hear back on a solution. But for now, I have to create the certificate on my UDM Pro, and pull them over. At least for now, I'm good until December. :)

Would we not want to use the cloud flare script instead of duckdns?

skirven4 avatar Sep 26 '22 02:09 skirven4

Same here, just getting an Internal Error when trying to request a cert from LE.

shieldsit avatar Oct 22 '22 19:10 shieldsit

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Feb 12 '24 01:02 github-actions[bot]