NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.29k stars 2.58k 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

kjw1985 commented 2 years ago

Can confirm, update from 2.9.9 to 2.9.15 can't login. Downgraded to 2.9.14 and could login again.

jc21 commented 2 years ago

I can't confirm. I went from 2.9.14 to 2.9.15 in my production environments just fine.

The current database version should not be none. What database are you using, mysql/maria or sqlite?

jiriteach commented 2 years ago

Using SQLLite

jc21 commented 2 years ago

Just tested on a sqlite setup, also don't have a problem logging in.

[1/17/2022] [8:23:24 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
[1/17/2022] [8:23:26 AM] [Migrate  ] › ℹ  info      Current database version: none
[1/17/2022] [8:23:26 AM] [Setup    ] › ℹ  info      Logrotate Timer initialized
[1/17/2022] [8:23:26 AM] [Setup    ] › ℹ  info      Logrotate completed.
[1/17/2022] [8:23:26 AM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
[1/17/2022] [8:23:26 AM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[1/17/2022] [8:23:26 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
[1/17/2022] [8:23:26 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6
[1/17/2022] [8:23:27 AM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized
[1/17/2022] [8:23:27 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[1/17/2022] [8:23:27 AM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized
[1/17/2022] [8:23:27 AM] [Global   ] › ℹ  info      Backend PID 243 listening on port 3000 ...
[1/17/2022] [8:23:29 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[1/17/2022] [8:23:29 AM] [SSL      ] › ℹ  info      Renew Complete
jc21 commented 2 years ago

and yes I realise the database version is also none there...

kjw1985 commented 2 years ago

I'm using jc21/mariadb-aria:10.4.15 as my database.

Hereby part of my logging:

[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01_perms.sh: executing... ,
Changing ownership of /data/logs to 0:0,
[cont-init.d] 01_perms.sh: exited 0.,
[cont-init.d] 01_s6-secret-init.sh: executing... ,
[cont-init.d] 01_s6-secret-init.sh: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d,
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf,
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf,
  ❯ /etc/nginx/conf.d/include/assets.conf,
  ❯ /etc/nginx/conf.d/include/force-ssl.conf,
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf,
  ❯ /etc/nginx/conf.d/include/block-exploits.conf,
  ❯ /etc/nginx/conf.d/include/proxy.conf,
  ❯ /etc/nginx/conf.d/include/resolvers.conf,
  ❯ /etc/nginx/conf.d/production.conf,
  ❯ /etc/nginx/conf.d/default.conf,
❯ Enabling IPV6 in hosts: /data/nginx,
  ❯ /data/nginx/proxy_host/35.conf,
  ❯ /data/nginx/proxy_host/33.conf,
  ❯ /data/nginx/proxy_host/14.conf,
  ❯ /data/nginx/proxy_host/38.conf,
  ❯ /data/nginx/proxy_host/26.conf,
  ❯ /data/nginx/proxy_host/17.conf,
  ❯ /data/nginx/proxy_host/20.conf,
  ❯ /data/nginx/proxy_host/5.conf,
  ❯ /data/nginx/proxy_host/13.conf,
  ❯ /data/nginx/proxy_host/37.conf,
  ❯ /data/nginx/proxy_host/6.conf,
  ❯ /data/nginx/proxy_host/21.conf,
  ❯ /data/nginx/proxy_host/10.conf,
  ❯ /data/nginx/proxy_host/9.conf,
  ❯ /data/nginx/proxy_host/34.conf,
  ❯ /data/nginx/proxy_host/39.conf,
  ❯ /data/nginx/proxy_host/11.conf,
  ❯ /data/nginx/proxy_host/40.conf,
  ❯ /data/nginx/proxy_host/32.conf,
  ❯ /data/nginx/proxy_host/30.conf,
  ❯ /data/nginx/proxy_host/36.conf,
  ❯ /data/nginx/proxy_host/7.conf,
  ❯ /data/nginx/proxy_host/43.conf,
  ❯ /data/nginx/proxy_host/44.conf,
  ❯ /data/nginx/proxy_host/18.conf,
[1/17/2022] [9:29:14 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
  ❯ /data/nginx/proxy_host/41.conf,
  ❯ /data/nginx/default_host/site.conf,
[1/17/2022] [9:29:15 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,
[1/17/2022] [9:29:18 AM] [Global   ] › ✖  error     Command failed: pip install certbot-dns-transip~=0.3.3 ,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-umczna8j,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/d0/88/f3bed9b494e0dae26bd55e5f3d527b8244208125024727267e8109956a11/suds-jurko-0.6.zip#sha256=1cb7252cb13018fc32887c3a834ed7c6648a5b5c4c159be5806da2e1785399e8 (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7o0fov4n,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/bd/6f/54fbf0999a606680d27c69b1ad12dfff62768ecb9fe48524cebda6eb4423/suds-jurko-0.6.tar.bz2#sha256=29edb72fd21e3044093d86f33c66cf847c5aaab26d64cb90e69e528ef014e57f (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
ERROR: Could not find a version that satisfies the requirement suds-jurko~=0.6 (from certbot-dns-transip) (from versions: 0.4.1.jurko.1, 0.4.1.jurko.2, 0.4.1.jurko.3, 0.4.1.jurko.4, 0.4.1.jurko.5, 0.5, 0.6),
ERROR: No matching distribution found for suds-jurko~=0.6,
,
[1/17/2022] [9:29:19 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
[1/17/2022] [9:29:19 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,
jiriteach commented 2 years ago

Will try again now and see what happens ...

jiriteach commented 2 years ago

No go again -

docker-compose down
docker-compose pull
docker-compose up -d

Standard way i've been upgrading for a long while now.

Docker log -

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_perms.sh: executing... 
Changing ownership of /data/logs to 0:0
[cont-init.d] 01_perms.sh: exited 0.
[cont-init.d] 01_s6-secret-init.sh: executing... 
[cont-init.d] 01_s6-secret-init.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
  ❯ /etc/nginx/conf.d/default.conf
  ❯ /etc/nginx/conf.d/production.conf
  ❯ /etc/nginx/conf.d/include/block-exploits.conf
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
  ❯ /etc/nginx/conf.d/include/force-ssl.conf
  ❯ /etc/nginx/conf.d/include/assets.conf
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
  ❯ /etc/nginx/conf.d/include/proxy.conf
  ❯ /etc/nginx/conf.d/include/resolvers.conf
❯ Enabling IPV6 in hosts: /data/nginx
  ❯ /data/nginx/default_host/site.conf
  ❯ /data/nginx/redirection_host/1.conf
  ❯ /data/nginx/redirection_host/5.conf
  ❯ /data/nginx/redirection_host/4.conf
  ❯ /data/nginx/dead_host/2.conf
  ❯ /data/nginx/dead_host/3.conf
  ❯ /data/nginx/dead_host/6.conf
  ❯ /data/nginx/proxy_host/2.conf
  ❯ /data/nginx/proxy_host/3.conf
  ❯ /data/nginx/proxy_host/19.conf
  ❯ /data/nginx/proxy_host/1.conf
  ❯ /data/nginx/proxy_host/14.conf
  ❯ /data/nginx/proxy_host/5.conf
  ❯ /data/nginx/proxy_host/6.conf
  ❯ /data/nginx/proxy_host/16.conf
  ❯ /data/nginx/proxy_host/9.conf
  ❯ /data/nginx/proxy_host/17.conf
  ❯ /data/nginx/proxy_host/7.conf
  ❯ /data/nginx/proxy_host/4.conf
  ❯ /data/nginx/proxy_host/10.conf
  ❯ /data/nginx/proxy_host/8.conf
  ❯ /data/nginx/proxy_host/15.conf
  ❯ /data/nginx/stream/2.conf
  ❯ /data/nginx/stream/1.conf
[1/17/2022] [9:38:59 AM] [Global   ] › ℹ  info.   Manual db configuration already exists, skipping config creation from environment variables
[1/17/2022] [9:39:01 AM] [Migrate  ] › ℹ  info.   Current database version: none

Trying to log into admin - i'm seeing 502's in Chromes console. Existing rules are process OK through as all my checks are running.

My docker-compose.yml

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    #image: 'jc21/nginx-proxy-manager:2.9.14'    
    restart: always
    network_mode: host
    #ports:
    #  - '80:80'
    #  - '81:81'
    #  - '443:443'
    environment:
      DB_SQLITE_FILE: "/data/npm_database.sqlite"
    volumes:
      - /home/pi/Docker/npm/data:/data
      - /home/pi/Docker/npm/letsencrypt:/etc/letsencrypt
      - /home/pi/Docker/npm/config/db_configuration.json:/app/config/production.json

Reverting back to 2.9.14 and all working fine again.

jiriteach commented 2 years ago

Found updated logs with errors -

    Using cached pycparser-2.21-py2.py3-none-any.whl (118 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: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7gdh7ak6
         cwd: /tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/
    Complete output (35 lines):
    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
    creating build/temp.linux-armv7l-3.7
    creating build/temp.linux-armv7l-3.7/c
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -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 '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
    ----------------------------------------
    ERROR: Failed building wheel for cffi
    Running setup.py clean for cffi
    Failed to build cffi
    Installing collected packages: pycparser, wheel, setuptools, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mt9n2ci2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-wzdqzjma/overlay --compile --install-headers /tmp/pip-build-env-wzdqzjma/overlay/include/python3.7m/cffi
           cwd: /tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/
      Complete output (37 lines):
      running install
      /usr/local/lib/python3.7/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      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
      creating build/temp.linux-armv7l-3.7
      creating build/temp.linux-armv7l-3.7/c
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -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 '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      ----------------------------------------
      ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s9qk0060/cffi_37bc9a636f714c0490954d9e204ef3ed/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mt9n2ci2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-wzdqzjma/overlay --compile --install-headers /tmp/pip-build-env-wzdqzjma/overlay/include/python3.7m/cffi Check the logs for full command output.
      ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/69/ed/5e97b7f54237a9e4e6291b6e52173372b7fa45ca730d36ea90b790c0059a/cryptography-2.5.tar.gz#sha256=4946b67235b9d2ea7d31307be9d5ad5959d6c4a8f98f900157b47abddf698401 (from https://pypi.org/simple/cryptography/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: /usr/bin/python3 /tmp/pip-standalone-pip-hr7si0sj/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wzdqzjma/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=18.5' wheel 'cffi>=1.8,!=1.11.3; python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement cryptography>=2.5.0 (from acme) (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.3, 0.4, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.9, 0.9.1, 0.9.2, 0.9.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.7, 1.7.1, 1.7.2, 1.8, 1.8.1, 1.8.2, 1.9, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2, 2.2.1, 2.2.2, 2.3, 2.3.1, 2.4, 2.4.1, 2.4.2, 2.5, 2.6, 2.6.1, 2.7, 2.8, 2.9, 2.9.1, 2.9.2, 3.0, 3.1, 3.1.1, 3.2, 3.2.1, 3.3, 3.3.1, 3.3.2, 3.4, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 35.0.0, 36.0.0, 36.0.1)
ERROR: No matching distribution found for cryptography>=2.5.0

[1/17/2022] [9:49:53 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
[1/17/2022] [9:49:53 AM] [Migrate  ] › ℹ  info      Current database version: none
Manuel5cc commented 2 years ago

I'm using jc21/mariadb-aria:10.4.15 as my database.

Hereby part of my logging:

[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01_perms.sh: executing... ,
Changing ownership of /data/logs to 0:0,
[cont-init.d] 01_perms.sh: exited 0.,
[cont-init.d] 01_s6-secret-init.sh: executing... ,
[cont-init.d] 01_s6-secret-init.sh: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d,
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf,
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf,
  ❯ /etc/nginx/conf.d/include/assets.conf,
  ❯ /etc/nginx/conf.d/include/force-ssl.conf,
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf,
  ❯ /etc/nginx/conf.d/include/block-exploits.conf,
  ❯ /etc/nginx/conf.d/include/proxy.conf,
  ❯ /etc/nginx/conf.d/include/resolvers.conf,
  ❯ /etc/nginx/conf.d/production.conf,
  ❯ /etc/nginx/conf.d/default.conf,
❯ Enabling IPV6 in hosts: /data/nginx,
  ❯ /data/nginx/proxy_host/35.conf,
  ❯ /data/nginx/proxy_host/33.conf,
  ❯ /data/nginx/proxy_host/14.conf,
  ❯ /data/nginx/proxy_host/38.conf,
  ❯ /data/nginx/proxy_host/26.conf,
  ❯ /data/nginx/proxy_host/17.conf,
  ❯ /data/nginx/proxy_host/20.conf,
  ❯ /data/nginx/proxy_host/5.conf,
  ❯ /data/nginx/proxy_host/13.conf,
  ❯ /data/nginx/proxy_host/37.conf,
  ❯ /data/nginx/proxy_host/6.conf,
  ❯ /data/nginx/proxy_host/21.conf,
  ❯ /data/nginx/proxy_host/10.conf,
  ❯ /data/nginx/proxy_host/9.conf,
  ❯ /data/nginx/proxy_host/34.conf,
  ❯ /data/nginx/proxy_host/39.conf,
  ❯ /data/nginx/proxy_host/11.conf,
  ❯ /data/nginx/proxy_host/40.conf,
  ❯ /data/nginx/proxy_host/32.conf,
  ❯ /data/nginx/proxy_host/30.conf,
  ❯ /data/nginx/proxy_host/36.conf,
  ❯ /data/nginx/proxy_host/7.conf,
  ❯ /data/nginx/proxy_host/43.conf,
  ❯ /data/nginx/proxy_host/44.conf,
  ❯ /data/nginx/proxy_host/18.conf,
[1/17/2022] [9:29:14 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
  ❯ /data/nginx/proxy_host/41.conf,
  ❯ /data/nginx/default_host/site.conf,
[1/17/2022] [9:29:15 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,
[1/17/2022] [9:29:18 AM] [Global   ] › ✖  error     Command failed: pip install certbot-dns-transip~=0.3.3 ,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-umczna8j,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/d0/88/f3bed9b494e0dae26bd55e5f3d527b8244208125024727267e8109956a11/suds-jurko-0.6.zip#sha256=1cb7252cb13018fc32887c3a834ed7c6648a5b5c4c159be5806da2e1785399e8 (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7o0fov4n,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/bd/6f/54fbf0999a606680d27c69b1ad12dfff62768ecb9fe48524cebda6eb4423/suds-jurko-0.6.tar.bz2#sha256=29edb72fd21e3044093d86f33c66cf847c5aaab26d64cb90e69e528ef014e57f (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
ERROR: Could not find a version that satisfies the requirement suds-jurko~=0.6 (from certbot-dns-transip) (from versions: 0.4.1.jurko.1, 0.4.1.jurko.2, 0.4.1.jurko.3, 0.4.1.jurko.4, 0.4.1.jurko.5, 0.5, 0.6),
ERROR: No matching distribution found for suds-jurko~=0.6,
,
[1/17/2022] [9:29:19 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
[1/17/2022] [9:29:19 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,

Same issue here. I'm using Mariadb as my database with the latest version from jc21's docker container. The upgrade seems to have created a loop that is generating high load on my server.

jc21 commented 2 years ago

So the issue is setuptools, version 60 is causing problems whereas version 58 is fine with the certbot plugins you're using. I'll get a new version out soon

Manuel5cc commented 2 years ago

I'm using jc21/mariadb-aria:10.4.15 as my database. Hereby part of my logging:

[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01_perms.sh: executing... ,
Changing ownership of /data/logs to 0:0,
[cont-init.d] 01_perms.sh: exited 0.,
[cont-init.d] 01_s6-secret-init.sh: executing... ,
[cont-init.d] 01_s6-secret-init.sh: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d,
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf,
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf,
  ❯ /etc/nginx/conf.d/include/assets.conf,
  ❯ /etc/nginx/conf.d/include/force-ssl.conf,
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf,
  ❯ /etc/nginx/conf.d/include/block-exploits.conf,
  ❯ /etc/nginx/conf.d/include/proxy.conf,
  ❯ /etc/nginx/conf.d/include/resolvers.conf,
  ❯ /etc/nginx/conf.d/production.conf,
  ❯ /etc/nginx/conf.d/default.conf,
❯ Enabling IPV6 in hosts: /data/nginx,
  ❯ /data/nginx/proxy_host/35.conf,
  ❯ /data/nginx/proxy_host/33.conf,
  ❯ /data/nginx/proxy_host/14.conf,
  ❯ /data/nginx/proxy_host/38.conf,
  ❯ /data/nginx/proxy_host/26.conf,
  ❯ /data/nginx/proxy_host/17.conf,
  ❯ /data/nginx/proxy_host/20.conf,
  ❯ /data/nginx/proxy_host/5.conf,
  ❯ /data/nginx/proxy_host/13.conf,
  ❯ /data/nginx/proxy_host/37.conf,
  ❯ /data/nginx/proxy_host/6.conf,
  ❯ /data/nginx/proxy_host/21.conf,
  ❯ /data/nginx/proxy_host/10.conf,
  ❯ /data/nginx/proxy_host/9.conf,
  ❯ /data/nginx/proxy_host/34.conf,
  ❯ /data/nginx/proxy_host/39.conf,
  ❯ /data/nginx/proxy_host/11.conf,
  ❯ /data/nginx/proxy_host/40.conf,
  ❯ /data/nginx/proxy_host/32.conf,
  ❯ /data/nginx/proxy_host/30.conf,
  ❯ /data/nginx/proxy_host/36.conf,
  ❯ /data/nginx/proxy_host/7.conf,
  ❯ /data/nginx/proxy_host/43.conf,
  ❯ /data/nginx/proxy_host/44.conf,
  ❯ /data/nginx/proxy_host/18.conf,
[1/17/2022] [9:29:14 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
  ❯ /data/nginx/proxy_host/41.conf,
  ❯ /data/nginx/default_host/site.conf,
[1/17/2022] [9:29:15 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,
[1/17/2022] [9:29:18 AM] [Global   ] › ✖  error     Command failed: pip install certbot-dns-transip~=0.3.3 ,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-umczna8j,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_287474b5f40d41ad95e9d7b108335533/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/d0/88/f3bed9b494e0dae26bd55e5f3d527b8244208125024727267e8109956a11/suds-jurko-0.6.zip#sha256=1cb7252cb13018fc32887c3a834ed7c6648a5b5c4c159be5806da2e1785399e8 (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
  ERROR: Command errored out with exit status 1:,
   command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7o0fov4n,
       cwd: /tmp/pip-install-uk4gd6as/suds-jurko_685079b4ab0a4855a6fd6ac60e69a589/,
  Complete output (1 lines):,
  error in suds-jurko setup command: use_2to3 is invalid.,
  ----------------------------------------,
WARNING: Discarding https://files.pythonhosted.org/packages/bd/6f/54fbf0999a606680d27c69b1ad12dfff62768ecb9fe48524cebda6eb4423/suds-jurko-0.6.tar.bz2#sha256=29edb72fd21e3044093d86f33c66cf847c5aaab26d64cb90e69e528ef014e57f (from https://pypi.org/simple/suds-jurko/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.,
ERROR: Could not find a version that satisfies the requirement suds-jurko~=0.6 (from certbot-dns-transip) (from versions: 0.4.1.jurko.1, 0.4.1.jurko.2, 0.4.1.jurko.3, 0.4.1.jurko.4, 0.4.1.jurko.5, 0.5, 0.6),
ERROR: No matching distribution found for suds-jurko~=0.6,
,
[1/17/2022] [9:29:19 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables,
[1/17/2022] [9:29:19 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,

Same issue here. I'm using Mariadb as my database with the latest version from jc21's docker container. The upgrade seems to have created a loop that is generating high load on my server.

In my case, downgrading (tried 2 or 3 releases behind) didn't fix the issue, as now it's stuck at this step: [1/17/2022] [11:44:48 AM] [Setup ] › ℹ info Wrote JWT key pair to config file: /app/config/production.json and still cannot login.

jc21 commented 2 years ago

Please try with the github-develop docker tag and let me know how you go

Manuel5cc commented 2 years ago

Please try with the github-develop docker tag and let me know how you go

Using the develop branch gives me a migration error in the database. [1/17/2022] [12:29:57 PM] [Global ] › ✖ error The migration directory is corrupt, the following files are missing: 20211010141200_ssl_passthrough_host.js [1/17/2022] [12:29:57 PM] [Migrate ] › ℹ info Current database version: 20211108145214

I think going back and forward messed up something.

ACodingGenie commented 2 years ago

I was facing this logging in issue last night too but rebuilding both MariaDB and Nginx Proxy Manager containers solved it. Can't speak for anyone else using other types of DBs though. I will update here if things so south again.

NPM Version: v2.9.15 MariaDB Version: Version: '10.4.15-MariaDB'

jc21 commented 2 years ago

@Manuel5cc it looks like you've used a docker image tag from a PR that has not been merged, and that included a database migration. You will have to revert that migration.

this is MySQL specific:

drop table ssl_passthrough_host;
alter table user_permission drop column ssl_passthrough_hosts;
alter table user_permission add unique (user_id); 
delete from migrations where name = "20211010141200_ssl_passthrough_host.js";

but make sure you backup your MySQL data first, and next time you use a PR image backup everything beforehand and revert immediately after testing it.

jiriteach commented 2 years ago

Please try with the github-develop docker tag and let me know how you go

@jc21 - Wasn't sure if this was to everyone, but I tried this and no difference. Same as before - cannot log in and same errors. Reverted back to 2.9.14.

kjw1985 commented 2 years ago

Tested the github-develop version. I'm able to login. But I'm not really sure if the error in the log below should be expected.

''' [1/18/2022] [6:29:50 AM] [Global ] › ℹ info Manual db configuration already exists, skipping config creation from environment variables, [1/18/2022] [6:30:04 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4, [1/18/2022] [6:30:04 AM] [Setup ] › ℹ info Added Certbot plugins certbot-dns-transip~=0.3.3 , [1/18/2022] [6:29:51 AM] [Migrate ] › ℹ info Current database version: 20211108145214, [1/18/2022] [6:30:04 AM] [Setup ] › ℹ info Logrotate Timer initialized, [1/18/2022] [6:30:04 AM] [IP Ranges] › ℹ info Fetching IP Ranges from online services..., [1/18/2022] [6:30:04 AM] [Setup ] › ℹ info Logrotate completed., [1/18/2022] [6:30:04 AM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json, [1/18/2022] [6:30:04 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6, [1/18/2022] [6:30:05 AM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized, [1/18/2022] [6:30:05 AM] [SSL ] › ℹ info Renewing SSL certs close to expiry..., [1/18/2022] [6:30:05 AM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized, [1/18/2022] [6:30:05 AM] [SSL ] › ✖ error Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation , [1/18/2022] [6:30:05 AM] [Global ] › ℹ info Backend PID 244 listening on port 3000 ..., An unexpected error occurred:, ModuleNotFoundError: No module named 'version', at ChildProcess.exithandler (node:child_process:397:12), at ChildProcess.emit (node:events:390:28), at maybeClose (node:internal/child_process:1064:16), at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5), QueryBuilder#allowEager method is deprecated. You should use allowGraph instead. allowEager method will be removed in 3.0, QueryBuilder#eager method is deprecated. You should use the withGraphFetched method instead. eager method will be removed in 3.0, QueryBuilder#omit is deprecated. This method will be removed in version 3.0, Model#$omit is deprected and will be removed in 3.0., '''

Manuel5cc commented 2 years ago

I finally decided to rebuild the container from zero using SQLITE instead of Mariadb and it seems to be working, however I haven't been able to generate wildcard certificates due to timeouts (no errors are shown in logs).

jgunsing commented 2 years ago

Can confirm that the tag github-develop solved the issue

jc21 commented 2 years ago

It appears that the certbot-dns-transip plugin is installing v0.3.3 and the No module named 'version' error seems to indicate that it's only written for python 2, not 3 as we've been using. The latest version is 0.4.3, hopefully that works.

I've created #1773 to bump the version, but I am entirely unable to test it. Keep an eye on that PR for instructions to use the built docker image once it passes CI, and let me know how you go.

jiriteach commented 2 years ago

@jc21 - Doesn't look to have fixed the issue with 2.9.15. Tried this PR and same as before. Not much in the logs -

[1/19/2022] [12:02:28 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
[1/19/2022] [12:02:30 AM] [Migrate  ] › ℹ  info      Current database version: none
kjw1985 commented 2 years ago

@jc21 Tested jc21/nginx-proxy-manager:github-pr-1773, no errors anymore and able to login. Haven't tested if the certbot-dns-transip is working correctly within this image, as I'm not using it (yet) in the container. I know that certbot-dns-transip 0.4.3 should be able to get wildcard certificate as I've used this in another container recently.

See output logs:


[1/20/2022] [11:31:48 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214,
[1/20/2022] [11:31:56 AM] [Setup    ] › ℹ  info      Added Certbot plugins certbot-dns-transip~=0.4.3 ,
[1/20/2022] [11:31:56 AM] [Setup    ] › ℹ  info      Logrotate Timer initialized,
[1/20/2022] [11:31:56 AM] [Setup    ] › ℹ  info      Logrotate completed.,
[1/20/2022] [11:31:56 AM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...,
[1/20/2022] [11:31:56 AM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json,
[1/20/2022] [11:31:57 AM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized,
[1/20/2022] [11:31:56 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6,
[1/20/2022] [11:31:56 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4,
[1/20/2022] [11:31:57 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...,
[1/20/2022] [11:31:57 AM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized,
[1/20/2022] [11:31:57 AM] [Global   ] › ℹ  info      Backend PID 238 listening on port 3000 ...
jiriteach commented 2 years ago

@jc21 - Any further ideas on what I can do to upgrade? Rolled back so using 2.9.14 ok. Thanks

X4V1 commented 2 years ago

I'm also having the login issue with the version 2.9.15. Working fine on 2.9.14. In my case I have a database version in my logs but later there are multiple errors. I don't know what it the root cause so I added a link to my logs in case it could help. There is also a certbot issue (Command failed: pip install certbot-dns-ovh==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')) and a python error linked to cryptography-36.0.1.tar.gz. And also, thank you very much for the great work !

D1no commented 2 years ago

For all the noobs like me who basically catched the wrong timing on trying portainer, docker-compose and nginx-proxy-manager — here a docker compose file that works.

Because the bad gateway issue can come up

😵‍💫

So this uses the previous version that works 2.9.14 and routes the port correctly within docker compose by connecting to the db-container.

version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.14'
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
      - '81:81' # Admin Web Port
      # Add any other Stream port you want to expose
      # - '21:21' # FTP
    environment:
      DB_MYSQL_HOST: 'db'
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: 'npm'
      DB_MYSQL_PASSWORD: 'npm'
      DB_MYSQL_NAME: 'npm'
      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db

  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

In Portainer: Go to Stack -> Add Stack -> Copy paste above and hit deploy.

CharlPels commented 2 years ago

The transip plugin need to be upgraded to use rest api instead off soap

kt-solutions commented 2 years ago

For me it worked to have this db-image instead of the latest:

jc21/mariadb-aria:10.4.15-innodb

jiriteach commented 2 years ago

I'm using a SQLLite db so still no solution.

kevin-wynn commented 2 years ago

I too am getting this error now. From upgrading from 2.9.5 to latest, running on a pi3 it seems to no longer allow me to log into admin. I get the same looking logs as @Jiriteach throwing errors looking for Python.h. These are my logs:

Installing collected packages: pycparser, wheel, setuptools, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-htnwgplk/cffi_13957fe007254a8f9649c7db4d51ed37/setup.py'"'"'; __file__='"'"'/tmp/pip-install-htnwgplk/cffi_13957fe007254a8f9649c7db4d51ed37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-w1n1_zlz/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-14ckdhvg/overlay --compile --install-headers /tmp/pip-build-env-14ckdhvg/overlay/include/python3.7m/cffi
           cwd: /tmp/pip-install-htnwgplk/cffi_13957fe007254a8f9649c7db4d51ed37/
      Complete output (37 lines):
      running install
      /usr/local/lib/python3.7/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-armv7l-3.7
      creating build/lib.linux-armv7l-3.7/cffi
      copying cffi/setuptools_ext.py -> 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/model.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/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
      copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
      copying cffi/api.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/cparser.py -> build/lib.linux-armv7l-3.7/cffi
      copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
      copying cffi/ffiplatform.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
      creating build/temp.linux-armv7l-3.7
      creating build/temp.linux-armv7l-3.7/c
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -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 '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-htnwgplk/cffi_13957fe007254a8f9649c7db4d51ed37/setup.py'"'"'; __file__='"'"'/tmp/pip-install-htnwgplk/cffi_13957fe007254a8f9649c7db4d51ed37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-w1n1_zlz/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-14ckdhvg/overlay --compile --install-headers /tmp/pip-build-env-14ckdhvg/overlay/include/python3.7m/cffi Check the logs for full command output.
  WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
  You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/69/ed/5e97b7f54237a9e4e6291b6e52173372b7fa45ca730d36ea90b790c0059a/cryptography-2.5.tar.gz#sha256=4946b67235b9d2ea7d31307be9d5ad5959d6c4a8f98f900157b47abddf698401 (from https://pypi.org/simple/cryptography/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: /usr/bin/python3 /tmp/pip-standalone-pip-swoc40_o/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-14ckdhvg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=18.5' wheel 'cffi>=1.8,!=1.11.3; python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
ERROR: Cannot install certbot-dns-cloudflare because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

[2/16/2022] [8:38:43 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
[2/16/2022] [8:38:43 PM] [Setup    ] › ℹ  info      Creating a new JWT key pair...
[2/16/2022] [8:39:12 PM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /app/config/production.json
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_perms.sh: executing... 
Changing ownership of /data/logs to 0:0
[cont-init.d] 01_perms.sh: exited 0.
[cont-init.d] 01_s6-secret-init.sh: executing... 
[cont-init.d] 01_s6-secret-init.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
  ❯ /etc/nginx/conf.d/production.conf
  ❯ /etc/nginx/conf.d/default.conf
  ❯ /etc/nginx/conf.d/include/assets.conf
  ❯ /etc/nginx/conf.d/include/ip_ranges.conf
  ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
  ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
  ❯ /etc/nginx/conf.d/include/proxy.conf
  ❯ /etc/nginx/conf.d/include/block-exploits.conf
  ❯ /etc/nginx/conf.d/include/force-ssl.conf
  ❯ /etc/nginx/conf.d/include/resolvers.conf
❯ Enabling IPV6 in hosts: /data/nginx
  ❯ /data/nginx/default_host/site.conf
  ❯ /data/nginx/proxy_host/6.conf
  ❯ /data/nginx/proxy_host/3.conf
  ❯ /data/nginx/proxy_host/7.conf
  ❯ /data/nginx/proxy_host/14.conf
  ❯ /data/nginx/proxy_host/5.conf
  ❯ /data/nginx/proxy_host/8.conf
  ❯ /data/nginx/proxy_host/1.conf
  ❯ /data/nginx/proxy_host/11.conf
  ❯ /data/nginx/redirection_host/1.conf
[2/16/2022] [8:46:29 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214

I've tried downgrading to 2.9.14, 2.9.11, 2.9.5, 2.9.4. No luck moving forward with any of these versions now. I'm also using mariadb with mine, I've tried using 10.4.15-innodb version there, latest, etc. Nothing helping so far. NPM is still running smoothly behind the scenes, all my existing proxies and redirects are working as expected. Just unable to log in.

jc21 commented 2 years ago

@kevin-wynn What about the github-develop tag?

kevin-wynn commented 2 years ago

@jc21 tried that one as well, didn't work. I can try it again and see what logs I get there though.

kevin-wynn commented 2 years ago

@jc21 These are my logs using the github-develop tag...

2022-02-16T23:17:50.842327617Z [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2022-02-16T23:17:51.031764151Z [s6-init] ensuring user provided files have correct perms...exited 0.
2022-02-16T23:17:51.035622105Z [fix-attrs.d] applying ownership & permissions fixes...
2022-02-16T23:17:51.043045724Z [fix-attrs.d] done.
2022-02-16T23:17:51.045700037Z [cont-init.d] executing container initialization scripts...
2022-02-16T23:17:51.049350544Z [cont-init.d] 01_perms.sh: executing... 
2022-02-16T23:17:51.214454825Z Changing ownership of /data/logs to 0:0
2022-02-16T23:17:51.236581410Z [cont-init.d] 01_perms.sh: exited 0.
2022-02-16T23:17:51.239033588Z [cont-init.d] 01_s6-secret-init.sh: executing... 
2022-02-16T23:17:51.287376012Z [cont-init.d] 01_s6-secret-init.sh: exited 0.
2022-02-16T23:17:51.289529494Z [cont-init.d] done.
2022-02-16T23:17:51.292159796Z [services.d] starting services
2022-02-16T23:17:51.316935850Z [services.d] done.
2022-02-16T23:17:51.622044454Z ❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
2022-02-16T23:17:51.622365390Z   ❯ /etc/nginx/conf.d/production.conf
2022-02-16T23:17:51.672683797Z   ❯ /etc/nginx/conf.d/default.conf
2022-02-16T23:17:51.684254951Z   ❯ /etc/nginx/conf.d/include/assets.conf
2022-02-16T23:17:51.695189390Z   ❯ /etc/nginx/conf.d/include/ip_ranges.conf
2022-02-16T23:17:51.709968554Z   ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
2022-02-16T23:17:51.723462670Z   ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
2022-02-16T23:17:51.735166324Z   ❯ /etc/nginx/conf.d/include/proxy.conf
2022-02-16T23:17:51.745952690Z   ❯ /etc/nginx/conf.d/include/block-exploits.conf
2022-02-16T23:17:51.762177422Z   ❯ /etc/nginx/conf.d/include/force-ssl.conf
2022-02-16T23:17:51.774368991Z   ❯ /etc/nginx/conf.d/include/resolvers.conf
2022-02-16T23:17:51.812039788Z ❯ Enabling IPV6 in hosts: /data/nginx
2022-02-16T23:17:51.812731348Z   ❯ /data/nginx/default_host/site.conf
2022-02-16T23:17:51.821774283Z   ❯ /data/nginx/proxy_host/6.conf
2022-02-16T23:17:51.830878416Z   ❯ /data/nginx/proxy_host/3.conf
2022-02-16T23:17:51.839905726Z   ❯ /data/nginx/proxy_host/7.conf
2022-02-16T23:17:51.849191160Z   ❯ /data/nginx/proxy_host/14.conf
2022-02-16T23:17:51.858625188Z   ❯ /data/nginx/proxy_host/5.conf
2022-02-16T23:17:51.867556509Z   ❯ /data/nginx/proxy_host/8.conf
2022-02-16T23:17:51.876361268Z   ❯ /data/nginx/proxy_host/1.conf
2022-02-16T23:17:51.885835295Z   ❯ /data/nginx/proxy_host/11.conf
2022-02-16T23:17:51.895023958Z   ❯ /data/nginx/redirection_host/1.conf
2022-02-16T23:17:54.208643732Z [2/16/2022] [11:17:54 PM] [Global   ] › ℹ  info      Generating MySQL knex configuration from environment variables
2022-02-16T23:17:54.225485440Z [2/16/2022] [11:17:54 PM] [Global   ] › ⬤  debug     Wrote db configuration to config file: ./config/production.json
2022-02-16T23:18:00.952940872Z [2/16/2022] [11:18:00 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
2022-02-16T23:18:01.056876684Z [2/16/2022] [11:18:01 PM] [Setup    ] › ℹ  info      Creating a new JWT key pair...
2022-02-16T23:18:29.765201903Z [2/16/2022] [11:18:29 PM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /app/config/production.json

with a docker-compose file like this:

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:github-develop'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql

I get a 502 error when making the login post request to /api/tokens

Also, if any consolation, I've tried letting the app recreate the admin and using the changeme password to no avil as well, this is my mysql table for the users:

MariaDB [npm]> select * from user;
+----+---------------------+---------------------+------------+-------------+----------------------+---------------+----------+-----------------------------------------------------------------------+-----------+
| id | created_on          | modified_on         | is_deleted | is_disabled | email                | name          | nickname | avatar                                                                | roles     |
+----+---------------------+---------------------+------------+-------------+----------------------+---------------+----------+-----------------------------------------------------------------------+-----------+
|  1 | 2021-09-07 14:38:19 | 2021-09-07 14:38:40 |          0 |           0 | kevin@robo-house.com | Kevin Wynn    | Kevin    | //www.gravatar.com/avatar/3460eee8abd99c126e38809d736b6444?default=mm | ["admin"] |
|  2 | 2022-02-16 20:07:48 | 2022-02-16 20:07:48 |          0 |           0 | admin@example.com    | Administrator | Admin    |                                                                       | ["admin"] |
+----+---------------------+---------------------+------------+-------------+----------------------+---------------+----------+-----------------------------------------------------------------------+-----------+
jc21 commented 2 years ago

The 502 should show some kind of error in the docker logs related to that.

kevin-wynn commented 2 years ago

@jc21 whenever I follow the docker logs and try to login all I see populate is

[2/17/2022] [1:00:03 AM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /app/config/production.json

However I'm not certain if that was actually triggered from the 502 error as multiple more attempts to login didn't trigger anything. Since this was JWT token related I tried clearing my localStorage to see if that helped, it didn't

kevin-wynn commented 2 years ago

@jc21 Acutally, left the logs up and it looks like more errors populated in:

[2/17/2022] [1:00:03 AM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /app/config/production.json
[2/17/2022] [1:01:10 AM] [Global   ] › ✖  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
  ╰─> [120 lines of output]
      Collecting setuptools>=40.6.0
        Using cached setuptools-60.9.2-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/setuptools_ext.py -> 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/model.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/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.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/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/ffiplatform.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/setuptools_ext.py -> 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/model.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/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/api.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/cparser.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/ffiplatform.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.

[2/17/2022] [1:01:11 AM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
[2/17/2022] [1:01:12 AM] [Setup    ] › ℹ  info      Creating a new JWT key pair...
[2/17/2022] [1:02:20 AM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /app/config/production.json
jc21 commented 2 years ago

This pip stuff is becoming a bit ridiculous. It's dependency hell dealing with certbot. Nevertheless, that should not prevent anyone from logging in.

All I can think of doing is wiping out data in the user and auth tables, restarting NPM and it will create that default admin@example.com:changeme user/auth for you. But as you said that doesn't work.

FWIW I've not experienced this on any of my 3 production clusters running a combination of sqlite and MySQL backends.

kevin-wynn commented 2 years ago

I can give wiping those tables clean, I had only tried setting the is_deleted flag on the one user. So maybe wiping those tables out entirely will help. I will give it a go.

I agree with you though, these pip errors don't seem like flags that would prevent logging in. But maybe they are hiding more errors... I will try wiping tables and maybe poke around some, maybe the node server isn't routing correctly?

jiriteach commented 2 years ago

@jc21 and @kevin-wynn - Thanks guys and agree these dependencies are a nightmare. @kevin-wynn - Let me know if that works!

kevin-wynn commented 2 years ago

@Jiriteach wiping the user and auth tables didn't work. I think what I'm going to try and do since I only have like 8 entries for proxies is grab those. Wipe everything out clean and start fresh and manually insert those db tables once I've logged in

jiriteach commented 2 years ago

Good to know. Thanks. I'd be keen to start again but just need a way to backup the db side with rules, custom certs etc. If there was an easy way to export/restore this into the db then keen to try!

kevin-wynn commented 2 years ago

So fwiw, clearing the database didn't help. My guess is that this has nothing to do with the database at all at this point it might be something in the nginx configurations, as my nginx rules stayed in tack even clearing the db (I assume NPM only uses the database to show users data in the UI). I will start debugging the nginx rules to see if something is preventing an /api/tokens request from the UI

kevin-wynn commented 2 years ago

Something also to note, trying to do a curl post to /api/tokens from within the docker container results in a 502 as well

[root@docker-2e99de155d57:/app]# curl -d "identity=admin@example.com&secret=changeme" -X POST http://localhost:81/api/tokens
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
jc21 commented 2 years ago

The base of the api:

docker exec -ti npm curl http://127.0.0.1:81/api/

works on the github-develop docker tag, but on the 2.9.15 tag.

kevin-wynn 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>
kevin-wynn commented 2 years ago

@Jiriteach While I haven't been able to find a real fix for this. I have gotten myself up and running with all my original data running on 2.9.15. Here are the steps I took to get where I'm at now:

Did a mysqldump of all my data

  1. docker exec -it <mysql container> sh
  2. mysqldump -u root -p ... npm setting access_list access_list_auth access_list_client certificate proxy_host redirection_host stream > dump.sql
  3. Copied that dump.sql file to my local and off the docker image
  4. Created a new directory and copied the docker-compose.yml file over to that new directory
  5. docker-compose down the existing stuff, cd to the new directory and docker-compose up -d to spin it up
  6. Once it was up and running cmd+r on the :81/login route to make sure you're not hitting a cached route and log in with the admin@example.com:changeme credentials
  7. Once logged in and my new admin user set up I copied over the letsencrypt and data directories from the existing set up to this new directory
  8. Logged into the new mysql instance and ran all the sql from the dump to restore my previous content in the UI

And that's where I'm at now, things seem to be running. I'm able to log in and out fine, and all my existing content seems to be running fine now. But I haven't tested everything, just hit a few urls and saw them working is all really.

jiriteach commented 2 years ago

Setup a replica environment so I don't mess with my core environment of NPM. Db and data intact on a new RPI with new install of Docker and with the github-develop version.

Now that I have an enviroment to run diagnostics and tests - will try and investigate further as no big deal if i trash this one :)

Start-up and errors in the logs -

            copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/ffiplatform.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/setuptools_ext.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/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.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/__init__.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_gen.py -> 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/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/setuptools_ext.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/error.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
            copying cffi/recompiler.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.
[2/17/2022] [4:14:51 AM] [Global   ] › ℹ  info      Manual db configuration already exists, skipping config creation from environment variables
jiriteach commented 2 years ago

@kevin-wynn - Thats awesome! Looks a goer. Will try that now.

jiriteach commented 2 years ago

@kevin-wynn @jc21 - So its definately an issue with the existing version of the db so seems that an export/dumb and re-import is the way to go!

jiriteach commented 2 years ago

@kevin-wynn @jc21 - Have narrowed it down. The issue is to do with a cert in my db. Removed all certs from the table and my existing db loads. Its easy for me to try and my sql is a sqlite db. I think I might know which cert it is - I'm using a Cloudflare origin so will check if this is the issue or if its any of the certs!