Summary: | media-sound/squeezeboxserver-7.5.1 fails to connect to database | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Liriel <lassi> |
Component: | Current packages | Assignee: | Joe Peterson (RETIRED) <lavajoe> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | stuart |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Liriel
2010-08-15 15:50:09 UTC
Sorry you're having trouble. There might be a problem with the database connection, but I think it might be a red-herring. I think the first thing to understand is the report that something already has port 9090 open - you shouldn't see that error if everything is working OK. Can you run the following command, which should print details of the process that has that port open: lsof -i TCP:9090 Before you try to start the server there should be nothing with that port open, which should therefore print nothing. As an example, on my server it prints the following when the server is running OK: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME perl 1859 squeezeboxserver 10u IPv4 3602 0t0 TCP *:9090 (LISTEN) Sorry - should have mentioned that you might need to "emerge lsof" if the command isn't found. Thanks for the hint! lsof showed that XBMC was using port 9090 (for some JSON RPC interface I guess): # lsof -i TCP:9090 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME xbmc.bin 14004 xbmc 29u IPv4 674818 0t0 TCP ariel.lassi.net:9090 (LISTEN) but the DB connection error still occours as soon as the wizard is finished... here's the latest log: [10-08-16 08:36:44.3365] main::init (323) Starting Squeezebox Server (v7.5.1, r30836, Tue Jun 1 07:00:00 MDT 2010) perl 5.012001 [10-08-16 08:39:07.8311] Slim::Schema::Storage::throw_exception (82) Error: DBI Connection failed: DBI connect('database=squeezeboxserver;mysql_socket=/var/run/mysqld/mysqld.sock','squeezeboxserver',...) failed: Access denied for user 'squeezeboxserver'@'localhost' (using password: YES) at /usr/lib64/perl5/vendor_perl/5.12.1/DBIx/Class/Storage/DBI.pm line 1052 [10-08-16 08:39:07.8325] Slim::Schema::Storage::throw_exception (82) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema/Storage.pm line 82) frame 1: Slim::Schema::Storage::throw_exception (/usr/lib64/perl5/vendor_perl/5.12.1/DBIx/Class/Storage/DBI.pm line 1076) frame 2: DBIx::Class::Storage::DBI::_connect (/usr/lib64/perl5/vendor_perl/5.12.1/DBIx/Class/Storage/DBI.pm line 906) frame 3: DBIx::Class::Storage::DBI::_populate_dbh (/usr/lib64/perl5/vendor_perl/5.12.1/DBIx/Class/Storage/DBI.pm line 842) frame 4: DBIx::Class::Storage::DBI::ensure_connected (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema/Storage.pm line 41) frame 5: (eval) (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema/Storage.pm line 41) frame 6: Slim::Schema::Storage::dbh (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema.pm line 290) frame 7: Slim::Schema::_connect (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema.pm line 126) frame 8: Slim::Schema::init (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/Import.pm line 744) frame 9: Slim::Music::Import::_checkLibraryStatus (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/Import.pm line 677) frame 10: Slim::Music::Import::useImporter (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/MusicFolderScan.pm line 48) frame 11: Slim::Music::MusicFolderScan::init (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Utils/Prefs.pm line 769) frame 12: Slim::Utils::Prefs::__ANON__ (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Utils/Prefs/Base.pm line 307) frame 13: Slim::Utils::Prefs::Base::set (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/Settings/Server/Wizard.pm line 106) frame 14: Slim::Web::Settings::Server::Wizard::handler (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 1118) frame 15: Slim::Web::HTTP::generateHTTPResponse (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 924) frame 16: Slim::Web::HTTP::processURL (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 735) frame 17: Slim::Web::HTTP::processHTTP (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 139) frame 18: (eval) (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 123) frame 19: Slim::Networking::IO::Select::__ANON__ (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 183) frame 20: (eval) (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 183) frame 21: Slim::Networking::IO::Select::loop (/usr/sbin/squeezeboxserver line 627) frame 22: main::idle (/usr/sbin/squeezeboxserver line 581) frame 23: main::main (/usr/sbin/squeezeboxserver line 1073) [10-08-16 08:39:07.8337] Slim::Schema::init (129) Error: Couldn't connect to database! Fatal error: [] Exiting! [10-08-16 08:39:07.8348] Slim::Schema::init (129) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Schema.pm line 129) frame 1: Slim::Schema::init (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/Import.pm line 744) frame 2: Slim::Music::Import::_checkLibraryStatus (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/Import.pm line 677) frame 3: Slim::Music::Import::useImporter (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Music/MusicFolderScan.pm line 48) frame 4: Slim::Music::MusicFolderScan::init (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Utils/Prefs.pm line 769) frame 5: Slim::Utils::Prefs::__ANON__ (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Utils/Prefs/Base.pm line 307) frame 6: Slim::Utils::Prefs::Base::set (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/Settings/Server/Wizard.pm line 106) frame 7: Slim::Web::Settings::Server::Wizard::handler (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 1118) frame 8: Slim::Web::HTTP::generateHTTPResponse (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 924) frame 9: Slim::Web::HTTP::processURL (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Web/HTTP.pm line 735) frame 10: Slim::Web::HTTP::processHTTP (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 139) frame 11: (eval) (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 123) frame 12: Slim::Networking::IO::Select::__ANON__ (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 183) frame 13: (eval) (/usr/lib64/perl5/vendor_perl/5.12.1/Slim/Networking/IO/Select.pm line 183) frame 14: Slim::Networking::IO::Select::loop (/usr/sbin/squeezeboxserver line 627) frame 15: main::idle (/usr/sbin/squeezeboxserver line 581) frame 16: main::main (/usr/sbin/squeezeboxserver line 1073) (In reply to comment #3) > but the DB connection error still occours as soon as the wizard is finished... Are you definitely sure the --config step was run OK? Try the following command - this should try to connect to MySQL with the same method, username and password that SBS will try: mysql -S /var/run/mysqld/mysqld.sock --user=$(grep ^dbusername /etc/squeezeboxserver/prefs/server.prefs | cut -d' ' -f2) --password=$(grep ^dbpassword /etc/squeezeboxserver/prefs/server.prefs | cut -d' ' -f2) Does that connect OK? If not, you can try re-running the --config step and putting in a new username and password: emerge --config =media-sound/squeezeboxserver-7.5.1 (In reply to comment #4) Thank you for pointing out the /etc/squeezeboxserver/prefs/server.prefs file. It seems that emerge --config only changes /etc/squeezeboxserver/squeezeboxserver.prefs. I changed the password in the server.prefs file and everything works as expected. Thanks again for your help! (In reply to comment #5) > (In reply to comment #4) > > Thank you for pointing out the /etc/squeezeboxserver/prefs/server.prefs file. > It seems that emerge --config only changes > /etc/squeezeboxserver/squeezeboxserver.prefs. > > I changed the password in the server.prefs file and everything works as > expected. > > Thanks again for your help! > Thanks for the report - yes I think there's a bug with the --config step. I've made a note of that and will update it for the next version of the ebuild - thanks for looking into it. |