Thanks for your response.
I was previously updated NetBox to 2.7.12 using this commands and everything was OK:
cd /opt/netbox
git checkout master
git pull origin master
git status
./upgrade.sh
systemctl restart supervisord
supervisorctl restart netbox
systemctl restart apache2
So. using git diff i receive this output:
root@netbox:/opt/netbox# git diff
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index ba2060ce..9b1226c3 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -97,7 +97,7 @@ NAPALM_TIMEOUT = getattr(configuration, 'NAPALM_TIMEOUT', 30)
NAPALM_USERNAME = getattr(configuration, 'NAPALM_USERNAME', '')
PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50)
PREFER_IPV4 = getattr(configuration, 'PREFER_IPV4', False)
-RELEASE_CHECK_URL = getattr(configuration, 'RELEASE_CHECK_URL', None)
RELEASE_CHECK_TIMEOUT = getattr(configuration, 'RELEASE_CHECK_TIMEOUT', 24 * 3600)
REPORTS_ROOT = getattr(configuration, 'REPORTS_ROOT', os.path.join(BASE_DIR, 'reports')).rstrip('/')
SCRIPTS_ROOT = getattr(configuration, 'SCRIPTS_ROOT', os.path.join(BASE_DIR, 'scripts')).rstrip('/')
I perform :
cp netbox/netbox/settings.py netbox/netbox/settings.py.broken
git checkout netbox/netbox/settings.py
After it, I perform mentioned update commands.
Everything was went fine, except Web page is not starting.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
Reason: Error reading from remote server
systemctl status supervisor
Sep 13 17:39:50 netbox supervisord[31760]: 2020-09-13 17:39:50,059 INFO spawned: 'netbox' with pid 33760
Sep 13 17:39:51 netbox supervisord[31760]: 2020-09-13 17:39:51,420 INFO success: netbox entered RUNNING state, process has stayed up for > than 1
Sep 13 17:39:54 netbox supervisord[31760]: 2020-09-13 17:39:54,401 INFO exited: netbox (exit status 3; not expected)
Sep 13 17:39:55 netbox supervisord[31760]: 2020-09-13 17:39:55,404 INFO spawned: 'netbox' with pid 33778
Sep 13 17:39:56 netbox supervisord[31760]: 2020-09-13 17:39:56,804 INFO success: netbox entered RUNNING state, process has stayed up for > than 1
Sep 13 17:39:59 netbox supervisord[31760]: 2020-09-13 17:39:59,659 INFO exited: netbox (exit status 3; not expected)
Sep 13 17:40:00 netbox supervisord[31760]: 2020-09-13 17:40:00,662 INFO spawned: 'netbox' with pid 33796
Sep 13 17:40:02 netbox supervisord[31760]: 2020-09-13 17:40:02,216 INFO success: netbox entered RUNNING state, process has stayed up for > than 1
Sep 13 17:40:04 netbox supervisord[31760]: 2020-09-13 17:40:04,664 INFO exited: netbox (exit status 1; not expected)
Sep 13 17:40:05 netbox supervisord[31760]: 2020-09-13 17:40:05,666 INFO spawned: 'netbox' with pid 33814
When I try to perform this action :
sudo python3 manage.py runserver 0.0.0.0:8000 --insecure I get:
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python3.6/dist-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/usr/local/lib/python3.6/dist-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.6/dist-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/netbox/netbox/circuits/models.py", line 8, in <module>
from dcim.models import CableTermination
File "/opt/netbox/netbox/dcim/models/__init__.py", line 1, in <module>
from .device_component_templates import *
File "/opt/netbox/netbox/dcim/models/device_component_templates.py", line 7, in <module>
from extras.models import ObjectChange
File "/opt/netbox/netbox/extras/models/__init__.py", line 1, in <module>
from .change_logging import ChangeLoggedModel, ObjectChange
File "/opt/netbox/netbox/extras/models/change_logging.py", line 48, in <module>
class ObjectChange(models.Model):
File "/opt/netbox/netbox/extras/models/change_logging.py", line 106, in ObjectChange
object_data = models.JSONField(
AttributeError: module 'django.db.models' has no attribute 'JSONField'
воскресенье, 13 сентября 2020 г. в 01:25:43 UTC+3, Brian Candler: