funkemunky / AntiVPN

An antivpn utilizing the funkemunky API
Apache License 2.0
21 stars 7 forks source link

Version 1.7.1 Database Problems #23

Closed Xaver106 closed 2 years ago

Xaver106 commented 2 years ago

Yes, this is a copy of #21, but it got closed too early and I can't reopen it!

Version 1.7.1 displays an error when starting with a database and doesn't seem to connect to it properly, as it doesn't change anything.

It seems, that the Plugin mixes SQLite with MySql!

It creates two SqLite Databases in a Subfolder KauriVPN/databases, looking at the console output, it probably tries to connect to those and fails as it tries to use it as a MySql Database?! Both of the files can't be opend by the DB Browser (Invalid file format).

Also tested in the 1.6.1 and the Database function worked as intended without an error at startup.

Console Output:

[23:28:38 INFO]: Starting AntiVPN services...
[23:28:38 INFO]: Using databaseType MySQL...
[23:28:38 INFO]: Initializing MySQL...
[23:28:38 INFO]: Connection to SQlLite has been established.
[23:28:38 INFO]: Creating tables...
[23:28:38 INFO]: Creating indexes...
[23:28:38 ERROR]: MySQL Excepton createdTable "STATISTICS" not found; SQL statement:
[23:28:38 ERROR]: SELECT COUNT(1) IndexExists FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name='whitelisted' AND index_name='uuid_1'; [42102-210]
[23:28:38 INFO]: Starting bStats metrics...
[23:28:38 INFO]: Getting strings...
[23:28:38 INFO]: Enabled plugin KauriVPN version 1.7 by funkemunky

Images

image image

funkemunky commented 2 years ago

Again, the DB you are trying to open is not SQLLite. It is H2, a completely different database format.

Xaver106 commented 2 years ago

In that case, the plugin is trying to use h2 even if the Database is set to MySQL and mixing both, creating errors on start. @funkemunky

funkemunky commented 2 years ago

This should have been fixed in the latest update. I'll do a test again to see if it's a problem

Laukage commented 2 years ago

We are experiencing this issue aswell on the latest version of the plugin.

funkemunky commented 2 years ago

I noticed I released the 1.7.1 jar without the fix implemented. This is now fixed in release v1.7.1.1. Very sorry for the wait.