Bug 7237 - Cannot start squeezecenter from fresh install
: Cannot start squeezecenter from fresh install
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 7.0
: Macintosh MacOS X 10.5
: -- normal (vote)
: ---
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-20 04:45 UTC by Wout Mertens
Modified: 2009-09-08 09:16 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wout Mertens 2008-02-20 04:45:00 UTC
I performed the following steps:
1. Start with an Apple running 10.5.2
2. Install squeezecenter 2008-02-20 (Had probably the same problem with -01-19)
3. Try to start the server - FAIL


After some digging I present the following dump of what seems to be a failure to create a new SQLite database.

When I then create the SQL/SQLite directory, it gets a little further but still fails trying to read from nonexistent database tables (and several "driver does not implement ping method" messages).

~/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server $ DBI_TRACE=2 ./slimserver.pl --diag 
    DBI 1.50-ithread default trace level set to 0x0/2 (pid 22860)
    -> DBI->connect(dbi:SQLite:dbname=slimserver, , ****, HASH(0x383d450))
    -> DBI->install_driver(SQLite) for darwin perl=5.008008 pid=22860 ruid=502 euid=502
       install_driver: DBD::SQLite version 1.13 loaded from /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/DBD/SQLite.pm
    <- install_driver= DBI::dr=HASH(0x899cd8)
    -> connect for DBD::SQLite::dr (DBI::dr=HASH(0x899cd8)~0x386cf28 'dbname=slimserver' '' **** HASH(0x386d300)) thr#800000
    <- connect= DBI::db=HASH(0x386cfd0) at DBI.pm line 617
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'RaiseError' 1) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'PrintError' 0) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'AutoCommit' 1) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'Username' '') thr#800000
    <- STORE= 1 at DBI.pm line 667
    <> FETCH= '' ('Username' from cache) at DBI.pm line 667
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'Taint' 1) thr#800000
 T  <- STORE= 1 at DBI.pm line 667
    -> FETCH for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'Taint') thr#800000
 T  <- FETCH= 1 at DBI.pm line 667
    <- connect= DBI::db=HASH(0x386cfd0)
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'dbi_connect_closure' CODE(0x386cea4)) thr#800000
 T  <- STORE= 1 at DBI.pm line 683
    -> get_info for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8 18) thr#800000
 T  <- get_info= '3.4.0' at MySQLHelper.pm line 521
    -> do in DBD::_::db for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8 'SELECT name FROM metainformation') thr#800000
1   -> prepare for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'SELECT name FROM metainformation' undef) thr#800000
sqlite trace: prepare statement: SELECT name FROM metainformation at dbdimp.c line 258
    -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x386e580)~INNER) thr#800000
         DESTROY for DBI::st=HASH(0x386e580) ignored - handle not initialised
       ERROR: 1 'no such table: metainformation(1) at dbdimp.c line 271' (err#0)
 T  <- DESTROY= undef at DBI.pm line 1551
    !! ERROR: 1 'no such table: metainformation(1) at dbdimp.c line 271' (err#0)
1T  <- prepare= undef at DBI.pm line 1551
    !! ERROR: 1 'no such table: metainformation(1) at dbdimp.c line 271' (err#0)
 T  <- do= undef at Schema.pm line 144
[08-02-20 13:33:16.9986] Slim::Schema::init (151) Warning: Creating new database - empty database or database from 6.3.x found
    -> do for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8 'DROP TABLE IF EXISTS metainformation') thr#800000
1   -> prepare for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'DROP TABLE IF EXISTS metainformation' undef) thr#800000
sqlite trace: prepare statement: DROP TABLE IF EXISTS metainformation at dbdimp.c line 258
1T  <- prepare= DBI::st=HASH(0x386e6a0) at DBI.pm line 1551
    -> execute for DBD::SQLite::st (DBI::st=HASH(0x386e6a0)~0x386e574) thr#800000
 T  <- execute= '0E0' at DBI.pm line 1552
    -> rows for DBD::SQLite::st (DBI::st=HASH(0x386e6a0)~0x386e574) thr#800000
 T  <- rows= 0 at DBI.pm line 1553
    -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x386e574)~INNER) thr#800000
 T  <- DESTROY= undef at Schema.pm line 154
 T  <- do= '0E0' at Schema.pm line 154
    -> do for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8 'DROP TABLE IF EXISTS dbix_migration') thr#800000
1   -> prepare for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'DROP TABLE IF EXISTS dbix_migration' undef) thr#800000
sqlite trace: prepare statement: DROP TABLE IF EXISTS dbix_migration at dbdimp.c line 258
1T  <- prepare= DBI::st=HASH(0x386e484) at DBI.pm line 1551
    -> execute for DBD::SQLite::st (DBI::st=HASH(0x386e484)~0x386e64c) thr#800000
 T  <- execute= '0E0' at DBI.pm line 1552
    -> rows for DBD::SQLite::st (DBI::st=HASH(0x386e484)~0x386e64c) thr#800000
 T  <- rows= 0 at DBI.pm line 1553
    -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x386e64c)~INNER) thr#800000
 T  <- DESTROY= undef at Schema.pm line 155
 T  <- do= '0E0' at Schema.pm line 155
    -> DBI->connect(dbi:SQLite:dbname=slimserver, , ****, HASH(0x386e6c4))
    -> connect for DBD::SQLite::dr (DBI::dr=HASH(0x899cd8)~0x386cf28 'dbname=slimserver' '' **** HASH(0x386eb74)) thr#800000
    <- connect= DBI::db=HASH(0x386e70c) at DBI.pm line 617
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER 'RaiseError' 0) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER 'PrintError' 0) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER 'AutoCommit' 1) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER 'Username' '') thr#800000
    <- STORE= 1 at DBI.pm line 667
    <> FETCH= '' ('Username' from cache) at DBI.pm line 667
    <- connect= DBI::db=HASH(0x386e70c)
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER 'dbi_connect_closure' CODE(0x386e754)) thr#800000
    <- STORE= 1 at DBI.pm line 683
    -> prepare for DBD::SQLite::db (DBI::db=HASH(0x386e70c)~0x386eb68 'SELECT value FROM dbix_migration WHERE name = ?;
') thr#800000
sqlite trace: prepare statement: SELECT value FROM dbix_migration WHERE name = ?;
 at dbdimp.c line 258
    -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x3867d34)~INNER) thr#800000
         DESTROY for DBI::st=HASH(0x3867d34) ignored - handle not initialised
       ERROR: 1 'no such table: dbix_migration(1) at dbdimp.c line 271' (err#0)
    <- DESTROY= undef at Migration.pm line 229
    !! ERROR: 1 'no such table: dbix_migration(1) at dbdimp.c line 271' (err#0)
    <- prepare= undef at Migration.pm line 229
    -> disconnect for DBD::SQLite::db (DBI::db=HASH(0x386e70c)~0x386eb68) thr#800000
    <- disconnect= 1 at Migration.pm line 184
    -> DBI->connect(dbi:SQLite:dbname=slimserver, , ****, HASH(0x386ec4c))
    -> connect for DBD::SQLite::dr (DBI::dr=HASH(0x899cd8)~0x386cf28 'dbname=slimserver' '' **** HASH(0x386f0e4)) thr#800000
    <- connect= DBI::db=HASH(0x386ed48) at DBI.pm line 617
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER 'RaiseError' 0) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER 'PrintError' 0) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER 'AutoCommit' 1) thr#800000
    <- STORE= 1 at DBI.pm line 664
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER 'Username' '') thr#800000
    <- STORE= 1 at DBI.pm line 667
    <> FETCH= '' ('Username' from cache) at DBI.pm line 667
    <- connect= DBI::db=HASH(0x386ed48)
    -> STORE for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER 'dbi_connect_closure' CODE(0x386ece8)) thr#800000
    <- STORE= 1 at DBI.pm line 683
    -> DESTROY for DBD::SQLite::db (DBI::db=HASH(0x386eb68)~INNER) thr#800000
    <- DESTROY= undef at Migration.pm line 77
[08-02-20 13:33:17.0186] DBIx::Migration::_newest (207) Warning: No such file or directory at /Users/wmertens/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/CPAN/DBIx/Migration.pm line 207.
    -> DESTROY for DBD::SQLite::db (DBI::db=HASH(0x386f0d8)~INNER) thr#800000
    <- DESTROY= undef
[08-02-20 13:33:17.0191] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!
    -> FETCH for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8 'Active') thr#800000
 T  <- FETCH= 1 at DBI.pm line 527
    -> ping in DBD::_::db for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8) thr#800000
1   -> _not_impl in DBD::_::common for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER 'ping') thr#800000
Driver does not implement the ping method.
1T  <- _not_impl= undef at DBI.pm line 1649
 T  <- ping= '0 but true' at DBI.pm line 527
    -> disconnect for DBD::SQLite::db (DBI::db=HASH(0x386cfd0)~0x386d2e8) thr#800000
 T  <- disconnect= 1 at Schema.pm line 244
    -- DBI::END
    -> disconnect_all for DBD::SQLite::dr (DBI::dr=HASH(0x899cd8)~0x386cf28) thr#800000
    <- disconnect_all= '' at DBI.pm line 692
!   -> DESTROY for DBD::SQLite::db (DBI::db=HASH(0x386d2e8)~INNER) thr#800000
!T  <- DESTROY= undef during global destruction
!   -> DESTROY in DBD::_::common for DBD::SQLite::dr (DBI::dr=HASH(0x386cf28)~INNER) thr#800000
!   <- DESTROY= undef during global destruction
Comment 1 Blackketter Dean 2008-02-20 06:10:28 UTC
Wout:  SqueezeCenter7 doesn't use SQLite, so I'm a little confused as to how your install got this way.  

What version did you have previously installed?

Can you attach your prefs file?

Assigning to Steven to reproduce here.

Andy: any idea?
Comment 2 Andy Grundman 2008-02-20 06:15:50 UTC
Were you previously running a 6.3 or earlier build?  Maybe you have an old pref file with a SQLite dbsource.  Check ~/Library/Application Support/SqueezeCenter/server.prefs although I'm not sure how a SQLite dbsource would get in there.
Comment 3 Spies Steven 2008-02-20 14:00:15 UTC
Starting with a working SS 6.3 installed on Mac OS X 10.5.2 I installed SC 7.0 I was unable to start SC 7.0.  Starting in the terminal gave the following error:

[08-02-20 13:56:25.1201] Slim::Schema::init (151) Warning: Creating new database - empty database or database from 6.3.x found
[08-02-20 13:56:25.1226] DBIx::Migration::_newest (207) Warning: No such file or directory at /Users/smsuser/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/CPAN/DBIx/Migration.pm line 207.
[08-02-20 13:56:25.1231] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!

Michael, is this one for you?
Comment 4 Michael Herger 2008-02-20 14:17:39 UTC
I can give it a try. But before we spend a lot of time on the 6.3->7.0 theory, I'd like to know from Wout whether this is the case for him.

And then we must define whether we offer a direct 6.3->7.0 upgrade path.

I seriously doubt this is a critical issue.
Comment 5 KDF 2008-02-20 15:25:58 UTC
There were a number of upgrade scripts used on the older Prefs module for changing 6.3 to 6.5.  With these gone, some aspects of migration won't happen when going from 6.3 to 7.0
Comment 6 Blackketter Dean 2008-02-20 20:39:50 UTC
We should provide a 6.3 to 7.0 upgrade that doesn't crash the server.  Even if some settings are lost, the server should come up.
Comment 7 Michael Herger 2008-02-20 23:52:30 UTC
Can't reproduce the issue: I've installed 6.3.1 on a clean system, updated to SC7 right on top of it, and it would start and scan without a minor hitch.

Wout - could you please run "slimserver.pl --debug database.info=debug" and upload the server.log file? 

I'm not sure whether the SS6.3 update is a red herring here. Have you been running it at all?
Comment 8 Michael Herger 2008-02-21 01:31:12 UTC
Ok, can reproduce on OSX. Problem is dbsource containing SQLite is copied over to SC7's server.prefs. Will have to investigate why this doesn't happen on Windows.

Wout - if you delete /Library/SlimDevices and /Library/ApplicationSupport/SqueezeCenter/server.prefs it should work.
Comment 9 Michael Herger 2008-02-21 01:47:20 UTC
Dean, Andy: ok to check this in?

Index: /Users/mh/Documents/workspace/SC7.0/Slim/Utils/Prefs.pm
===================================================================
--- /Users/mh/Documents/workspace/SC7.0/Slim/Utils/Prefs.pm	(revision 17665)
+++ /Users/mh/Documents/workspace/SC7.0/Slim/Utils/Prefs.pm	(working copy)
@@ -260,6 +260,10 @@
 
 		for my $pref (keys %defaults) {
 			my $old = Slim::Utils::Prefs::OldPrefs->get($pref);
+
+			# bug 7237: don't migrate dbsource if we're upgrading from SS6.3
+			next if $pref eq 'dbsource' && $old =~ /SQLite/i;
+
 			$prefs->set($pref, $old) if !$prefs->exists($pref) && defined $old;
 		}
 
Comment 10 Wout Mertens 2008-02-21 01:58:10 UTC
Great, that worked! So it seems I did have a v6 installed at one point? Sigh, my memory is a sieve :-(

Thanks for fixing it this fast - and I can't wait for the Duet to make it to Belgium :-)
Comment 11 Blackketter Dean 2008-02-21 06:31:27 UTC
looks ok to me. Andy?
Comment 12 Andy Grundman 2008-02-21 06:47:52 UTC
Yep go for it.
Comment 13 Michael Herger 2008-02-21 06:58:39 UTC
change 17667 - thanks
Comment 14 Chris Owens 2008-03-07 09:04:40 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.