Closed zero77 closed 4 months ago
hi @zero77 ,
mmh, could you launch the gui from a terminal? hopefully it'll output some error to stdout.
Hi @gustavo-iniguez-goya I have added a link to the logs below, it looks like there are some db errors when it first starts. After that the nodes connect and i couldn't see any more errors.
thank you @zero77 ! do you remember what GUI version did you have installed before upgrading to v1.6.4?
@gustavo-iniguez-goya I use deb-get to update so, i think i have updated to each version as it came out.
I can't reproduce this behaviour. It's quite strange anyways, the schema version is being set correctly, but somehow it's not being saved to disk.
Could you close the GUI and run these commands?
$ sqlite3 /path/to/file.db "PRAGMA integrity_check;"
$ sqlite3 /path/to/file.db "PRAGMA user_version;"
This one should modify the schema version, so it shouldn't try to update it on GUI start:
$ sqlite3 /path/to/file.db "PRAGMA user_version = 3;"
verify that the value is 3 with $ sqlite3 /path/to/file.db "PRAGMA user_version;"
And see if after this command the GUI works again.
Mmh, where's the db file located? is it maybe being deleted by some background cleanup process?
@gustavo-iniguez-goya I have added the sql queries below. For clarity should the log file be a db or log, i have been using log but have just changed it to db, both seem to work
sqlite3 /etc/opensnitchd/opensnitch.db "PRAGMA integrity_check;" ok
sqlite3 /etc/opensnitchd/opensnitch.db "PRAGMA user_version;" 0
sqlite3 /etc/opensnitchd/opensnitch.db "PRAGMA user_version = 3;" Error: stepping, attempt to write a readonly database (8)
sudo sqlite3 /etc/opensnitchd/opensnitch.db "PRAGMA user_version = 3;" nothing returned
sqlite3 /etc/opensnitchd/opensnitch.db "PRAGMA user_version;" 3
thank you @zero77 , the log file should be a regular plain text file. It's configured in /etc/opensnitchd/default-config.json (https://github.com/evilsocket/opensnitch/blob/master/daemon/default-config.json) and by default it points to /var/log/opensnitchd.log
On the other hand, the .db path is configured by the GUI and saved under $HOME/.config/opensnitchd/settings.conf (the user's home who opened the GUI). The GUI must have write access to the DB, so if you save it under /etc/opensnitchd/ be sure that your user can write to the .db
Thanks for your help with this, i think i have misconfigured the log and db
Describe the bug After i enable logrotate to rotate opensnitch logs it breaks the gui each time it runs. I am left with a completely blank gui with no data under any of the tabs (Events, Nodes, RULES, HOSTS, etc) But, after i restart the gui it works again and starts to show new logs but does not include old logs.
This is the logrotate config i am using: config
Include the following information:
To Reproduce
Steps to reproduce the behavior:
I am not sure how quickly this happens as i only see the effects when i open the gui
4 restart gui and it all works as normal again with out old logs
Post error logs: I am not sure how to provide the logs as restarting the gui is the workaround i am using and won't show any errors
Expected behavior (optional)
Screenshots
Additional context