Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zipfile.BadZipFile: Bad magic number for file header #1

Open
C-Loftus opened this issue Dec 5, 2024 · 1 comment
Open

zipfile.BadZipFile: Bad magic number for file header #1

C-Loftus opened this issue Dec 5, 2024 · 1 comment

Comments

@C-Loftus
Copy link
Member

C-Loftus commented Dec 5, 2024


START /entrypoint.sh
Trying to generate OpenAPI document
Generating /data/wis2box/config/pygeoapi/local.openapi.yml
Done
openapi.yml generated continue to pygeoapi
make SCRIPT_NAME empty from /
Start gunicorn name=wis2box-api on 0.0.0.0:80 with 4 workers and SCRIPT_NAME=
[2024-12-05 22:12:12 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2024-12-05 22:12:12 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2024-12-05 22:12:12 +0000] [1] [INFO] Using worker: gevent
[2024-12-05 22:12:12 +0000] [19] [INFO] Booting worker with pid: 19
[2024-12-05 22:12:12 +0000] [20] [INFO] Booting worker with pid: 20
[2024-12-05 22:12:12 +0000] [21] [INFO] Booting worker with pid: 21
[2024-12-05 22:12:12 +0000] [22] [INFO] Booting worker with pid: 22
[2024-12-05 22:12:13 +0000] [19] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/usr/lib/python3/dist-packages/gunicorn/workers/ggevent.py", line 146, in init_process
    super().init_process()
  File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python3/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python3/dist-packages/gunicorn/util.py", line 384, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/dist-packages/wis2box_api-0.6.dev0-py3.10.egg/wis2box_api/app.py", line 23, in <module>
    from pygeoapi.flask_app import BLUEPRINT as pygeoapi_blueprint
  File "/pygeoapi/pygeoapi/__init__.py", line 84, in <module>
    def plugins():
  File "/pygeoapi/pygeoapi/__init__.py", line 54, in decorator
    found_entrypoints = entry_points(group="pygeoapi")
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 459, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1006, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/usr/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 941, in _normalized_name
    return self._name_from_stem(stem) or super()._normalized_name
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name
    return Prepared.normalize(self.name)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 617, in name
    return self.metadata['Name']
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 606, in metadata
    or self.read_text('PKG-INFO')
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 927, in read_text
    return self._path.joinpath(filename).read_text(encoding='utf-8')
  File "/usr/lib/python3.10/zipfile.py", line 2362, in read_text
    with self.open('r', *args, **kwargs) as strm:
  File "/usr/lib/python3.10/zipfile.py", line 2343, in open
    stream = self.root.open(self.at, zip_mode, pwd=pwd)
  File "/usr/lib/python3.10/zipfile.py", line 1535, in open
    raise BadZipFile("Bad magic number for file header")
zipfile.BadZipFile: Bad magic number for file header
[2024-12-05 22:12:13 +0000] [19] [INFO] Worker exiting (pid: 19)
[2024-12-05 22:12:14 +0000] [21] [INFO] Worker exiting (pid: 21)
[2024-12-05 22:12:14 +0000] [22] [INFO] Worker exiting (pid: 22)
[2024-12-05 22:12:14 +0000] [20] [INFO] Worker exiting (pid: 20)
[2024-12-05 22:12:14 +0000] [1] [INFO] Shutting down: Master
[2024-12-05 22:12:14 +0000] [1] [INFO] Reason: Worker failed to boot.
 *  Terminal will be reused by tasks, press any key to close it. 
@C-Loftus
Copy link
Member Author

C-Loftus commented Dec 5, 2024

seems like i can get around this by resetting the container then assuming it works on the second time, i then need to reset the nginx container. Not clear why this seems non deterministic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant