PDA

View Full Version : Startup issues...



gregh
2007-09-12, 14:59
Hi there,

I'm getting problems trying to start slimserver at boot time on a Terastation.

I have mysql running fine, and the script itself works fine if I log in as a user with admin privileges and manually run it.

However when run at start time by creating this link:

ln -s /etc/init.d/slimserver /etc/rc.d/rc3.d/S100slimserver

It gives me these errors in the log file.

I've read the instructions on possible permissions problems and done all 3 of these:

mysql> grant all on slimserver.* to slimserver identified by 'slimserver_password';
Query OK, 0 rows affected (0.04 sec)

mysql> grant all on slimserver.* to 'slimserver'@'localhost' identified by 'slimserver_password';
Query OK, 0 rows affected (0.00 sec)

mysql> set password for 'slimserver'@'localhost' = old_password ('new_password');

mysql> flush privileges;

Is there anyway I can check these settings have "stuck"?

The error I get is as follows. The mysql.sock file is there, and has these permissions

srwxrwxrwx 1 mysql mysql 0 Sep 12 22:53 /tmp/mysql.sock

The log shows:

2007-09-12 22:53:02.9774 ERROR: DBI Connection failed: DBI connect('database=slimserver','slimserver',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /mnt/array1/SlimServer_v6.5.4/CPAN/DBIx/Class/Storage/DBI.pm line 652

2007-09-12 22:53:02.9950 ERROR: Backtrace follows:

2007-09-12 22:53:02.9973 Backtrace:
frame 0: Slim::Schema::Storage::throw_exception (/mnt/array1/SlimServer_v6.5.4/CPAN/DBIx/Class/Storage/DBI.pm line 658)
frame 1: DBIx::Class::Storage::DBI::_connect (/mnt/array1/SlimServer_v6.5.4/CPAN/DBIx/Class/Storage/DBI.pm line 616)
frame 2: DBIx::Class::Storage::DBI::_populate_dbh (/mnt/array1/SlimServer_v6.5.4/CPAN/DBIx/Class/Storage/DBI.pm line 543)
frame 3: DBIx::Class::Storage::DBI::ensure_connected (/mnt/array1/SlimServer_v6.5.4/Slim/Schema/Storage.pm line 28)
frame 4: (eval) (/mnt/array1/SlimServer_v6.5.4/Slim/Schema/Storage.pm line 28)
frame 5: Slim::Schema::Storage::dbh (/mnt/array1/SlimServer_v6.5.4/Slim/Schema.pm line 118)
frame 6: Slim::Schema::init (/mnt/array1/SlimServer_v6.5.4/Slim/Music/Info.pm line 71)
frame 7: Slim::Music::Info::init (/mnt/array1/SlimServer_v6.5.4/slimserver.pl line 373)
frame 8: main::init (/mnt/array1/SlimServer_v6.5.4/slimserver.pl line 450)
frame 9: main::main (/mnt/array1/SlimServer_v6.5.4/slimserver.pl line 1076)

2007-09-12 22:53:02.9998 ERROR: Couldn't connect to database! Fatal error: [No such file or directory] Exiting!

kdf
2007-09-12, 15:05
fine the slimserver.pref file (likely /etc/slimserver.pref)

you'll need to edit a few lines:

dbsource: dbi:mysql:database=SlimServer;mysql_socket=/var/run/mysqld/mysqld.sock

dbusername: slimserver
dbpassword: slimserver_password

of course, this assumes /var/run/mysqld/mysqld.sock exists on your system. If not, you'll have to find the one that the system mysql creates.

-kdf

gregh
2007-09-14, 06:42
thanks alot, there is no mysqld.sock anywhere on the system, that I can see!

root@TERADATA:~# find / -name *.sock -print
/tmp/mysql.sock

The relevant areas of my prefs file are now :

dbpassword: password
dbsource: dbi:mysql:database=slimserver;mysql_socket=/tmp/mysql.sock
dbusername: slimserver

But still the same error on startup, and manually firing off the script still works!


thanks,

Greg

SteveEast
2007-09-14, 20:41
Are you sure that mysql is starting before SS? I see your SS startup script is S100slimserver - I've only ever seen two digit numbers in these scripts, so perhaps this is being taken as 10 rather than 100. You could try using S99slimserver.

Steve.

gregh
2007-09-16, 02:22
Well that may have been it Steve!

I did a full rebuild of Slim and made it S99slimserver, rebooted and voila!

Now all issues are sorted I looked forward to my Squeezebox arriving :)

Cheers,

Greg