Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[BUG] Fails to start after update

未关闭
#68 3 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@alex-phillips 已经在做这个了。

开始于 2025年5月19日。

评估

这个 Issue 还没有评估数据。

描述

work-in-progress
Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

I just tried updating from v4.1.11-ls249 to v4.2.0-ls250 and I get a bunch of errors and can't access Netbox. I can revert back to the older image and it starts right up.

Expected Behavior

No response

Steps To Reproduce
  1. Change compose file to point to v4.2.0-ls250 image.
  2. Re-pull and deploy containers
Environment
- OS: Docker on Ubuntu
- How docker service was installed: apt
CPU architecture

x86-64

Docker creation
version: "3.7"
services:
  db:
    image: postgres:15-alpine
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=netbox
      - POSTGRES_USER=netbox

  redis:
    image: redis:7-alpine
    command: redis-server
    restart: always
    volumes:
      - redis-data:/data

  app:
    image: lscr.io/linuxserver/netbox:v4.2.0-ls250
    container_name: netbox
    environment:
      - TZ=America/Chicago
      - SUPERUSER_EMAIL=${SUPERUSER_EMAIL}
      - SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD}
      - ALLOWED_HOST=${DOMAIN}
      - DB_NAME=netbox
      - DB_USER=netbox
      - DB_PASSWORD=${POSTGRES_PASSWORD}
      - DB_HOST=db
      - DB_PORT=5432
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_DB_TASK=0 # Database ID for tasks
      - REDIS_DB_CACHE=1 # Database ID for cache
      - REMOTE_AUTH_BACKEND='netbox.authentication.LDAPBackend'
      - REMOTE_AUTH_HEADER='HTTP_REMOTE_USER'
      - REMOTE_AUTH_AUTO_CREATE_USER=True
    volumes:
      - app-data:/config
      - app-requirements:/app/netbox
    ports:
      - 13031:8000
    depends_on:
      - db
      - redis
    restart: unless-stopped

volumes:
  db-data:
    driver: local
  app-data:
    driver: local
  app-requirements:
    driver: local
  redis-data:
    driver: local
Container logs
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/lsiopy/lib/python3.12/site-packages/django/core/handlers/wsgi.py", line 124, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/core/handlers/base.py", line 140, in get_response
    response = self._middleware_chain(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/core/handlers/exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/core/handlers/exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/core/handlers/exception.py", line 184, in handle_uncaught_exception
    callback = resolver.resolve_error_handler(500)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/urls/resolvers.py", line 732, in resolve_error_handler
    callback = getattr(self.urlconf_module, "handler%s" % view_type, None)
                       ^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/utils/functional.py", line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/urls/resolvers.py", line 711, in urlconf_module
    return import_module(self.urlconf_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/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 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/app/netbox/netbox/netbox/urls.py", line 8, in <module>
    from account.views import LoginView, LogoutView
  File "/app/netbox/netbox/account/views.py", line 26, in <module>
    from netbox.views import generic
  File "/app/netbox/netbox/netbox/views/generic/__init__.py", line 2, in <module>
    from .feature_views import *
  File "/app/netbox/netbox/netbox/views/generic/feature_views.py", line 11, in <module>
    from extras import forms, tables
  File "/app/netbox/netbox/extras/forms/__init__.py", line 4, in <module>
    from .bulk_import import *
  File "/app/netbox/netbox/extras/forms/bulk_import.py", line 181, in <module>
    class EventRuleImportForm(NetBoxModelImportForm):
  File "/lsiopy/lib/python3.12/site-packages/django/forms/models.py", line 312, in __new__
    fields = fields_for_model(
             ^^^^^^^^^^^^^^^^^
  File "/lsiopy/lib/python3.12/site-packages/django/forms/models.py", line 207, in fields_for_model
    raise FieldError(
django.core.exceptions.FieldError: 'action_object' cannot be specified for EventRule model form as it is a non-editable field
[pid: 193|app: 0|req: 2/2] 172.19.0.1 () {56 vars in 1108 bytes} [Mon Feb 17 13:41:46 2025] GET /favicon.ico => generated 0 bytes in 63 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
主要语言
Python
星标
129
派生
21
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。