Bug 5170 - Scanner dies/never complets updating library: ERROR: DBI Connection failed: DBI
: Scanner dies/never complets updating library: ERROR: DBI Connection failed: DBI
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 6.5b3
: Macintosh MacOS X 10.4
: P4 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-20 04:25 UTC by Martin Stabenfeldt
Modified: 2007-10-27 01:37 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stabenfeldt 2007-07-20 04:25:52 UTC
Hi,

The scanner never seem to stop. It does find a lot of music which I can play, but keeps on scanning.
This happend when I tried to stop the server:

2007-07-20 10:12:00.8592 About to look for files in /Volumes/My Book/Music
2007-07-20 10:12:00.8616 For files with extensions in: [(?i-xsm:\.(?:ape|wma|shn|wav|wave|mp3|mp2|flc|flac|m4a|mov|m4b|mp4|mp+|mpc|ogg|aif|aiff|cue)$)]

-----2007-07-20 13:00:33.0446 Got sigterm.

2007-07-20 13:00:33.1314 SlimServer cleaning up.

2007-07-20 13:00:39.2924 Got to the END.
2007-07-20 13:03:27.8693 Got sigterm.
2007-07-20 13:03:27.8699 SlimServer scanner cleaning up.
2007-07-20 13:03:27.9091 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' (61) at /Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652

2007-07-20 13:03:27.9105 ERROR: Backtrace follows:

2007-07-20 13:03:27.9122 Backtrace:

   frame 0: Slim::Schema::Storage::throw_exception (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 658)
   frame 1: DBIx::Class::Storage::DBI::_connect (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 616)
   frame 2: DBIx::Class::Storage::DBI::_populate_dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 543)
   frame 3: DBIx::Class::Storage::DBI::ensure_connected (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Schema/Storage.pm line 28)
   frame 4: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Schema/Storage.pm line 28)
   frame 5: Slim::Schema::Storage::dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 677)
   frame 6: DBIx::Class::Storage::DBI::txn_begin (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Schema.pm line 487)
   frame 7: DBIx::Class::Schema::txn_begin (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Schema.pm line 567)
   frame 8: DBIx::Class::Schema::txn_do (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Music/Import.pm line 241)
   frame 9: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Music/Import.pm line 233)
   frame 10: Slim::Music::Import::setIsScanning (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 297)
   frame 11: main::cleanup (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/bootstrap.pm line 310)
   frame 12: Slim::bootstrap::sigterm (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Misc.pm line 536)
   frame 13: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Misc.pm line 536)
   frame 14: Slim::Utils::Misc::fixPathCase (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Misc.pm line 384)
   frame 15: Slim::Utils::Misc::pathFromFileURL (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Schema/ResultSet/Track.pm line 120)
   frame 16: Slim::Schema::ResultSet::Track::allTracksAsPaths (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Scanner.pm line 223)
   frame 17: Slim::Utils::Scanner::findFilesForRescan (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Scanner.pm line 292)
   frame 18: Slim::Utils::Scanner::scanDirectory (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Music/MusicFolderScan.pm line 72)
   frame 19: Slim::Music::MusicFolderScan::startScan (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Music/Import.pm line 422)
   frame 20: Slim::Music::Import::runImporter (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Music/Import.pm line 265)
   frame 21: Slim::Music::Import::runScan (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 175)
   frame 22: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 169)
   frame 23: main::main (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 306)

2007-07-20 13:03:27.9225 ERROR: Unable to connect to the database - trying to bring it up!

Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
2007-07-20 13:03:30.8713 Got to the END.
2007-07-20 13:03:31.1402 Got sigint.
2007-07-20 13:03:31.1442 SlimServer scanner cleaning up.
2007-07-20 13:03:31.1667 ERROR: forceCommit: Trying to commit transactions before DB is initialized!
Comment 1 Spies Steven 2007-07-20 09:50:51 UTC
Was SlimServer running on this system before or is this a new install?  It looks like port 9092 may be blocked.  Are you running any Antivirus or Firewall software?
Comment 2 Martin Stabenfeldt 2007-07-20 10:10:28 UTC
This is a completely new install, everything from scratch.
My firewall is turned off, and I´m able to telnet to localhost 9092.

# netstat  -a | grep 9092
tcp4       0      0  localhost.9092         *.*                    LISTEN

# telnet localhost 9092
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
=
5.0.22-standard[C|hs,}S,d!q:k/DI!hk_
Connection closed by foreign host.
Comment 3 Spies Steven 2007-07-20 10:15:24 UTC
I wonder if this may be related to bug 5166.  I am assuming you are installing 6.5.3.  Have you tried installing an older version of the server?  They are available here http://www.slimdevices.com/downloads/
Comment 4 Martin Stabenfeldt 2007-07-24 00:41:01 UTC
Tried 6.2.0, without sucsess.
I was told to hold the brightness botton to start a firmware upgrade.
After the upgrade I´m not able to connect to the wireless network.
Is the firmware connected to the software version on the SlimServer?
How do I rollback?
Comment 5 KDF 2007-07-24 11:44:38 UTC
firmware is tied to slimserver version.   install different slimserver version and you will get the different firmware.

it wasn't necessary to open a new bug report as it is extremely unlikely that you have in fact uncovered a NEW bug from using and OLD version of slimserver.  Consider holding the ADD button  when you plug the player in.   This will reset to factory defaults and you can re-enter wireless settings to fit.

Comment 6 Spies Steven 2007-07-25 08:55:48 UTC
Just wanted to mention that bug 5166 has been fixed in the latest nightly builds.

Martin, have you contacted support with this issue?

http://www.slimdevices.com/su_tech.html
Comment 7 Martin Stabenfeldt 2007-07-29 06:41:14 UTC
Tried with 6.5.0, scanner still never seem to finish.
Will give it a try with latest build and see if the bug still is there.

Tail from 6.5.0 log when shutting down:

2007-07-29 09:46:21.5034 ERROR: Scanner: Skipping post-process & Not updating lastRescanTime!

2007-07-29 09:46:21.6537 Got to the END.
2007-07-29 09:46:21.6541 Got sigint.
2007-07-29 09:46:21.6543 SlimServer cleaning up.
2007-07-29 09:46:21.7619 ERROR: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652

2007-07-29 09:46:21.7622 ERROR: Backtrace follows:

2007-07-29 09:46:21.7626 Backtrace:

  frame 0: Slim::Schema::Storage::throw_exception (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 658)
  frame 1: DBIx::Class::Storage::DBI::_connect (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 616)
  frame 2: DBIx::Class::Storage::DBI::_populate_dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 543)
  frame 3: DBIx::Class::Storage::DBI::ensure_connected (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 557)
  frame 4: DBIx::Class::Storage::DBI::dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 677)
  frame 5: DBIx::Class::Storage::DBI::txn_begin (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Schema.pm line 487)
  frame 6: DBIx::Class::Schema::txn_begin (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Schema.pm line 567)
  frame 7: DBIx::Class::Schema::txn_do (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 253)
  frame 8: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 245)
  frame 9: main::setIsScanning (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 321)
  frame 10: main::cleanup (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/bootstrap.pm line 300)
  frame 11: Slim::bootstrap::sigint (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/bootstrap.pm line 331)
  frame 12: Slim::bootstrap::END (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 0)
  frame 13: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 0)

2007-07-29 09:46:21.8398 ERROR: Scanner: Failed to update isScanning: [Carp::Clan::__ANON__(): DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652
]

2007-07-29 09:46:21.8726 ERROR: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652

2007-07-29 09:46:21.8730 ERROR: Backtrace follows:

2007-07-29 09:46:21.8734 Backtrace:

  frame 0: Slim::Schema::Storage::throw_exception (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 658)
  frame 1: DBIx::Class::Storage::DBI::_connect (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 616)
  frame 2: DBIx::Class::Storage::DBI::_populate_dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 543)
  frame 3: DBIx::Class::Storage::DBI::ensure_connected (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 557)
  frame 4: DBIx::Class::Storage::DBI::dbh (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Schema.pm line 1283)
  frame 5: Slim::Schema::forceCommit (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 323)
  frame 6: main::cleanup (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/bootstrap.pm line 300)
  frame 7: Slim::bootstrap::sigint (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/bootstrap.pm line 331)
  frame 8: Slim::bootstrap::END (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 0)
  frame 9: (eval) (/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl line 0)

Carp::Clan::__ANON__(): DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652
END failed--call queue aborted.
Comment 8 Chris Owens 2007-07-29 22:18:58 UTC
Could you give us a bit more of that tail, Martin?  I'd be interested to see what the scanner thinks it's doing right before the crash.
Comment 9 Michael Herger 2007-07-30 03:33:38 UTC
SlimServer can't connect to MySQL. Did you ever use a password with this database? 

Can you remove SlimServer _completely_, including anything slimserver related in /Library and ~/Library. Make sure MySQL files are removed as well. Then reinstall and try again.
Comment 10 Martin Stabenfeldt 2007-07-30 13:18:36 UTC
> SlimServer can't connect to MySQL. Did you ever use a password with this database? 
I never changed anything to the SlimServer software. Only the Music path trough the webinterface.
I am however running my own MySQL server, this shouldn´t interfere with SlimServer, should it?

# netstat  | grep -i mysql
 2dbaf68 stream      0      0  26e039c        0        0        0 /tmp/mysql.sock
 2b824c8 stream      0      0  29bc000        0        0        0 /Users/martin/Library/Caches/SlimServer/slimserver-mysql.sock


> Can you remove SlimServer _completely_, including anything slimserver related
> in /Library and ~/Library. Make sure MySQL files are removed as well. Then
> reinstall and try again.

I removed the SlimServer pref pane from the setting, and ~/Library/SlimDevices.
Couldn´t find anything in /Library




Here is the first part of the log from 2007-07-29:


2007-07-29 02:45:28.5550 ERROR: Async: Couldn't resolve IP address for update.sl
imdevices.com: Send: No route to host
2007-07-29 02:45:28.5559 There was an error while checking for updates to SlimSe
rver:
2007-07-29 09:45:56.2437 Got sigterm.
2007-07-29 09:45:56.3569 SlimServer cleaning up.
2007-07-29 09:46:12.2035 Got to the END.
2007-07-29 09:46:20.8902 ERROR: DBI Connection failed: DBI connect('hostname=127
.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL ser
ver on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.pref
Pane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652
2007-07-29 09:46:21.0159 ERROR: Backtrace follows:
2007-07-29 09:46:21.3254 Backtrace:
2007-07-29 09:46:21.3423 ERROR: no sth generated via sql (Carp::Clan::__ANON__()
: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=slim
server','',...) failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Us
ers/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx
/Class/Storage/DBI.pm line 652
2007-07-29 09:46:21.3426 ERROR: Backtrace follows:
2007-07-29 09:46:21.3431 Backtrace:
2007-07-29 09:46:21.5021 ERROR: Scanner: Failed when running main scan: [Carp::C
lan::__ANON__(): no sth generated via sql (Carp::Clan::__ANON__(): DBI Connectio
n failed: DBI connect('hostname=127.0.0.1;port=9092;database=slimserver','',...)
 failed: Can't connect to MySQL server on '127.0.0.1' (61) at /Users/martin/Libr
ary/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/DBIx/Class/Storage/
DBI.pm line 652
2007-07-29 09:46:21.5034 ERROR: Scanner: Skipping post-process & Not updating la
stRescanTime!
2007-07-29 09:46:21.6537 Got to the END.
2007-07-29 09:46:21.6541 Got sigint.
2007-07-29 09:46:21.6543 SlimServer cleaning up.
2007-07-29 09:46:21.7619 ERROR: DBI Connection failed: DBI connect('hostname=127
.0.0.1;port=9092;database=slimserver','',...) failed: Can't connect to MySQL ser
ver on '127.0.0.1' (61) at /Users/martin/Library/PreferencePanes/SlimServer.pref
Pane/Contents/server/CPAN/DBIx/Class/Storage/DBI.pm line 652
2007-07-29 09:46:21.7622 ERROR: Backtrace follows:
2007-07-29 09:46:21.7626 Backtrace:
Comment 11 Martin Stabenfeldt 2007-08-11 03:27:35 UTC
Can I provide you with any more information or is there anything I should checkout?
Running 6.5.4 on a fresh install of OS X 10.4.10
Comment 12 Michael Herger 2007-08-12 02:30:34 UTC
Martin - did you contact support? This is a bug tracker, not a support platform. But you issue very likely isn't a new bug, but a problem with your installation. Thanks!
Comment 13 Martin Stabenfeldt 2007-08-29 11:53:33 UTC
Hi,

I´ve contacted support, they keep asking me if I have rebooted the mashine, reinstalled the server, if I can refresh the webinterface, if I have antivirus, and want me to do things in the DOS windows. etc.

They don´t even read the data I have provided them! :-/
I don´t have any DOS windows, I´m using OS X 10.4.10.

I´ve reinstalled the OS, tried nightly builds, latest stabel and older versions of the server.

I noticed that mysql is running when I try to shutdown the server and it fails writing the data to the database..

Please let me know if I can provide you with any more information or try new things.


Cheers,
Martin
Comment 14 KDF 2007-08-29 13:53:43 UTC
Try doing these from the terminal (Applications, Utilities):

/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/slimserver.pl --d_mysql --d_startup


and in another terminal once slimserver is running:
/Users/martin/Library/PreferencePanes/SlimServer.prefPane/Contents/server/scanner.pl --wipe --d_info --d_import /path/to/music


of course, substitute the last bit for your music folder path.  If you rely only on itunes use:
--wipe --itunes --d_import --d_itunes

Check your music folder for any loops (shortcuts that point back to another place in the music folder tree) and watch the scanner details to see what it might be looping through or getting stuck on.  The error dump suggests that mysql is either crashing somewhere along the way or getting locked up so that closing the server cannot cleaning end mysql.  either of these terminal windows should show you any error messages that get spit out by either process along the way.
Comment 15 Blackketter Dean 2007-10-26 12:27:14 UTC
Is there some kind of firewall turned out that's blocking outgoing connections, especially third-party firewalls?

SlimServer can't connect to slimdevices.com or the built-in mySQL process.  
Comment 16 Martin Stabenfeldt 2007-10-27 01:37:43 UTC
I given up, I don´t have the time to play with this.
When I get my Linux server back up, I´ll give it a try.