ZoeyVid / NPMplus

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://hub.docker.com/r/zoeyvid/npmplus
MIT License
448 stars 17 forks source link

Failed building wheel for cloudflare #909

Closed Matt-CyberGuy closed 3 months ago

Matt-CyberGuy commented 3 months ago

Hey all,

Looks like the last update broke something in our setup. NPM isn't coming up, I'm seeing the below in the output of the container

        File "/usr/local/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 171, in setup
          ok = dist.parse_command_line()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 476, in parse_command_line
          args = self._parse_command_opts(parser, args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/dist.py", line 870, in _parse_command_opts
          nargs = _Distribution._parse_command_opts(self, parser, args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 535, in _parse_command_opts
          cmd_class = self.get_command_class(command)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/dist.py", line 715, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
                                              ^^^^^^^^^
        File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
          module = import_module(match.group('module'))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 995, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/usr/local/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 26, in <module>
          from ..extern.wheel.metadata import pkginfo_to_metadata
      ModuleNotFoundError: No module named 'setuptools.extern.wheel'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cloudflare
ERROR: Could not build wheels for cloudflare, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 24.0 -> 24.1.1
[notice] To update, run: pip install --upgrade pip
[Global   ] › ✖  error     Some plugins failed to install. Please check the logs above
[Migrate  ] › ℹ  info      Current database version: none
[Certbot  ] › ▶  start     Installing cloudflare...
[Certbot  ] › ✖  error       error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-k37449ay/cloudflare_faac74fea629496b82a25fdfd1491da4/setup.py", line 65, in <module>
          main()
        File "/tmp/pip-install-k37449ay/cloudflare_faac74fea629496b82a25fdfd1491da4/setup.py", line 18, in main
          setup(
        File "/usr/local/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 171, in setup
          ok = dist.parse_command_line()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 476, in parse_command_line
          args = self._parse_command_opts(parser, args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/dist.py", line 870, in _parse_command_opts
          nargs = _Distribution._parse_command_opts(self, parser, args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 535, in _parse_command_opts
          cmd_class = self.get_command_class(command)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/setuptools/dist.py", line 715, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
                                              ^^^^^^^^^
        File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
          module = import_module(match.group('module'))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 995, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/usr/local/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 26, in <module>
          from ..extern.wheel.metadata import pkginfo_to_metadata
      ModuleNotFoundError: No module named 'setuptools.extern.wheel'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cloudflare
ERROR: Could not build wheels for cloudflare, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 24.0 -> 24.1.1
[notice] To update, run: pip install --upgrade pip
[Global   ] › ✖  error     Some plugins failed to install. Please check the logs above

Going to try and roll our instance back.

Matt-CyberGuy commented 3 months ago

I rolled our container installation back to 408, and it's back up and running now

Matt-CyberGuy commented 3 months ago

I have another instance of NPMPlus that updated and did not go down. The main difference was I took the time to get crowdsec up and running fully.

SoundAndColors commented 3 months ago

Broken here too. Same error.

honestlai commented 3 months ago

Same issue for me, I really only use this project for QUIC

ThisGuyNeedsABeer commented 3 months ago

This was fun to wake up to, I had my Docker Container set to autoupdate in Unraid (shame on me). I should have checked here first before spending an hour troubleshooting. Time to turn off the ":latest" tag, and hang back on a stable version.

Resolution:

  1. Connect to container
  2. "# source /usr/local/bin/activate"
  3. "(local) # pip install --upgrade pip"
  4. "(local) # pip install --upgrade setuptools wheel"

I also encountered an error

Traceback (most recent call last):
  File "/app/node_modules/node-gyp/gyp/setup.py", line 13, in <module>
    with open(path.join(here, "README.md")) as in_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/app/node_modules/node-gyp/gyp/README.md'

Resolution:

  1. "(local) # echo "Hello" > /app/node_modules/node-gyp/gyp/README.md"

@Matt-CyberGuy

I rolled our container installation back to 408, and it's back up and running now

Where did you find tag 408? DockerHub only shows me 341 as the newest available: https://hub.docker.com/r/zoeyvid/nginx-proxy-manager/tags?page=&page_size=&name=&ordering=last_updated

Derp: Outdated repo: https://hub.docker.com/r/zoeyvid/npmplus/tags

Zoey2936 commented 3 months ago

Hello, even if I can't reproduce this error (the certbot cloudflared installs fine on x86_64 and aarch64), I think it is related due to an out of sync between the main build step and the certbot build step. I released a new version with a rebuilt of cloudflared certbot, please retry

Zoey2936 commented 3 months ago

does it work now?

SoundAndColors commented 3 months ago

does it work now?

The issue has been resolved for me. I appreciate it.

Zoey2936 commented 3 months ago

Ok, then I will close it, if it hapens again please reopen/add a comment

ThisGuyNeedsABeer commented 2 months ago
-------------------------------------
 _ _  ___  __ __       _
| \ || . \|  \  \ ___ | | _ _  ___
|   ||  _/|     || . \| || | |[_-[
|_\_||_|  |_|_|_||  _/|_| \__|/__/
                 |_|
-------------------------------------
Version:  2.11.2+454f3aa
Date:     Mon Jul  8 14:28:10 EDT 2024
User:     root
PUID:     0
User ID:  0
PGID:     0
Group ID: 0
-------------------------------------

[Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[Migrate  ] › ℹ  info      Current database version: none
[Certbot  ] › ▶  start     Installing cloudflare...
[Certbot  ] › ✖  error     ERROR: Could not find a version that satisfies the requirement certbot-dns-cloudflare (from versions: none)
ERROR: No matching distribution found for certbot-dns-cloudflare

[Global   ] › ✖  error     Some plugins failed to install. Please check the logs above
[Migrate  ] › ℹ  info      Current database version: none
[Certbot  ] › ▶  start     Installing cloudflare...
[Certbot  ] › ✖  error     ERROR: Could not find a version that satisfies the requirement certbot-dns-cloudflare (from versions: none)
ERROR: No matching distribution found for certbot-dns-cloudflare

[Global   ] › ✖  error     Some plugins failed to install. Please check the logs above
[Migrate  ] › ℹ  info      Current database version: none
[Certbot  ] › ▶  start     Installing cloudflare...

Trying with latest, and 413, 414. Seems to still be an issue, rolled back to 408.

Zoey2936 commented 2 months ago

looks like a diffrent issue, seems network related

ThisGuyNeedsABeer commented 2 months ago

looks like a diffrent issue, seems network related

How would failing to build be network related when rolling back to a previous version works just fine? Genuinely curious what the thought process is there.

Zoey2936 commented 2 months ago

You can see what chaged sonce 408 here: https://github.com/ZoeyVid/NPMplus/compare/2024-06-22-r1...2024-07-02-r1

Zoey2936 commented 2 months ago

The only changes are python/alpine updates which could cause this

Zoey2936 commented 2 months ago

But "No matching distribution found for " is not a build error