|
1 |
| -ABN#001: Placeholder |
2 |
| -==================== |
| 1 | +ASC#001: Backend is down after Upgrade to v2 |
| 2 | +============================================ |
3 | 3 |
|
4 | 4 | .. list-table::
|
5 | 5 | :header-rows: 1
|
6 | 6 | :widths: 50, 50
|
7 | 7 |
|
8 | 8 | * - Introduced Version
|
9 | 9 | - Fixed Version
|
10 |
| - * - x |
11 |
| - - y |
| 10 | + * - 2.x |
| 11 | + - N/A |
12 | 12 |
|
13 |
| -Placeholder Text. |
| 13 | +There is currently a rare issue where the backend is not starting |
| 14 | +after upgrading to v2. This is due to insufficient permissions for |
| 15 | +the MySQL Trigger. |
14 | 16 |
|
15 |
| -ABN#001: Workaround |
| 17 | +If you upgraded your Security Center to version 2 and everything |
| 18 | +seems to be working fine, you can ignore this advisory. |
| 19 | + |
| 20 | +We are currently working on a more robust upgrade process to prevent |
| 21 | +this from happening in the future. |
| 22 | + |
| 23 | +ASC#001: Workaround |
16 | 24 | -------------------
|
17 | 25 |
|
18 |
| -Placeholder Text. |
| 26 | +After a successful upgrade to version 2 ("Upgrade finished" message can be |
| 27 | +seen, see :ref:`admin/upgrade:performing the upgrade`), you might encounter |
| 28 | +the following error message in ``/var/log/asgard-security-center-backend/server.log``: |
| 29 | + |
| 30 | +.. code-block:: json |
| 31 | +
|
| 32 | + { |
| 33 | + "level": "FATAL", |
| 34 | + "time": "2024-04-03T18:49:16+02:00", |
| 35 | + "message": "failed to init database schema", |
| 36 | + "error": "Error 1142 (42000): TRIGGER command denied to user 'securitycenter-model'@'localhost' for table `asgard-security-center-backend`.`assets`" |
| 37 | + } |
| 38 | +
|
| 39 | +To fix this problem, run the following commands on your backend. |
| 40 | + |
| 41 | +Drop the MySQL trigger (no data will be lost): |
| 42 | + |
| 43 | +.. code-block:: console |
| 44 | +
|
| 45 | + nextron@backend:~$ sudo mysql asgard-security-center-backend -e "DROP TRIGGER IF EXISTS assets_updated_fields;" |
| 46 | +
|
| 47 | +Restart the backend service. This will recreate the trigger with the correct permissions |
| 48 | +automatically: |
| 49 | + |
| 50 | +.. code-block:: console |
| 51 | +
|
| 52 | + nextron@backend:~$ sudo systemctl restart asgard-security-center-backend.service |
| 53 | +
|
| 54 | +Check if the service is running: |
| 55 | + |
| 56 | +.. code-block:: console |
| 57 | +
|
| 58 | + nextron@backend:~$ sudo systemctl status asgard-security-center-backend.service |
0 commit comments