Bug 3689 - Rev 8229 of mergeVariousArtistsAlbums breaks scanner with mysql permission denied error
: Rev 8229 of mergeVariousArtistsAlbums breaks scanner with mysql permission de...
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 6.5b1
: PC Windows Server 2003
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-03 11:14 UTC by Johan Broberg
Modified: 2008-09-15 14:39 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Broberg 2006-07-03 11:14:28 UTC
Not sure if Component should be set to Scanner or Database (or something else)...

Changes introduced in Slim/Schema.pm revision 6229 causes this problem. It works fine in earlier revisions.

When rescanning the library (doesn't matter if I choose "look for new" or "clear and rescan"), the scanner breaks at mergeVariousArtistsAlbums.

I'm running slimserver.pl through command prompt, logged in as Administrator (yes, I am that stupid).
MySQL is the built-in version.
Running the query in the log message below works just fine through MySQL Query Browser. I have tried this a number of times now and get the same error each time, except that the me.album argument seems to change.

I guess the interesting part of the log would be the permission denied error code:
DBD::mysql::st execute failed: Can't create/write to file 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\#sql_88_0.MYD' (Errcode: 13) at C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI.pm line 525.

Log message:
2006-07-03 10:41:29.2168 About to look for files in C:\Program Files (x86)\SlimServer\Shortcuts
2006-07-03 10:41:29.2177 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|lnk|cue)$)]
2006-07-03 10:41:29.2248 About to look for files in C:\Program Files (x86)\SlimServer\Playlists
2006-07-03 10:41:29.2259 For files with extensions in: [(?i-xsm:\.(?:asf|wax|asx|lnk|wpl|m3u|pls|xspf|cue|lnk)$)]
DBD::mysql::st execute failed: Can't create/write to file 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\#sql_88_0.MYD' (Errcode: 13) at C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI.pm line 525.
2006-07-03 10:41:30.0410 ERROR: Error executing 'SELECT me.id, me.url, me.content_type, me.title, me.titlesort, me.titlesearch, me.album, me.tracknum, me.timestamp, me.filesize, me.tag, me.disc, me.thumb, me.remote, me.audio, me.audio_size, me.audio_offset, me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate, me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm, me.tagversion, me.drm, me.moodlogic_id, me.moodlogic_mixable, me.musicmagic_mixable, me.musicbrainz_id, me.playcount, me.lastplayed, me.lossless, me.lyrics, me.rating, me.replay_gain, me.replay_peak, contributorTracks.role, contributorTracks.contributor, contributorTracks.track FROM tracks me LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.track = me.id ) WHERE ( ( ( contributorTracks.role = ? ) AND ( me.album = ? ) ) ) ORDER BY disc, tracknum, titlesort, contributorTracks.track' (`1', `37'): DBD::mysql::st execute failed: Can't create/write to file 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\#sql_88_0.MYD' (Errcode: 13) at C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI.pm line 525.

2006-07-03 10:41:30.0413 ERROR: Backtrace follows:

2006-07-03 10:41:30.0415 Backtrace:

   frame 0: Slim::Schema::Storage::throw_exception (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI.pm line 530)
   frame 1: DBIx::Class::Storage::DBI::_execute (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI.pm line 577)
   frame 2: DBIx::Class::Storage::DBI::_select (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 79)
   frame 3: DBIx::Class::Storage::DBI::Cursor::next (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/ResultSet.pm line 516)
   frame 4: DBIx::Class::ResultSet::next (C:\Program Files (x86)\SlimServer\server/Slim/Schema.pm line 755)
   frame 5: Slim::Schema::mergeVariousArtistsAlbums (C:/Program Files (x86)/SlimServer/server/Slim/Music/Import.pm line 122)
   frame 6: Slim::Music::Import::startScan (C:/Program Files (x86)/SlimServer/server/scanner.pl line 143)
   frame 7: main::__ANON__ (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Schema.pm line 588)
   frame 8: (eval) (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Schema.pm line 576)
   frame 9: DBIx::Class::Schema::txn_do (C:/Program Files (x86)/SlimServer/server/scanner.pl line 154)
   frame 10: main::main (C:/Program Files (x86)/SlimServer/server/scanner.pl line 248)

DBD::mysql::st fetchrow_array failed: fetch() without execute() at C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 86.
2006-07-03 10:41:30.0497 ERROR: DBD::mysql::st fetchrow_array failed: fetch() without execute() at C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Storage/DBI/Cursor.pm line 86.

2006-07-03 10:41:30.0585 ERROR: Backtrace follows:

2006-07-03 10:41:30.0586 Backtrace:

   frame 0: Slim::Schema::throw_exception (C:\Program Files (x86)\SlimServer\server\CPAN/DBIx/Class/Schema.pm line 610)
   frame 1: DBIx::Class::Schema::txn_do (C:/Program Files (x86)/SlimServer/server/scanner.pl line 154)
   frame 2: main::main (C:/Program Files (x86)/SlimServer/server/scanner.pl line 248)
Comment 1 KDF 2006-07-03 14:30:22 UTC
you mean 8229?
Comment 2 Johan Broberg 2006-07-03 21:50:09 UTC
*bangs head against wall* Yes, of course I do - sorry about that. I wonder where I got the 6 from?
Comment 3 Dan Sully 2006-07-04 08:12:33 UTC
Errorcode 13 from MySQL means "Permission Denied".

Check that the mysqld.exe process is running as administrator (or whichever user you want), and that it has permissions to write to that temp directory.
Comment 4 Johan Broberg 2006-07-04 10:14:11 UTC
MySQL seems to be running as Administrator (which would make sense, seeing as perl/SlimServer was started as Administrator).
The directory it is trying to write to is the temp directory for Administrator, so I can't see why it shouldn't be able to create, or write to, that file - unless it already exists and is locked? Settings seem to be ok. I tried removing any read-only flags for the directory but that didn't make any difference.
Comment 5 Dan Sully 2006-07-04 10:16:11 UTC
Subject: Re:  Rev 8229 of mergeVariousArtistsAlbums breaks scanner with mysql permission denied error

Can you start clean? Stop SlimServer, delete any files from the temp
directory, and the SlimServer Cache directory, and try it again? SlimServer
will start scanning when it sees an empty database.

The cachedir can be found from the cachedir: line in the .pref file.

Comment 6 Johan Broberg 2006-07-06 05:23:52 UTC
I will try that in a moment. Would just like to add that running "scanner.pl --rescan" seems to work.
Comment 7 Johan Broberg 2006-07-06 07:49:50 UTC
I wiped everything - cleared temp folder, downloaded the latest trunk revision to a new folder, and pointed this new server to the same music folder as before. Scan seems to work, so I guess it's not much of a bug.

I noticed that I have commented out the bind-address property in the file server/MySQL/my.tt - can this be a/the problem? (no more testing on this server today - I want to listen to some music. will see if I can reproduce the error on the laptop instead)
Comment 8 Dan Sully 2006-07-11 10:56:54 UTC
The bind-address shouldn't cause a problem.. though it shouldn't be commented out either. It should be set to 127.0.0.1