PDA

View Full Version : Yet Another Error from SC7 server.log



AndrewFG
2008-03-17, 02:18
I seem to be getting no end of errors in server.log -- the current one is listed below.

Any ideas what is causing it and how to fix it?

Transporter 36, SC7.0 (running as service), Vista 32 bit



[08-03-16 21:57:13.3857] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!
[08-03-16 21:57:15.1984] Slim::Schema::Storage::throw_exception (67) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver','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-03-16 21:57:15.2908] Slim::Schema::Storage::throw_exception (67) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (C:/Program Files/SqueezeCenter/server/Slim/Schema/Storage.pm line 67)
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 27)
frame 5: (eval) (C:/Program Files/SqueezeCenter/server/Slim/Schema/Storage.pm line 27)
frame 6: Slim::Schema::Storage::dbh (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Schema.pm line 244)
frame 7: (eval) (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/Schema.pm line 244)
frame 8: Slim::Schema::disconnect (slimserver.pl line 964)
frame 9: main::cleanup (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/bootstrap.pm line 368)
frame 10: Slim::bootstrap::sigint (/<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>Slim/bootstrap.pm line 402)
frame 11: Slim::bootstrap::theEND (slimserver.pl line 1001)
frame 12: main::END (slimserver.pl line 0)
frame 13: (eval) (slimserver.pl line 0)

mherger
2008-03-17, 02:29
> Any ideas what is causing it and how to fix it?

MySQL seems to have died away. Can you restart SC?

Michael

AndrewFG
2008-03-17, 07:14
MySQL seems to have died away.
Aha.

I have SC7 configured so that it starts as a service under Windows Vista.

Earlier I was getting error messages that the MySql service had not started. I fixed this by having the MySQL service start automatically and the SqueezeCenter service start automatic delayed.

But now I get these other errors indicating (as you suggest) that the relationship between SqueezeCenter and MySql is still not right...

I wonder if it is due to folder access privileges? I created a special account on my PC for use by SqueezeCenter. It is a non admin account (I don't want to give third party software admin rights), it does have access priviliges to my Music folder and my iTunes folder. But perhaps I need to give it privileges for some other places too?

mherger
2008-03-17, 08:13
> I wonder if it is due to folder access privileges?

Why don't you just run SC7 in a default installation for a while. Then, when everything shows it's working, start tweaking. I promise you, we won't spy your system if you run SC as the default SYSTEM user...

--

Michael

AndrewFG
2008-03-17, 10:03
Why don't you just run SC7 in a default installation for a while. Then, when everything shows it's working, start tweaking. I promise you, we won't spy your system if you run SC as the default SYSTEM user...
Ok. However, if I do this, then I still need to explicitly let SYSTEM have access to my Music and iTunes folders, right?

mherger
2008-03-17, 10:12
>> Why don't you just run SC7 in a default installation for a while. Then,
>> when everything shows it's working, start tweaking. I promise you, we
>> won't spy your system if you run SC as the default SYSTEM user...
> Ok. However, if I do this, then I still need to explicitly let SYSTEM
> have access to my Music and iTunes folders, right?

Unless you've changed the folder's permissions, SYSTEM has access to any local resource.

--

Michael

AndrewFG
2008-03-18, 00:57
I tried using SYSTEM rather than a specific account, but this did not make any difference.

However in the meantime I discovered that the problem is caused when shutting down the PC. At the moment of shutdown I get the following message:



[08-03-17 21:37:44.9444] Slim::Schema::Storage::throw_exception (67) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver','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


Followed by this:



[08-03-17 21:38:07.3497] Slim::Utils::MySQLHelper::stopServer (382) FATAL: Server didn't shutdown in 20 seconds!
[08-03-17 21:38:07.3506] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!
[08-03-17 21:38:08.3498] Slim::Schema::Storage::throw_exception (67) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver','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


I am running SqueezeCenter as a service.

We have previously established that the SqueezeCenter Startup Options utility (7.0) does not properly install a dependency between the SqueezeCentre service and the SqueezeSql service.

So I guess that when shutting down the computer the OS is stopping the SqueezeSql service before stopping the SqueezeCenter service, and thus causing the latter to report the above database disconnect errors.

Am I right? And if so is there a fix?

AndrewFG
2008-03-22, 09:49
Ping! .

mbonsack
2008-03-22, 16:30
Ping! .

I get this in my server log running under Ubuntu 7.10 at *shutdown* time, not startup. I never have solved it, but SC7 seems to run just fine...

AndrewFG
2008-03-23, 03:59
I get this in my server log running under Ubuntu 7.10 at *shutdown* time, not startup.

Indeed. It is the same for me.

By reading through the source code, I found out that SlimServer is calling the the following methods on shutdown:


main.stopServer
-> main.cleanup
--> schema.disconnect
---> storage.dbh
----> dbi.ensure_connected
-----> dbi._populate_dbh
------> dbi._connect
-------> bang!!


In other words, when the server stops, it tries to cleanup everything, and in the process it attempts to *connect* to the database, which since it has already been closed, crashes the application.

This is obviously a bug. Indeed it is not fatal since the application is closing anyway. But it is still a bug, and it needs to be fixed.

AndrewFG
2008-03-23, 04:03
PS when the server shuts down it sometimes follows another code route, with the same effect...



main.end
-> bootstrap.theEnd
--> bootstrap.sigint
---> main.cleanup
---> schema.disconnect
----> storage.dbh
-----> dbi.ensure_connected
------> dbi._populate_dbh
-------> dbi._connect
--------> bang!!

th00ht
2008-03-26, 14:22
I have exactly the same error message on Win2003. In fact it is reproducable when rebooting the machine normally. SC7 does start when manually starting the service. This means that it is not a access rights problem.

Btw. The machine is also Active Directory server.

mherger
2008-03-27, 00:28
> I have exactly the same error message on Win2003. In fact it is

Exactly _what_ message? I'm seeing quite a few in this thread.

> Btw. The machine is also Active Directory server.

Consider this an unexpected environment... But I still would expect it to run. A DC does have some more serious restrictions. Are you trying to run SC as a given user? AFAIK only domain users can log on to a DC. Thus running SC as a user without domain admin privileges might fail.

--

Michael

andyg
2008-03-28, 14:32
Thanks guys, this bug should be fixed.

malikarshad
2008-04-04, 18:16
Thanks guys, this bug should be fixed.
Is it already fixed or will be fixed.
Can you please clarify?


I have the same problem when restarting the PC and I had download the SC7 on March 20th.

Its really frustrating as I have my Duet in the basement and my PC is on 3rd floor. Everytime I have to restart SC7 after it fails to start.
[Server.log]
[08-04-04 19:23:48.8438] Slim::Schema::Storage::throw_exception (67) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (10061) at C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 652
[08-04-04 19:23:48.8441] Slim::Schema::Storage::throw_exception (67) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 67)
frame 1: Slim::Schema::Storage::throw_exception (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 658)
frame 2: DBIx::Class::Storage::DBI::_connect (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 616)
frame 3: DBIx::Class::Storage::DBI::_populate_dbh (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 543)
frame 4: DBIx::Class::Storage::DBI::ensure_connected (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 27)
frame 5: (eval) (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 27)
frame 6: Slim::Schema::Storage::dbh (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema.pm line 244)
frame 7: (eval) (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema.pm line 244)
frame 8: Slim::Schema::disconnect (slimserver.pl line 964)
frame 9: main::cleanup (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/bootstrap.pm line 368)
frame 10: Slim::bootstrap::sigint (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/bootstrap.pm line 402)
frame 11: Slim::bootstrap::theEND (slimserver.pl line 1001)
frame 12: main::END (slimserver.pl line 0)
frame 13: (eval) (slimserver.pl line 0)

andyg
2008-04-04, 18:25
It's fixed in 7.0.1, try a nightly build.

malikarshad
2008-04-04, 18:32
It's fixed in 7.0.1, try a nightly build.
Thanks Andy for the quick response.
Should I do a fresh complete install or simply running the 7.01 installation will take care of the problem.

malikarshad
2008-04-04, 18:46
I installed the 7.01 and still when I restarted my PC i get following error.
Am I doing something wrong????
I have Windows XP SP2

[08-04-04 20:41:37.4845] Slim::Schema::Storage::throw_exception (70) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (10061) at C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 652
[08-04-04 20:41:37.5016] Slim::Schema::Storage::throw_exception (70) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 70)
frame 1: Slim::Schema::Storage::throw_exception (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 658)
frame 2: DBIx::Class::Storage::DBI::_connect (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 616)
frame 3: DBIx::Class::Storage::DBI::_populate_dbh (C:\PROGRA~1\SQUEEZ~1\server\CPAN/DBIx/Class/Storage/DBI.pm line 543)
frame 4: DBIx::Class::Storage::DBI::ensure_connected (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 29)
frame 5: (eval) (C:/PROGRA~1/SQUEEZ~1/server/Slim/Schema/Storage.pm line 29)
frame 6: Slim::Schema::Storage::dbh (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema.pm line 121)
frame 7: Slim::Schema::init (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Music/Info.pm line 76)
frame 8: Slim::Music::Info::init (slimserver.pl line 355)
frame 9: main::init (slimserver.pl line 458)
frame 10: main::main (slimserver.pl line 86)
frame 11: PerlSvc::Interactive (perlsvc line 855)
frame 12: PerlSvc::_interactive (slimserver.pl line 0)
frame 13: (eval) (slimserver.pl line 0)

[08-04-04 20:41:37.5398] Slim::Schema::init (124) Error: Couldn't connect to database! Fatal error: [Bad file descriptor] Exiting!
[08-04-04 20:41:37.5401] Slim::Schema::init (124) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Schema.pm line 124)
frame 1: Slim::Schema::init (/<C:\PROGRA~1\SQUEEZ~1\server\SQUEEZ~1.EXE>Slim/Music/Info.pm line 76)
frame 2: Slim::Music::Info::init (slimserver.pl line 355)
frame 3: main::init (slimserver.pl line 458)
frame 4: main::main (slimserver.pl line 86)
frame 5: PerlSvc::Interactive (perlsvc line 855)
frame 6: PerlSvc::_interactive (slimserver.pl line 0)
frame 7: (eval) (slimserver.pl line 0)

[08-04-04 20:41:37.5404] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!

mherger
2008-04-04, 23:48
> I installed the 7.01 and still when I restarted my PC i get following
> error.
> Am I doing something wrong????

Did you try removing SC and start all over again. Looks like some issue in
the MySQL installation or configuration.

Michael