greyhole disk use app

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

greyhole disk use app

Postby kcgr » Fri Apr 04, 2014 6:16 pm

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

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

Re: greyhole disk use app

Postby bigfoot65 » Fri Apr 04, 2014 6:44 pm

Need additional information.

What Amahi version/OS?

Have OS updates been applied?

What version of Greyhole?
ßîgƒσστ65
Applications Manager

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

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

Re: greyhole disk use app

Postby kcgr » Fri Apr 04, 2014 7:57 pm

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

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

Re: greyhole disk use app

Postby kcgr » Fri Apr 04, 2014 8:02 pm

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.

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

Re: greyhole disk use app

Postby bigfoot65 » Fri Apr 04, 2014 8:23 pm

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.
ßîgƒσστ65
Applications Manager

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

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

Re: greyhole disk use app

Postby kcgr » Sat Apr 05, 2014 8:45 am

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

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

Re: greyhole disk use app

Postby bigfoot65 » Sat Apr 05, 2014 9:08 am

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.
ßîgƒσστ65
Applications Manager

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

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

Re: greyhole disk use app

Postby kcgr » Sat Apr 05, 2014 10:05 am

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.

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

Re: greyhole disk use app

Postby bigfoot65 » Sat Apr 05, 2014 10:42 am

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.
ßîgƒσστ65
Applications Manager

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

kcgr
Posts: 38
Joined: Fri Jun 21, 2013 2:26 pm

Re: greyhole disk use app

Postby kcgr » Thu Apr 10, 2014 7:05 pm

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

Who is online

Users browsing this forum: No registered users and 29 guests