Page 1 of 2

greyhole disk use app

Posted: Fri Apr 04, 2014 6:16 pm
by kcgr
Not sure if this should go under the apps section or this one. I replaced one of my drives in the pool with a larger unit. I was patting my newbie back and all seemed fine except for when I checked the gh-du app. When I run it, I get this:

#!/usr/bin/php -d open_basedir=/

Is it some php error?


I updated greyhole and rebooted, but still I get that error. The log monitor shows this:

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:488
Stack trace:
#0 /usr/bin/greyhole(506): DB::execute('SELECT COUNT(*)...', Array)
#1 /usr/bin/greyhole(4696): DB::getFirstValue('SELECT COUNT(*)...')
#2 /usr/bin/greyhole(3411): parse_samba_spool()
#3 /usr/bin/greyhole(3438): DaemonRunner->run()
#4 {main}
thrown; BT: greyhole[L488]
Apr 04 20:15:17 INFO daemon: Greyhole (version %VERSION%) daemon started.
Apr 04 20:15:17 INFO daemon: Optimizing MySQL tables...
Apr 04 20:15:18 DEBUG daemon: Loading metadata store backup directories...
Apr 04 20:15:18 DEBUG daemon: Found 2 directories in the settings table.
Apr 04 20:15:18 DEBUG daemon: Checking symlink at /usr/lib/samba/vfs/greyhole.so...
Apr 04 20:15:18 DEBUG daemon: Is OK.
Apr 04 20:15:18 DEBUG simplify_tasks: Simplifying pending tasks.
Apr 04 20:15:19 DEBUG sleep: Nothing to do... Sleeping.
Apr 04 20:15:29 DEBUG sleep: Nothing to do... Sleeping.
Apr 04 20:15:39 DEBUG sleep: Nothing to do... Sleeping.
Apr 04 20:15:41 ERROR initialize: PHP Fatal Error: Uncaught exception 'Exception' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound' in /usr/share/greyhole/web-app/index.php:488
Stack trace:
#0 /usr/share/greyhole/web-app/index.php(514): DB::execute('SELECT size, de...', Array)
#1 /usr/share/greyhole/web-app/index.php(2078): DB::getAll('SELECT size, de...')
#2 {main}
thrown; BT: index.php[L488]
Apr 04 20:15:49 DEBUG sleep: Nothing to do... Sleeping.


Any help is welcomed.
thanks

Re: greyhole disk use app

Posted: Fri Apr 04, 2014 6:44 pm
by bigfoot65
Need additional information.

What Amahi version/OS?

Have OS updates been applied?

What version of Greyhole?

Re: greyhole disk use app

Posted: Fri Apr 04, 2014 7:57 pm
by kcgr
amahi 6
ubuntu 12.04.04 LTS
I think I've done all the updates via "apt-get update" then "apt-get upgrade" even a "apt-get install greyhole"
greyhole version: 0.9.48-1


df -h gives:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 19G 4.1G 14G 24% /
udev 988M 12K 988M 1% /dev
tmpfs 200M 924K 199M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 997M 0 997M 0% /run/shm
/dev/sda3 438G 496M 415G 1% /var/hda/files
/dev/sdb1 1.8T 978G 856G 54% /var/hda/files/drives/drive1
/dev/sdc1 1.8T 976G 859G 54% /var/hda/files/drives/drive2
/dev/sdd1 1.8T 975G 860G 54% /var/hda/files/drives/drive3
none 4.0M 0 4.0M 0% /var/spool/greyhole/mem

Re: greyhole disk use app

Posted: Fri Apr 04, 2014 8:02 pm
by kcgr
After verifying all was updated I rebooted and watched the logmon:

Apr 04 22:02:12 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:488
Stack trace:
#0 /usr/bin/greyhole(506): DB::execute('SELECT COUNT(*)...', Array)
#1 /usr/bin/greyhole(4696): DB::getFirstValue('SELECT COUNT(*)...')
#2 /usr/bin/greyhole(3411): parse_samba_spool()
#3 /usr/bin/greyhole(3438): DaemonRunner->run()
#4 {main}
thrown; BT: greyhole[L488]
Apr 04 22:03:13 INFO daemon: Greyhole (version %VERSION%) daemon started.
Apr 04 22:03:13 INFO daemon: Optimizing MySQL tables...
Apr 04 22:03:15 DEBUG daemon: Loading metadata store backup directories...
Apr 04 22:03:15 DEBUG daemon: Found 2 directories in the settings table.
Apr 04 22:03:15 DEBUG daemon: Checking symlink at /usr/lib/samba/vfs/greyhole.so...
Apr 04 22:03:15 DEBUG daemon: Is OK.
Apr 04 22:03:15 DEBUG simplify_tasks: Simplifying pending tasks.
Apr 04 22:03:15 DEBUG sleep: Nothing to do... Sleeping.
Apr 04 22:03:25 DEBUG sleep: Nothing to do... Sleeping.

Re: greyhole disk use app

Posted: Fri Apr 04, 2014 8:23 pm
by bigfoot65
It appears as if everything is working fine now by the last log entries.

Not sure what the issue is with the PHP error though. Looks like maybe Greyhole tried to start before MySQL was started. If that is the case, then things should be fine now.

You might try installing an older version if the issue persists.

Re: greyhole disk use app

Posted: Sat Apr 05, 2014 8:45 am
by kcgr
The funny thing is that the disk usage app still gives the "#!/usr/bin/php -d open_basedir=/ " error. And that was before I updated greyhole. Shall I try a "greyhole --fsck"?

If I didn't check the logmon and the gh-du app, I'd not be curious.

thanks for the quick responses.
Kevin

Re: greyhole disk use app

Posted: Sat Apr 05, 2014 9:08 am
by bigfoot65
That could be a bug with the /usr/share/greyhole/web-app/index.php file. Recommend you try the following:

Code: Select all

sudo cp /usr/share/greyhole/web-app/index.php /var/hda/web-apps/gh-du/html sudo chown apache:users /var/hda/web-apps/gh-du/html/index.php
See if that makes a difference. I am guessing it may as the app copies the file from there.

I don't think doing greyhole -f is going to help, but you can try it.

Re: greyhole disk use app

Posted: Sat Apr 05, 2014 10:05 am
by kcgr
The first yielded:

cp: `/usr/share/greyhole/web-app/index.php' and `/var/hda/web-apps/gh-du/html/index.php' are the same file

the second had no output issue. The error is still there in gh-du. I have the greyhole -f pending a run after my weekly backup finishes. I'll keep an eye on it and will let it ride for a few days to see what happens.

Interestingly, I have 5 non-security updates I can apply, but after running upgrade (after update), I get this:

The following packages have been kept back:
linux-headers-generic-lts-quantal linux-image-generic-lts-quantal
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

May be unrelated.

have a good weekend.

Re: greyhole disk use app

Posted: Sat Apr 05, 2014 10:42 am
by bigfoot65
May be a Greyhole bug. Need to check their web site.

As for packages held back, you need to do:

Code: Select all

sudo apt-get dist-upgrade
That should install the pending updates. Might fix your Greyhole issue, but doubt it.

Re: greyhole disk use app

Posted: Thu Apr 10, 2014 7:05 pm
by kcgr
Just to followup. I posted the issue on the greyhole community and Guillaume noted that the "fatal error" was a typo in the code of the web app that is used to view space. Nothing critical. He did note the GH-DU app error shouldn't be showing PHP code. Here is the conversation if needed: https://getsatisfaction.com/greyhole/to ... solve_this