SQL Error?

thomasps
Posts: 138
Joined: Fri Feb 18, 2011 1:49 pm

SQL Error?

Postby thomasps » Sat Nov 12, 2016 5:28 pm

I recently installed Open-AudIT (an Amahi app). It notified there's an error in my MariaDB:

Code: Select all

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'partition par WHERE par.partition_free_space < '1000' AND sys.system_uuid = par.' at line 1
Not sure where the error originates from, I first checked my Greyhole log. There I find a similar SQL error:

Code: Select all

Nov 11 14:20:58 WARN read_smb_spool: PHP Warning [2]: Error while sending QUERY packet. PID=1391 in /usr/bin/greyhole on line 590; BT: greyhole[L3353] run() => greyhole[L3324] parse_samba_spool() => greyhole[L4688] getFirstValue(SELECT COUNT(*) FROM tasks) => greyhole[L617] getFirst(SELECT COUNT(*) FROM tasks,array ()) => greyhole[L609] execute(SELECT COUNT(*) FROM tasks,array ()) => greyhole[L590] execute() Nov 11 14:20:58 ERROR read_smb_spool: PHP Fatal Error: Uncaught exception 'Exception' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /usr/bin/greyhole:599 Stack trace: #0 /usr/bin/greyhole(609): DB::execute('SELECT COUNT(*)...', 'array ()') #1 /usr/bin/greyhole(617): DB::getFirst('SELECT COUNT(*)...', 'array ()') #2 /usr/bin/greyhole(4688): DB::getFirstValue('SELECT COUNT(*)...') #3 /usr/bin/greyhole(3324): parse_samba_spool() #4 /usr/bin/greyhole(3353): DaemonRunner->run() #5 {main} thrown; BT: greyhole[L599]
I'm not sure if (A) the two are related and (B) how to troubleshoot.

Many thanks.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: SQL Error?

Postby bigfoot65 » Sat Nov 12, 2016 6:59 pm

Check that MariaDB is running:

Code: Select all

sudo systemctl status mariadb
If not then replace status with start in the command line above.

You may then need to uninstall and reinstall the app.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

thomasps
Posts: 138
Joined: Fri Feb 18, 2011 1:49 pm

Re: SQL Error?

Postby thomasps » Sat Nov 12, 2016 7:09 pm

Thanks @bigfoot65. I get the following output:

Code: Select all

● mariadb.service - MariaDB 10.0 database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2016-11-12 18:00:18 MST; 1h 7min ago Process: 8879 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS) Process: 9110 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS) Process: 8968 ExecStartPost=/usr/libexec/mysql-wait-ready $MAINPID (code=exited, status=0/SUCCESS) Process: 8929 ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/SUCCESS) Process: 8906 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS) Main PID: 8966 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─8966 /bin/sh /usr/bin/mysqld_safe --basedir=/usr └─9077 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/maria... Nov 12 18:00:17 hda.speidel.ca systemd[1]: Starting MariaDB 10.0 database server... Nov 12 18:00:17 hda.speidel.ca mysql-prepare-db-dir[8929]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done. Nov 12 18:00:17 hda.speidel.ca mysqld_safe[8966]: 161112 18:00:17 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. Nov 12 18:00:17 hda.speidel.ca mysqld_safe[8966]: 161112 18:00:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Nov 12 18:00:18 hda.speidel.ca systemd[1]: Started MariaDB 10.0 database server.
Does it look fine to you?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: SQL Error?

Postby bigfoot65 » Sat Nov 12, 2016 7:17 pm

Yea that looks fine.

Did you do OS updates? Do so by executing:

Code: Select all

sudo dnf update
Also check that there's sufficient disk space on the root partition:

Code: Select all

df -h
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 34 guests