Greyhole wouldn't start after Amahi 6 upgrade

bt107
Posts: 88
Joined: Fri Aug 06, 2010 8:40 pm

Greyhole wouldn't start after Amahi 6 upgrade

Postby bt107 » Thu Mar 03, 2011 9:08 pm

Just a heads up. I just finished upgrading to Amahi 6 following the upgrade guide. When I checked the dashboard I noticed the Greyhole service wasn't running and it wouldn't start. Opened a terminal and typed

Code: Select all

greyhole --status
Got this reply

Code: Select all

Can't describe tasks with query: DESCRIBE tasks - Error: Table 'greyhole.tasks doesn't exist'


Searched the forum and found this

Code: Select all

mysql -u greyhole -pgreyhole greyhole < /usr/share/greyhole/schema-mysql.sql
I was then able to start Greyhole from the dashboard. All appears OK now. Just be aware that the Greyhole database may not convert well from Amahi 5.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby cpg » Thu Mar 03, 2011 11:07 pm

The script

Code: Select all

hda-upgrade-amahi5-to-amahi6​
is actually doing that. Did you run it??
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

tnorman
Posts: 10
Joined: Thu Feb 24, 2011 10:58 am

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby tnorman » Fri Mar 04, 2011 12:08 am

I'm having the same issue. I haven't tried the suggested mysql change, but I run hda-upgrade-amahi5-to-amahi6

I actually had a problem during the initial install and that script wouldn't do anything. Perhaps I just typed it wrong several times but it kept telling me it didn't exist. After Fedora 14 was up and running I tried it again when I saw that Amahi hadn't upgraded yet and I saw the upgrade happen. I've got greyhole 0.9.1 but I cannot get Greyhole to restart.

I've gone to the shares storage pool and changed a setting as the script says, but the greyhole service didn't restart yet.

Update: I just reran hda-upgrade-amahi5-to-amahi6 and again changed settings for the pool. Nothing. Greyhole is still offline.

inquam
Posts: 78
Joined: Sat Dec 11, 2010 12:22 pm

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby inquam » Fri Mar 04, 2011 1:35 am

I had the same issue and just found the solution for me. Before the upgrade when my Amahi was still on F12 I had converted to using mysql as the storage for greyhole already by running

Code: Select all

/usr/share/greyhole/db_migration-sqlite2mysql.sh
Not sure if the fact that I already had the tables in question screwed up the upgrade script or not but after the upgrade my greyhole database had no tables in it.
I tried running hda-upgrade-amahi5-to-amahi6 again but no luck.

I then reverted back to using the sqlite to mysql migration script and although it complained about the fact that the users for greyhole already existed etc it created the tables and I was good to go.

Code: Select all

[root@localhost ~]# /usr/share/greyhole/db_migration-sqlite2mysql.sh Stopping Greyhole service watchdog... Reloading monit: Reinitializing monit daemon Done. Stopping Greyhole service... Shutting down Greyhole: [ OK ] Done. Creating MySQL database and user... hda-create-db-and-user: creating greyhole ERROR 1396 (HY000) at line 2: Operation CREATE USER failed for 'greyhole'@'localhost' Done. Modifying Greyhole configuration to use MySQL... Done. Migrating data from SQLite to MySQL... Error: unknown command or invalid arguments: "dump". Enter ".help" for help Done. Starting Greyhole service... Starting Greyhole ... [ OK ] Done. Starting Greyhole service watchdog... Reloading monit: Reinitializing monit daemon Done. [root@localhost ~]# /usr/share/greyhole/db_migration-sqlite2mysql.sh ^C [root@localhost ~]# fg mysql -u greyhole -p show tables; +--------------------+ | Tables_in_greyhole | +--------------------+ | settings | | tasks | | tasks_completed | +--------------------+ 3 rows in set (0.00 sec) mysql> quit Bye
Not sure if the sqlite to mysql migration script is avalibe in Amahi6, otherwise you should probably be able to create the tables manually by logging into mysql, selecting the greyhole database and running the queries

Code: Select all

CREATE TABLE `settings` ( `name` tinytext NOT NULL, `value` text NOT NULL, PRIMARY KEY (`name`(255)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1

Code: Select all

CREATE TABLE `tasks` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `action` varchar(10) NOT NULL, `share` tinytext NOT NULL, `full_path` tinytext, `additional_info` tinytext, `complete` enum('yes','no','frozen','thawed','idle') NOT NULL, `event_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `find_next_task` (`complete`,`share`(64),`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1

Code: Select all

CREATE TABLE `tasks_completed` ( `id` bigint(20) unsigned NOT NULL, `action` varchar(10) NOT NULL, `share` tinytext NOT NULL, `full_path` tinytext, `additional_info` tinytext, `complete` enum('yes','no') NOT NULL, `event_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=MyISAM DEFAULT CHARSET=latin1
My HDA: Q6400, 8GB ram, 2x1TB disk in raid 1 for system drive, 6x2TB drives for storage

bt107
Posts: 88
Joined: Fri Aug 06, 2010 8:40 pm

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby bt107 » Fri Mar 04, 2011 3:43 am

The script

Code:
hda-upgrade-amahi5-to-amahi6​


is actually doing that. Did you run it??
I did. I did every step in the F12 to F14 upgrade guide.

Amahi 6 has been running all night and all appears to be OK this morning.

EDIT: I had also already run the script to convert the database to Mysql.

tnorman
Posts: 10
Joined: Thu Feb 24, 2011 10:58 am

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby tnorman » Fri Mar 04, 2011 1:14 pm

I tried running

Code: Select all

mysql -u greyhole -pgreyhole greyhole < /usr/share/greyhole/schema-mysql.sql
but I just got an error saying I didn't have access to mysql

So I tried inquam's suggestion and got more errors.

Code: Select all

[root@normahi~]# /usr/share/greyhole/db_migration-sqlite2mysql.sh Stopping Greyhole service watchdog... Reloading monit: Reinitializing monit daemon Done. Stopping Greyhole service... Shutting down Greyhole: [ OK ] Done. Creating MySQL database and user... hda-create-db-and-user: creating greyhole ERROR 1396 (HY000) at line 2: Operation CREATE USER failed for 'greyhole'@'localhost' Done. Modifying Greyhole configuration to use MySQL... Done. Migrating data from SQLite to MySQL... Error: unknown command or invalid arguments: "dump". Enter ".help" for help Done. Starting Greyhole service... Starting Greyhole ... [ OK ] Done. Starting Greyhole service watchdog... Reloading monit: Reinitializing monit daemon Done.
Greyhole still wasn't starting. I rebooted and after reading some fedora/mysql stuff online I decided to just try starting the mysqld service from the command line. It started. Then I started greyhole service and it started. And it has been running without issue since. I've rebooted a couple times since then and have transfered some files to test to see if things were actually working.

Appears all is ok, though I'm not sure why.

hypertense
Posts: 51
Joined: Thu Jan 27, 2011 3:53 pm

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby hypertense » Sun Mar 13, 2011 4:28 am

I had the same problem and tried all the above. The last post by tnorman worked for me.

As root I ran

sudo service mysqld start
sudo chkconfig mysqld on

Then I restarted Greyhole and it worked. It seems that somewhere in the upgrade from Fedora 12 to Fedora 14 the service to restart mysql on reboot wasn't installed properly.

Interestingly, before the problem was fixed the Amahi dashboard showed that the MySQL DB was running, which was why I didn't immediately think that this was the problem.

hypertense

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby cpg » Tue Mar 22, 2011 4:12 am

This is quite puzzling. How would the mysqld service stopped from starting?

Is it possible that it was accidentally turned off from the Setup > Settings > Servers?

Seems puzzling ... perhaps something in the upgrade process caused this to go haywire?
Perhaps retrieving the upgrade log?
(Not sure where it is, actually)
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

speeker
Posts: 3
Joined: Fri Mar 25, 2011 6:43 am

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby speeker » Fri Mar 25, 2011 6:49 am

Bump...

I am having this same issue since I upgraded to Amahi 6. :cry:

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Greyhole wouldn't start after Amahi 6 upgrade

Postby cpg » Fri Mar 25, 2011 12:26 pm

you can try:

Code: Select all

hda-create-db-and-user greyhole mysql -u greyhole -pgreyhole greyhole < /usr/share/greyhole/schema-mysql.sql
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 17 guests