Brief description of the problem
I was just browsing the Web UI when, after clicking in System → Network, I just saw the error in the attached screenshot. As a subscriber to Stable updates I just followed the on-screen directions and hence here I am.
Detailed step by step instructions to reproduce the problem
I went to 192.168.1.100 on my browser (Rockstor NAS local address), then System → Network
Web-UI screenshot
Error Traceback provided on the Web-UI
Traceback (most recent call last):
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 312, in _commit
return self.connection.commit()
^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/connection.py”, line 262, in commit
self.wait(self._commit_gen())
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/connection.py”, line 414, in wait
return waiting.wait(gen, self.pgconn.socket, interval=interval)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/waiting.py”, line 354, in wait_poll
s = gen.send(ready)
^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/_connection_base.py”, line 580, in _commit_gen
yield from self._exec_command(b"COMMIT")
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/_connection_base.py”, line 478, in _exec_command
raise e.error_from_result(result, encoding=self.pgconn._encoding)
psycopg.errors.ForeignKeyViolation: insert or update on table “storageadmin_networkdevice” violates foreign key constraint “storageadmin_network_connection_id_6a520cbf_fk_storagead”
DETAIL: Key (connection_id)=(33) is not present in table “storageadmin_networkconnection”.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/network.py”, line 235, in get_queryset
self._refresh_devices()
File “/usr/lib64/python3.11/contextlib.py”, line 80, in inner
with self._recreate_cm():
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/transaction.py”, line 263, in exit
connection.commit()
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/utils/asyncio.py”, line 26, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 336, in commit
self._commit()
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 311, in _commit
with debug_transaction(self, “COMMIT”), self.wrap_database_errors:
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/utils.py”, line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/opt/rockstor/.venv/lib/python3.11/site-packages/django/db/backends/base/base.py”, line 312, in _commit
return self.connection.commit()
^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/connection.py”, line 262, in commit
self.wait(self._commit_gen())
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/connection.py”, line 414, in wait
return waiting.wait(gen, self.pgconn.socket, interval=interval)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/waiting.py”, line 354, in wait_poll
s = gen.send(ready)
^^^^^^^^^^^^^^^
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/_connection_base.py”, line 580, in _commit_gen
yield from self._exec_command(b"COMMIT")
File “/opt/rockstor/.venv/lib/python3.11/site-packages/psycopg/_connection_base.py”, line 478, in _exec_command
raise e.error_from_result(result, encoding=self.pgconn._encoding)
django.db.utils.IntegrityError: insert or update on table “storageadmin_networkdevice” violates foreign key constraint “storageadmin_network_connection_id_6a520cbf_fk_storagead”
DETAIL: Key (connection_id)=(33) is not present in table “storageadmin_networkconnection”.
Just in case, I must say I have been updating the rockstor packages through the internal console by issuing “zypper refresh” followed by “zypper up” over the past year.
Also, my Immich server is working OK and I can access my pictures from outside when not at home.
On a side note, my internet provider upgraded my router to a new brand and model (TP-Link BE7200 Dual-Band Wi-Fi 7 XGS-PON) this week and, as far as I know, ports 80 and 443 are reserved by default by it and I cannot assign them to local boxes. No idea if this info is relevant or not.
[SOLVED]??? After closing the browser tab and re-opening the Web-UI, I played around clicking on other System options first and then, when clicking on Network, the error is not appearing any more. What has happened?
