gboudreau / Greyhole

Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.
http://www.greyhole.net
GNU General Public License v3.0
263 stars 34 forks source link

Log Error and --remove problem #291

Closed mckinneyg closed 2 years ago

mckinneyg commented 2 years ago

I have 2 issues that may be related.

  1. Log Issue:

  2. Feb 15 19:25:26 WARN read_smb_spool: PHP Warning [2]: Error while sending QUERY packet. PID=3169 in /usr/bin/greyhole on line 705; BT: greyhole[L8561] run() => greyhole[L7841] parse_samba_spool() => greyhole[L4381] acquireLock(read_smb_spool,5) => greyhole[L780] getFirstValue(SELECT GET_LOCK(:name, :timeout),array ( 'name' => 'read_smb_spool', 'timeout' => 5,)) => greyhole[L737] getFirst(SELECT GET_LOCK(:name, :timeout),array ( 'name' => 'read_smb_spool', 'timeout' => 5,)) => greyhole[L729] execute(SELECT GET_LOCK(:name, :timeout),array ( 'name' => 'read_smb_spool', 'timeout' => 5,)) => greyhole[L705] execute() Feb 15 19:25:26 ERROR read_smb_spool: PHP Fatal Error: Uncaught Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /usr/bin/greyhole:719 Stack trace:

    0 /usr/bin/greyhole(729): DB::execute('SELECT GET_LOCK...', Array)

    1 /usr/bin/greyhole(737): DB::getFirst('SELECT GET_LOCK...', Array)

    2 /usr/bin/greyhole(780): DB::getFirstValue('SELECT GET_LOCK...', Array)

    3 /usr/bin/greyhole(4381): DB::acquireLock('read_smb_spool', 5)

    4 /usr/bin/greyhole(7841): SambaSpool::parse_samba_spool()

    5 /usr/bin/greyhole(8561): ProcessSpoolCliRunner->run()

    6 {main}

    thrown; BT: greyhole[L719]

  3. When I execute greyhole --remove=/var/hda/files/drives/Drive2/gh, I get Cannot establish connection to the host.

gboudreau commented 2 years ago

Greyhole is (trying to) telling you that your MySQL server is not happy. Look into your MySQL (or MariaDB) server; check the logs, try to restart it, etc.

mckinneyg commented 2 years ago

Restarting MariaDB seems to have stopped the errors in the logs.

But executing greyhole --remove=/var/hda/files/drives/Drive2/gh, is still resulting in Cannot establish connection to the host. Any suggestions.

gboudreau commented 2 years ago

I don't think that error is from Greyhole. Googling a little, it seems to be an error returned when using Webmin to issue commands, and webmin can't for some reason connect to your server to send the commande. Or something along those lines. Try other commands, like greyhole -q or greyhole -s, or even totally unrelated commands, like php -v.

mckinneyg commented 2 years ago

You are awesome! I thought I did an exhaustive search and don't remember coming across webmin, but that was the problem. I was able to shell in and execute the command without any issue. Thank you!