Bugzilla – Bug 9163
windows service fails to start on boot
Last modified: 2008-08-15 10:08:22 UTC
On boot I'll get a message saying at least 1 service didn't start. When I log in and go to services.msc, SqueezeMySQL says "stopping" (it never does finish stopping no matter how long I wait), and SqueezeCenter isn't running. I have to kill mysqld.exe and then start SqueezeCenter to get it working. Since this is a server, I normally wouldn't log onto the machine, but whenever it reboots, I have no choice because of this problem. I've had this problem for the last couple of years probably. Every time a new release comes out I think "I bet it's fixed this time" but of course it hasn't been. I've finally gotten sick and tired enough to report it! Great product otherwise. I'd be glad to do anything you want to help troubleshoot it or get more data for you.
Could you please upload server.log and whatever Windows' event viewer says about the failure? Is this something you've seen with various versions or just the latest build? What _exact_ version are you using?
Only thing I see in the event viewer (system log) on startup is one item: The SqueezeMySQL service was successfully sent a stop control. Nothing else related to SqueezeCenter (not even success messages). I went looking for a log file before filing this defect, but couldn't find any. Just double checked. No server.log file exists. If you can tell me how to generate one I'll gladly do it. I'm now using 7.1 (just downloaded tonight), as the bug report states. Like I said, this problem has occurred for at least a year and possibly even 2. I always upgrade, so this has existed over many releases.
Just a thought... did you configure SC to run as a service at all? You'll have to use the startup helper app (from the start menu) to configure it to run as a service. You'll see the path to the log files in Settings/Status. One more thing: this isn't a domain controller, is it?
(In reply to comment #3) > Just a thought... did you configure SC to run as a service at all? You'll have > to use the startup helper app (from the start menu) to configure it to run as a > service. > > You'll see the path to the log files in Settings/Status. > > One more thing: this isn't a domain controller, is it? > Yes, it's configured to run as a service. And yes, this IS a domain controller. Here is the relevant section of the log (I was looking in Program Files before): [08-08-14 21:12:00.5781] Slim::Schema::Storage::throw_exception (70) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (10061) at C:\Program Files\SqueezeCenter\server\CPAN/DBIx/Class/Storage/DBI.pm line 652 [08-08-14 21:12:00.5897] Slim::Schema::Storage::throw_exception (70) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (C:/Program Files/SqueezeCenter/server/Slim/Schema/Storage.pm line 70) frame 1: Slim::Schema::Storage::throw_exception (C:\Program Files\SqueezeCenter\server\CPAN/DBIx/Class/Storage/DBI.pm line 658) frame 2: DBIx::Class::Storage::DBI::_connect (C:\Program Files\SqueezeCenter\server\CPAN/DBIx/Class/Storage/DBI.pm line 616) frame 3: DBIx::Class::Storage::DBI::_populate_dbh (C:\Program Files\SqueezeCenter\server\CPAN/DBIx/Class/Storage/DBI.pm line 543) frame 4: DBIx::Class::Storage::DBI::ensure_connected (C:/Program Files/SqueezeCenter/server/Slim/Schema/Storage.pm line 29) frame 5: (eval) (C:/Program Files/SqueezeCenter/server/Slim/Schema/Storage.pm line 29) frame 6: Slim::Schema::Storage::dbh (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Schema.pm line 131) frame 7: Slim::Schema::init (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Music/Info.pm line 76) frame 8: Slim::Music::Info::init (slimserver.pl line 355) frame 9: main::init (slimserver.pl line 42) frame 10: PerlSvc::Startup (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>PerlSvc.pm line 95) frame 11: PerlSvc::_startup (slimserver.pl line 0) frame 12: (eval) (slimserver.pl line 0) [08-08-14 21:12:00.6547] Slim::Schema::init (134) Error: Couldn't connect to database! Fatal error: [Bad file descriptor] Exiting! [08-08-14 21:12:00.6556] Slim::Schema::init (134) Backtrace: frame 0: Slim::Utils::Log::logBacktrace (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Schema.pm line 134) frame 1: Slim::Schema::init (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Music/Info.pm line 76) frame 2: Slim::Music::Info::init (slimserver.pl line 355) frame 3: main::init (slimserver.pl line 42) frame 4: PerlSvc::Startup (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>PerlSvc.pm line 95) frame 5: PerlSvc::_startup (slimserver.pl line 0) frame 6: (eval) (slimserver.pl line 0) [08-08-14 21:12:00.6564] Slim::Schema::forceCommit (1483) Warning: Trying to commit transactions before DB is initialized!
Don't run SC on a domain controller unless you really know what you're doing. It requires special permissions on the Windows side which we can't manage from the installer. MS is rather stringent about running services on a domain controller. I think you'd have to manipulate the user who's running the SC server service, because otherwise it won't be allowed to access your music files, start other tasks (like eg. MySQL) etc. I'm sure it can be done - but I'm sorry, we can't support running SC on a Windows domain controller. Maybe you'll find help in a forum or newsgroup. Thanks for your understanding.
I think it would be great if we could get some basic instructions on how to get it working up on our wiki.
But it runs just fine *after* boot up. Like I said, I've been doing this for years with no problem other than that it doesn't start at boot. Once I restart it, it works without flaw. I really don't think my problem has anything to do with it being on a DC. I hope you'll reconsider and examine the log I gave you. I can understand not supporting running on a DC, but please consider at least doing a bit of investigation before writing it off. :) And Dean, I don't believe I did anything special other than run the tool to configure it as a service. But if you have any specific questions I'd be glad to help out in any way I can. Especially if you guys try to fix the boot failure. ;)
Hmm... I did look at the log and thought this was SC failing to start MySQL, lack of permissions. But if you say it does work once logged in, I don't understand. Wouldn't it start if you did a "net start squeezecenter \\yourmachine" (don't remember the exact syntax - sorry), starting the service from a distant machine?
Seems to me that the problem is more with mysql than with squeezecenter. Like I said originally, when I log in and check the services mmc, it states that the mysql service is "stopping". It seems to stay in that state indefinitely, and I have to kill the process from the task manager. Once I do that I can start the squeezecenter service no problem. Is there perhaps a way to get more log info on what's happening with mysql specifically? I could try remotely starting the service (I'd have to set the services to manual to avoid the mysql problem), but frankly that's not a whole lot easier than using remote desktop to log into the server and get it going. My server from day 1 has taken like 10 minutes just to shut down, so on a reboot it means I have to come back at a later time to fix squeezecenter. Kind of annoying! BTW, I did search the forums and found a reference to someone else having squeezecenter or slimserver fail on boot, but of course that person apparently had no solution.