Page 1 of 1

Can't open Amahi dashboard, suspect MySQL error

Posted: Thu Jan 20, 2011 6:30 am
by ralfb
Hello,

When trying to access the dashboard all I see is Ruby On Rails error messages as below.

My O/S drive is full.

I can not copy anything to the HDA.

Will appreciate your help.


thanks,

Ralf

Here is the error message:


There appears to be a database problem.

*
Your config/database.yml may not be written correctly. Please check it and fix any errors.
*
Your database schema may be out of date or nonexistant. Please run rake db:migrate to ensure that the database schema is up-to-date.
*
The database server may not be running. Please check whether it's running, and start it if it isn't.

Error message:

Mysql::Error: Got error 28 from storage engine: SHOW FIELDS FROM `settings` (ActiveRecord::StatementInvalid)

Exception class:

ActiveRecord::StatementInvalid

Application root:
/var/hda/platform/html

Backtrace:
# File Line Location
0 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract_adapter.rb 219 in `log'
1 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb 319 in `execute'
2 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb 465 in `columns'
3 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1271 in `columns'
4 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1284 in `column_names'
5 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1297 in `column_methods_hash'
6 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1986 in `all_attributes_exists?'
7 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `all?'
8 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1986 in `each'
9 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1986 in `all?'
10 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1986 in `all_attributes_exists?'
11 /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb 1842 in `method_missing'
12 /var/hda/platform/html/app/models/setting.rb 23 in `get'
13 /var/hda/platform/html/lib/router-driver.rb 31
14 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
15 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
16 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb 158 in `require'
17 /var/hda/platform/html/app/models/firewall.rb 17
18 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
19 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
20 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb 158 in `require'
21 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb 265 in `require_or_load'
22 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb 224 in `depend_on'
23 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb 136 in `require_dependency'
24 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 414 in `load_application_classes'
25 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 413 in `each'
26 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 413 in `load_application_classes'
27 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 411 in `each'
28 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 411 in `load_application_classes'
29 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 197 in `process'
30 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 113 in `send'
31 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb 113 in `run'
32 /var/hda/platform/html/config/environment.rb 9
33 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
34 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb 31 in `require'
35 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 303 in `preload_application'
36 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 252 in `initialize_server'
37 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/utils.rb 255 in `report_app_init_status'
38 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 237 in `initialize_server'
39 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 194 in `start_synchronously'
40 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 163 in `start'
41 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb 213 in `start'
42 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application'
43 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add'
44 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application'
45 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
46 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
47 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application'
48 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 154 in `spawn_application'
49 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application'
50 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 352 in `__send__'
51 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 352 in `main_loop'
52 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb 196 in `start_synchronously'
53 /usr/lib/phusion_passenger/passenger-spawn-server

Re: Can't open Amahi dashboard, suspect Greyhole and MySQL e

Posted: Thu Jan 20, 2011 9:47 am
by gboudreau
(Moved to general forum; this is not Greyhole-related.)

Re: Can't open Amahi dashboard, MySQL error etc

Posted: Thu Jan 20, 2011 10:08 am
by ralfb
ok, many thanks,

Ralf

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Thu Jan 20, 2011 11:15 am
by radioz
Is your drive really full?

Post the output of 'df -h'

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Fri Jan 21, 2011 5:10 am
by ralfb
Sure thanks,

Code: Select all

[root@padme drive4]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_padme-lv_root 70G 67G 0 100% / tmpfs 2.0G 272K 2.0G 1% /dev/shm /dev/sdb1 194M 39M 146M 21% /boot /dev/sdc5 1.8T 1.7T 56G 97% /var/hda/files/drives/drive1 /dev/sdd5 1.8T 1.7T 56G 97% /var/hda/files/drives/drive2 /dev/sde5 1.8T 1.7T 56G 97% /var/hda/files/drives/drive3 /dev/sda5 1.8T 196M 1.8T 1% /var/hda/files/drives/drive4 //127.0.0.1/docs 3.2T 1.3T 2.0T 40% /mnt/samba/docs //127.0.0.1/janet 3.2T 1.3T 2.0T 40% /mnt/samba/janet //127.0.0.1/Janet 3.2T 1.3T 2.0T 40% /mnt/samba/Janet //127.0.0.1/Movies_Best 3.2T 1.3T 2.0T 40% /mnt/samba/Movies_Best //127.0.0.1/music 3.2T 1.3T 2.0T 40% /mnt/samba/music //127.0.0.1/Music 3.2T 1.3T 2.0T 40% /mnt/samba/Music //127.0.0.1/Office 70G 70G 0 100% /mnt/samba/Office //127.0.0.1/Ralf 7.2T 5.3T 2.0T 74% /mnt/samba/Ralf //127.0.0.1/torrents 70G 70G 0 100% /mnt/samba/torrents //127.0.0.1/Torrents 70G 70G 0 100% /mnt/samba/Torrents funionfs 70G 67G 0 100% /var/hda/apps/ushare/files [root@padme drive4]#
Ralf

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Fri Jan 21, 2011 6:14 am
by bigfoot65
The only way to fix it that I know is to boot up using a Live CD for Fedora, then remove some files from the root partition.

Once you do this and you can SSH into your box, you can remove that partition from greyhole. There are commands to use to tell greyhole that partition is leaving and it will begin moving files from it.

It is a bad idea to use the root partition for greyhole as it fills up quickly, then you are stuck. Happened to me and this is how I got it back.

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Fri Jan 21, 2011 6:53 am
by gboudreau
(Bigfoot65: his / partitions isn't in the pool, but it's still used as the temporary landing zone for new files, before GH moves the files into the pooled drives.)

ralfb: the error you pasted seems to be that the settings table from the amahi database is broken.
Try to fix it like you fixed the Greyhole tables:

Code: Select all

mysql -u root -phda -e "repair table settings" hda_production

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Fri Jan 21, 2011 7:02 am
by bigfoot65
Oh, sorry guess I missed that part.

Re: Can't open Amahi dashboard, suspect MySQL error

Posted: Sat Jan 22, 2011 9:50 am
by lou1z
definetely have to move files off the root.
i've had this before.
if /dev/mapper/vg_padme-lv_root
70G 67G 0 100% /
gets to 100%, mysql & ruby will kick these errors up.
clear some files off the root and it will start. this has happened to me 2 or 3 times in the past.
look at your torrents and see what you can get rid of from there.