Skip to content

Commit 3ee6770

Browse files
committed
chore(doc): add some troubleshooting
1 parent 4ec56ba commit 3ee6770

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,37 @@ sed -i 's/GIN_MODE=release/GIN_MODE=debug/' api.env
194194
systemctl --user restart controller.service
195195
```
196196

197+
## Troubleshooting
198+
199+
### Logs
200+
201+
To see al logs from the controller using the command line, execute this command con the node where the controller is running:
202+
```
203+
journalctl _UID=$(id -u nethsecurity-controller1)
204+
```
205+
206+
To select only the logs about migrations, you can use the `--grep` option to filter the logs:
207+
```
208+
journalctl _UID=$(id -u nethsecurity-controller1) --grep 'MIGRATION'
209+
```
210+
211+
### Deleting dangling units
212+
213+
If the delete process of a unit fails, it's not possibile to delete the unit from the UI.
214+
You can delete dangling units using the command line, by accessing the database.
215+
216+
To access the database, you need to run the following command on the node where the controller is running:
217+
```
218+
runagent -m nethsecurity-controller1
219+
source db.env; podman exec -it timescale psql -U "${POSTGRES_USER}" -p "${POSTGRES_PORT}"
220+
```
221+
222+
Then delete the unit from the unit from `units` and `unit_credentials` tables:
223+
```
224+
DELETE FROM units WHERE id = '<unit_id>';
225+
DELETE FROM unit_credentials WHERE unit_id = '<unit_id>';
226+
```
227+
197228
## Uninstall
198229

199230
To uninstall the instance:

0 commit comments

Comments
 (0)