NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.22k stars 2.69k forks source link

Cannot Log into Admin After Upgrade to 2.9.15 #1769

Open jiriteach opened 2 years ago

jiriteach commented 2 years ago

Updated via docker-compose to 2.9.15 from 2.9.14 and can no longer access the admin console. Login page loads but cannot log in.

Docker logs -

[1/17/2022] [7:56:36 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
[1/17/2022] [7:56:39 AM] [Migrate  ] › ℹ  info      Current database version: none

I don't see anything further than this. Normally can take ~ 30s-1min before other bits are logged but nothing further showing up with 2.9.15. Decided to roll back to 2.9.14 - pulled the 2.9.14 image and loaded - works fine!.

I've tried twice with 2.9.15 and no luck. Changes didn't show any big ones so any pointers as to what could cause this?

Thanks

jiriteach commented 2 years ago

@jc21 -

Here's the issue - existing wildcard certificates in the certificates table! That new version must have some checks etc. Cert was valid but its a wildcard.

Screen Shot 2022-02-17 at 18 47 42

Remove that record from the certificates table and all works fine!

jiriteach commented 2 years ago

Sigh - While this worked to get me access to the admin console and everything looked like it was working - I can no longer request SSL certificates via DNS challenge using Cloudflare with the latest build or github-develop. I get no error message back - simple a red banner. Looks like a timeout. I need to do more investigation as whats caused this now!

jiriteach commented 2 years ago

@jc21 - OK here is my final diagnosis on this issue.

DNS Challenge with Cloudflare is actually not working with 2.9.15 and 2.9.16 and that the reason why I have been experiencing this issue. This is working with 2.9.14 but is now broken with anything above.

Decided to do a fresh (blank) install - and first task was to add an SSL certificate using my domain name with a DNS Challenge against Cloudflare. Enter the API Key and error!

Error: Command failed: pip install certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') cloudflare
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [122 lines of output]

I am using github-develop on a fresh install of NPM. This would be the cause of the issues and no fix for me unfortunately as even if start fresh - I cannot add validate any new certificates against Cloudflare since this DNS Challenge is broken. Looks like the library might be a Python3 and this is failing to install? Anything you can do to update the dependancy?

Thanks

Screen Shot 2022-02-18 at 17 10 41
jc21 commented 2 years ago

and what happens if you run that command inside the container yourself?

docker exec -ti nginxproxymanager bash
pip install certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') cloudflare

that seems to be working for me?

jiriteach commented 2 years ago

@jc21 - This fails with the same error as above. Still using github-develop. Hmm what's different with your setup?

Here is the full log -

pi@rpi-dummer:~/Docker/resources $ docker exec -ti resources_app_1 bash
 _   _       _            ____                      __  __                                   
| \ | | __ _(_)_ __ __  _|  _ \ _ __ _____  ___   _|  \/  | __ _ _ __   __ _  __ _  ___ _ __ 
|  \| |/ _` | | '_ \\ \/ / |_) | '__/ _ \ \/ / | | | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
| |\  | (_| | | | | |>  <|  __/| | | (_) >  <| |_| | |  | | (_| | | | | (_| | (_| |  __/ |   
|_| \_|\__, |_|_| |_/_/\_\_|   |_|  \___/_/\_\\__, |_|  |_|\__,_|_| |_|\__,_|\__, |\___|_|   
       |___/                                  |___/                          |___/           
Version 2.9.16 (1a76f4e) 2022-02-17 04:04:27 UTC, OpenResty 1.19.9.1, debian 10 (buster), Certbot certbot 1.23.0
Base: debian:buster-slim, linux/arm/v7
Certbot: nginxproxymanager/nginx-full:latest, linux/arm/v7
Node: nginxproxymanager/nginx-full:certbot, linux/arm/v7

Eo '[0-9](\.[0-9]+)+') cloudflarep install certbot-dns-cloudflare==$(certbot --version | grep -E

Collecting certbot-dns-cloudflare==1.23.0
  Downloading certbot_dns_cloudflare-1.23.0-py2.py3-none-any.whl (11 kB)
Collecting cloudflare
  Downloading cloudflare-2.8.15.tar.gz (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.7/70.7 KB 54.1 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools>=39.0.1 in /usr/local/lib/python3.7/dist-packages (from certbot-dns-cloudflare==1.23.0) (58.0.0)
Collecting certbot>=1.23.0
  Downloading certbot-1.23.0-py2.py3-none-any.whl (270 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 271.0/271.0 KB 3.4 MB/s eta 0:00:00
Collecting acme>=1.23.0
  Downloading acme-1.23.0-py2.py3-none-any.whl (47 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.7/47.7 KB 2.0 MB/s eta 0:00:00
Collecting requests
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 KB 2.5 MB/s eta 0:00:00
Collecting pyyaml
  Downloading PyYAML-6.0.tar.gz (124 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 KB 4.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting jsonlines
  Downloading jsonlines-3.0.0-py3-none-any.whl (8.5 kB)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.4/97.4 KB 3.5 MB/s eta 0:00:00
Collecting cryptography>=2.5.0
  Downloading cryptography-36.0.1.tar.gz (572 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.1/572.1 KB 5.2 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [122 lines of output]
      Collecting setuptools>=40.6.0
        Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting cffi>=1.12
        Downloading cffi-1.15.0.tar.gz (484 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 484.1/484.1 KB 6.2 MB/s eta 0:00:00
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting setuptools-rust>=0.11.4
        Downloading setuptools_rust-1.1.2-py3-none-any.whl (21 kB)
      Collecting pycparser
        Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 3.0 MB/s eta 0:00:00
      Collecting typing-extensions>=3.7.4.3
        Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
      Collecting semantic-version<3,>=2.8.2
        Downloading semantic_version-2.9.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/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/setuptools_ext.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 -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 <Python.h>
                      ^~~~~~~~~~
            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/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/setuptools_ext.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 -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 <Python.h>
                      ^~~~~~~~~~
            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.
      [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.
X4V1 commented 2 years ago

I tried to update to version 2.9.16 and I'm also getting an python error during installation (from raspberry pi 3b+ wuth debian 11 32bits)

[2/20/2022] [8:52:58 AM] [Global   ] › ✖  error     Command failed: pip install certbot-dns-ovh==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') 
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [120 lines of output]
      Collecting setuptools>=40.6.0
        Using cached setuptools-60.9.3-py3-none-any.whl (1.1 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.0.tar.gz (484 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.1.2-py3-none-any.whl (21 kB)
      Collecting pycparser
        Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
      Collecting semantic-version<3,>=2.8.2
        Using cached semantic_version-2.9.0-py2.py3-none-any.whl (15 kB)
      Collecting typing-extensions>=3.7.4.3
        Using cached typing_extensions-4.1.1-py3-none-any.whl (26 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/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/setuptools_ext.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 -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 <Python.h>
                      ^~~~~~~~~~
            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/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/setuptools_ext.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 -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 <Python.h>
                      ^~~~~~~~~~
            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.
      [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.
jiriteach commented 2 years ago

Yup - downgrade to 2.9.14 or remove any certificates that do DNS challenges agains Cloudflare. This doesn't fix the underlying issue with Certbot but does help in trying source a fix.

X4V1 commented 2 years ago

@Jiriteach Indeed I downgraded to 2.9.14 and everything's back to normal.

HaoSs07 commented 2 years ago

note for those who use a raspberry pi, and end up here fallowing log errors, do not force the 64bit kernel ( using arm_64bit=1 in boot/config ) it will F tings up even if you revert back to 2.9.14

Eeems commented 2 years ago

I've currently had to downgrade to 2.9.13 as I have the same issue on 2.9.14. Might be due to how I'm deploying this in proxmox though.

thueske commented 2 years ago

Same problem here with 2.9.15 and 2.9.16 😨 Using Armbian (armv7l).

moracabanas commented 2 years ago

I run docker example on Raspberry pi 4 and I get 502 error from latest down to 2.9.13 I refreshed the data bind mount evey time and I can't login with default demo (sqlite)

redpixy commented 2 years ago

Same problem here with 2.9.15 and 2.9.16 😨 Using Armbian (armv7l).

same here. Experiencing the same issue when using those 2 versions.

bencollinz commented 2 years ago

I run docker example on Raspberry pi 4 and I get 502 error from latest down to 2.9.13 I refreshed the data bind mount evey time and I can't login with default demo (sqlite)

same. I've downgraded, trying 15, 14 and now 13, still can't login but everything runs in the background.

[3/30/2022] [1:56:25 PM] [Global ] › ✖ error connect EHOSTUNREACH 172.19.0.2:3306 [3/30/2022] [1:56:26 PM] [Global ] › ✖ error getaddrinfo EAI_AGAIN db [3/30/2022] [1:56:27 PM] [Global ] › ✖ error getaddrinfo EAI_AGAIN db [3/30/2022] [1:56:28 PM] [Global ] › ✖ error getaddrinfo EAI_AGAIN db [3/30/2022] [1:56:29 PM] [Global ] › ✖ error getaddrinfo EAI_AGAIN db

bencollinz commented 2 years ago

Interesting, I just switched back to the github-develop branch and gave it a test. 502 here

pi@raspberrypi:~/Code $ docker-compose pull && docker-compose up -d
Pulling app ... done
Pulling db  ... done
Recreating code_app_1 ... 
Recreating code_app_1 ... done
pi@raspberrypi:~/Code $ docker ps
CONTAINER ID   IMAGE                                     COMMAND             CREATED          STATUS          PORTS                                                                                  NAMES
fb0387b413d6   jc21/nginx-proxy-manager:github-develop   "/init"             18 seconds ago   Up 15 seconds   0.0.0.0:80-81->80-81/tcp, :::80-81->80-81/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   code_app_1
7b9bace16b35   jc21/mariadb-aria:latest                  "/scripts/run.sh"   22 minutes ago   Up 22 minutes   3306/tcp                                                                               code_db_1
pi@raspberrypi:~/Code $ docker exec -it fb0387b413d6 curl http://127.0.0.1:81/api/
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>

Same. Nothing I've done has made any difference so far.

FlyingPersian commented 2 years ago

Yup - downgrade to 2.9.14 or remove any certificates that do DNS challenges agains Cloudflare. This doesn't fix the underlying issue with Certbot but does help in trying source a fix.

So using DNS challenge with Cloudflare isn't working atm, even with 2.9.14?

niawag commented 2 years ago

Hi all, same problem for me on Pi3, it works with 2.9.14 but not with 15, 16 or 18. I'm using sqlite default db. I'm having a pip issue :

npm             | [4/1/2022] [9:27:48 AM] [Global   ] ? ?  error     Command failed: pip install certbot-dns-ovh==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')
npm             |   error: subprocess-exited-with-error
npm             |
npm             |   ? pip subprocess to install build dependencies did not run successfully.
npm             |   ? exit code: 1
npm             |   ??> [123 lines of output]
npm             |       Collecting setuptools>=40.6.0
npm             |         Downloading setuptools-61.3.0-py3-none-any.whl (1.1 MB)
npm             |            ???????????????????????????????????????? 1.1/1.1 MB 4.5 MB/s eta 0:00:00
npm             |       Collecting wheel
npm             |         Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
npm             |       Collecting cffi>=1.12
npm             |         Downloading cffi-1.15.0.tar.gz (484 kB)
npm             |            ??????????????????????????????????????? 484.1/484.1 KB 4.9 MB/s eta 0:00:00
npm             |         Preparing metadata (setup.py): started
npm             |         Preparing metadata (setup.py): finished with status 'done'
npm             |       Collecting setuptools-rust>=0.11.4
npm             |         Downloading setuptools_rust-1.2.0-py3-none-any.whl (21 kB)
npm             |       Collecting pycparser
npm             |         Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
npm             |            ??????????????????????????????????????? 118.7/118.7 KB 4.1 MB/s eta 0:00:00
npm             |       Collecting typing-extensions>=3.7.4.3
npm             |         Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
npm             |       Collecting semantic-version<3,>=2.8.2
npm             |         Downloading semantic_version-2.9.0-py2.py3-none-any.whl (15 kB)
npm             |       Building wheels for collected packages: cffi
npm             |         Building wheel for cffi (setup.py): started
npm             |         Building wheel for cffi (setup.py): finished with status 'error'
npm             |         error: subprocess-exited-with-error
npm             |
npm             |         ? python setup.py bdist_wheel did not run successfully.
npm             |         ? exit code: 1
npm             |         ??> [36 lines of output]
npm             |             running bdist_wheel
npm             |             running build
npm             |             running build_py
npm             |             creating build
npm             |             creating build/lib.linux-armv7l-3.7
npm             |             creating build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             running build_ext
npm             |             building '_cffi_backend' extension
npm             |             creating build/temp.linux-armv7l-3.7
npm             |             creating build/temp.linux-armv7l-3.7/c
npm             |             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 -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
npm             |             c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
npm             |              #include <Python.h>
npm             |                       ^~~~~~~~~~
npm             |             compilation terminated.
npm             |             error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
npm             |             [end of output]
npm             |
npm             |         note: This error originates from a subprocess, and is likely not a problem with pip.
npm             |         ERROR: Failed building wheel for cffi
npm             |         Running setup.py clean for cffi
npm             |       Failed to build cffi
npm             |       Installing collected packages: wheel, typing-extensions, setuptools, semantic-version, pycparser, setuptools-rust, cffi
npm             |         Running setup.py install for cffi: started
npm             |         Running setup.py install for cffi: finished with status 'error'
npm             |         error: subprocess-exited-with-error
npm             |
npm             |         ? Running setup.py install for cffi did not run successfully.
npm             |         ? exit code: 1
npm             |         ??> [36 lines of output]
npm             |             running install
npm             |             running build
npm             |             running build_py
npm             |             creating build
npm             |             creating build/lib.linux-armv7l-3.7
npm             |             creating build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
npm             |             running build_ext
npm             |             building '_cffi_backend' extension
npm             |             creating build/temp.linux-armv7l-3.7
npm             |             creating build/temp.linux-armv7l-3.7/c
npm             |             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 -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
npm             |             c/_cffi_backend.c:2:10: fatal error: Python.h: No such file or directory
npm             |              #include <Python.h>

npm             |                       ^~~~~~~~~~
npm             |             compilation terminated.
npm             |             error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
npm             |             [end of output]
npm             |
npm             |         note: This error originates from a subprocess, and is likely not a problem with pip.
npm             |       error: legacy-install-failure
npm             |
npm             |       ? Encountered error while trying to install package.
npm             |       ??> cffi
npm             |
npm             |       note: This is an issue with the package mentioned above, not pip.
npm             |       hint: See above for output from the failure.
npm             |       [end of output]
npm             |
npm             |   note: This error originates from a subprocess, and is likely not a problem with pip.
npm             | error: subprocess-exited-with-error
npm             |
npm             | ? pip subprocess to install build dependencies did not run successfully.
npm             | ? exit code: 1
npm             | ??> See above for output.
npm             |
npm             | note: This error originates from a subprocess, and is likely not a problem with pip.

Is there anything I could try to help debug this?

mala-cimbra commented 2 years ago

I've found that the problem lies in the python cryptography library. There is not a compiled version for armv7l as stated here. In the end, I've found a solution here by compiling the library inside the container. Another solution, but I haven't tested it yet, is installing the certbot dns plugin from piwheels. In my case:

pip3 install certbot-dns-duckdns --index-url https://www.piwheels.org/simple --prefer-binary
Europa2010AD commented 2 years ago

Just want to confirm that this problem persists in NPM 2.9.18. Running on latest official MariaDB.

cmj2002 commented 2 years ago

This problem persists in NPM 2.9.18 with SQLite. I connected to the NPM via port 81 to disable and then re-enable the proxy for NPM, then the problem was solved.

pinpspinps commented 2 years ago

Hi, I confirm that @iomataani solution works at first but does not work anymore after restarting the container. I also confirm that this problem persists in version 2.9.18.

cmj2002 commented 2 years ago

Hi, I confirm that @iomataani solution works at first but does not work anymore after restarting the container. I also confirm that this problem persists in version 2.9.18.

@pinpspinps This is not surprising, because after the docker is recreated, all changes will disappear unless it's in a mounted volume.

I have not tried the solution yet, but if it works for you, maybe you can rewrite the Dockerfile before any release that fix the problem.

pinpspinps commented 2 years ago

Is it not possible to integrate this change in the official branch?

NSerbin commented 2 years ago

any news ?

X4V1 commented 2 years ago

Still no news ?

jc21 commented 2 years ago

For anyone having this problem with the cloudflare plugin, please try the github-develop docker tag. For anyone else, please try running this command, with your problem plugin and let me know if it works, then I can add some exceptions.

docker exec -ti name_of_your_npm_container bash
pip install cerbot_plugin_name --index-url https://www.piwheels.org/simple --prefer-binary
HaoSs07 commented 2 years ago

So far all good, login works, nu Cloudflare errors.

NSerbin commented 1 year ago

docker exec -ti name_of_your_npm_container bash pip install cerbot_plugin_name --index-url https://www.piwheels.org/simple --prefer-binary

It worked for me... for cloudflare-dns the cmd is: pip install certbot-dns-cloudflare --index-url https://www.piwheels.org/simple --prefer-binary

tmullin commented 1 year ago

For anyone having this problem with the cloudflare plugin, please try the github-develop docker tag. For anyone else, please try running this command, with your problem plugin and let me know if it works, then I can add some exceptions.

docker exec -ti name_of_your_npm_container bash
pip install cerbot_plugin_name --index-url https://www.piwheels.org/simple --prefer-binary

Worked flawlessly for me after running this for Namecheap: pip install certbot-dns-namecheap --index-url https://www.piwheels.org/simple --prefer-binary

I just set up NPM fresh today with minimal configuration (i.e. SQLite) and am on version 2.9.19.

BartAgterbosch commented 1 year ago

Still not working to this day.... Getting a bad gateway message on the latest version still, the only thing that works is downgrading to 2.10.0 or lower, with all the possible vulnerabilities that are included....

HaoSs07 commented 1 year ago

check logs. latest versions work fine for me

BartAgterbosch commented 1 year ago

error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_CANT_CREATE_TABLE: Can't create table npm.migrations (errno: 13 "Permission denied")

That is what seems to coincide with "Bad gateway" when I try to log in

HaoSs07 commented 1 year ago

try restarting the DB

BartAgterbosch commented 1 year ago

Tried that many many times, but on the latest it doesn't do anything, not sure from which version exactly that started and I used to have it set to always pull the latest, I can restart the db as many times as I want but the only thing that works is downgrading to 2.10.0.. From what I can see the db container is throwing a connection error: [Warning] Aborted connection 3 to db: 'name' user: 'user' host: '172.18.0.2' (Got an error reading communication packets) I changed the db name and username in in the error to something else btw, they are in fact correct, the error also only ever happens when on the latest version, not on 2.10.0, also, the db is also set to retrieve the latest image, so the latest db and the 2.10.0 nginx works fine together, but latest db and latest nginx apparently does not, at least not in my case, restarting the db image doesn't work

HaoSs07 commented 1 year ago

yah, this is new, my proxys work fine, can login in the manager and all the normal things but the log is throwing related error ( mine is on migration_lock): [6/10/2023] [2:59:31 PM] [Global ] › ✖ error create table migrations_lock (index int unsigned not null auto_increment primary key, is_locked int) - ER_CANT_CREATE_TABLE: Can't create table DBNAME.migrations_lock (errno: 13 "Permission denied")

BartAgterbosch commented 1 year ago

Hm, then it sounds like I'm looking at the wrong error, but it seems to be the only error message in the entire log..

bencollinz commented 1 year ago

error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_CANT_CREATE_TABLE: Can't create table npm.migrations (errno: 13 "Permission denied")

That is what seems to coincide with "Bad gateway" when I try to log in

This is the same problem with mine, continually. And same as you, have to downgrade/revert to get it working again. 2.9.18 is the last version that works for me.

HaoSs07 commented 1 year ago

Fixed it, just added PUID: 1000 PGID: 1000 the id of my user to my environment: variables in the compose file. now it won't trow DB errors, ( function was added in 2.10 )

bencollinz commented 1 year ago

Fixed it, just added PUID: 1000 PGID: 1000 the id of my user to my environment: variables in the compose file. now it won't trow DB errors, ( function was added in 2.10 )

on 2.10.3 this did not work for me. this is PUID: npm:x:1000:1000::/tmp/npmuserhome:/bin/false and still getting

[Global ] › ✖ error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_CANT_CREATE_TABLE: Can't create table JIMM.migrations (errno: 13 "Permission denied")

tr7zw commented 10 months ago

Still an issue with v2.11.0 and SQLite file.

[Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[Migrate  ] › ℹ  info      Current database version: none

Downgrading to 2.10.0 did the trick for now.

JimJafar commented 10 months ago

I've just come here with the same issue, also on v2.11.0 and using SQLite. I'm considering switching to MariaDB but I love the easy backup of a static file database. I'm using the PUID and PGID environment variables.

I can confirm that downgrading to v2.10.0 allowed me to login again. Obviously that's not ideal, but at least it gets you back up and running.

github-actions[bot] commented 3 months ago

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