Bug 11648 - Scanner is not working (SSODS)
: Scanner is not working (SSODS)
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.0
: Other Linux (other)
: -- normal with 2 votes (vote)
: 7.4.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-04 00:34 UTC by luny
Modified: 2009-10-05 14:32 UTC (History)
7 users (show)

See Also:
Category: ---


Attachments
SSODS system details (232.79 KB, text/plain)
2009-04-04 00:34 UTC, luny
Details
possible workaround for this issue (217 bytes, text/plain)
2009-05-08 15:10 UTC, Michael Herger
Details
SlimNAS version of workaround (1.75 KB, text/plain)
2009-05-08 15:13 UTC, Michael Herger
Details
work around scanning issue in SSODS and others (186 bytes, text/plain)
2009-05-08 16:02 UTC, Michael Herger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luny 2009-04-04 00:34:26 UTC
Created attachment 5041 [details]
SSODS system details

When I start the scheduler, nothing works.
I have tried a manual scan, and scheduled scan.

Only lines in the logfile are for the manual scan:
0002: [09-04-03 21:40:26.0049] Slim::Schema::wipeCaches (1523) Wiped all in-memory caches.
0001: [09-04-03 21:40:15.4901] Slim::Web::Settings::Server::Basic::handler (68) Initiating scan of type: rescan

Only lines in the logfile are for the scheduled scan:
0004: [09-04-03 23:00:40.8314] Slim::Schema::wipeCaches (1523) Wiped all in-memory caches.
0003: [09-04-03 23:00:34.7170] Slim::Plugin::Rescan::Plugin::executeRescan (484) Initiating scan of type: wipecache


Current setup: 7.4-25793 with synology DSM 2.1.0-0839 but scanner is not working since 7.4-25744
Comment 1 luny 2009-04-04 00:35:15 UTC
See following threat: 
http://forums.slimdevices.com/showthread.php?p=412849#post412849
Comment 2 luny 2009-04-04 00:41:00 UTC
when I played music from a new directory in my music folder, it is added to the music library (see "SSODS system details" for log entries for that)
Comment 3 Rudolf Janz 2009-04-05 08:59:13 UTC
Already wrote this in the forum, but the comment is held for moderation:

 I traced the problem some more, the problem seems to lie in the starting
of the scanner.pl as a background process.

	$class->scanningProcess(
		Proc::Background->new($command, @scanArgs)
	);

I added some logging. This is the statement that it would execute:

/volume1/SSODS/bin/perl /volume1/SqueezeCenter/scanner.pl --priority=0 --logconfig=/volume1/SqueezeCenter/prefs/log.conf --wipe --prefsdir=/volume1/SqueezeCenter/prefs --logdir=/volume1/SqueezeCenter/Logs

I started it directly from the shell and it started and worked fine.
So this is a workaround for now (replace volume1 by the name of your share,
 and remove --wipe for a simple rescan)
Comment 4 luny 2009-04-05 10:35:21 UTC
When I run:
"/volume1/SqueezeCenter/scanner.pl --priority=0 --logconfig=/volume1/SqueezeCenter/prefs/log.conf --prefsdir=/volume1/SqueezeCenter/prefs --logdir=/volume1/SqueezeCenter/Logs"


This is the result:

The following modules failed to load: YAML::Syck

To download and compile them, please run: /volume1/SqueezeCenter/Bin/build-perl-modules.pl YAML::Syck
Comment 5 luny 2009-04-05 13:46:32 UTC
And if I run that, the following happens:

DiskStation> /volume1/SqueezeCenter/Bin/build-perl-modules.pl YAML::Syck
-sh: /volume1/SqueezeCenter/Bin/build-perl-modules.pl: not found
Comment 6 Rudolf Janz 2009-04-05 14:50:26 UTC
Ok I tried it just now, this happens when you leave out the
"/volume1/SSODS/bin/perl" at the beginning of the command line

It seems it uses a different perl installation (or at least some library paths
are set up differently, I did not look much into the SSODS stuff)
Comment 7 Michael Herger 2009-04-06 02:47:43 UTC
You should contact FlipFlip, SSODS' author. This is not a SC bug, but very likely a missing module or something on the Diskstation.
Comment 8 James Richardson 2009-04-06 09:40:57 UTC
Please post in the Synology forum regarding this issue
Comment 9 luny 2009-04-07 14:18:32 UTC
thanks for your advise.
I did start a thread on the synology forum.

fyi, i was mistaken in my previous post, with the following the statement my scanner is working:

/volume1/SSODS/bin/perl /volume1/SqueezeCenter/scanner.pl --priority=0 --logconfig=/volume1/SqueezeCenter/prefs/log.conf --wipe --prefsdir=/volume1/SqueezeCenter/prefs --logdir=/volume1/SqueezeCenter/Logs
Comment 10 luny 2009-04-16 10:37:33 UTC
I think this means it not related to SSODS, and also people with QNAP have the same problem, so it cannot be Synology firmware as well. Maybe ask to re-open the bug?
Comment 11 luny 2009-04-21 04:01:35 UTC
As mentioned in the forum, the problem is not missing perl modules.

When I execute the following stement from the shell, the scanner works:
"/volume1/SSODS/bin/perl /volume1/SqueezeCenter/scanner.pl --priority=0 --logconfig=/volume1/SqueezeCenter/prefs/log.conf --wipe --prefsdir=/volume1/SqueezeCenter/prefs --logdir=/volume1/SqueezeCenter/Logs"

It could be that starting the scanner.pl as a background process is the problem.
Comment 12 Rudolf Janz 2009-04-21 08:16:20 UTC
The problem is the loading of two of the packages ( I replaced the call to perl by a shell script which in turned called perl and redirected stdout/err to a file)
The perl library paths seem to be ok, but it cannot load DBD::mysql and HTML::Parser, when started from squeezecenter. DBD::mysql is present in CPAN and in SSODS, HTML::Parser in CPAN, I do not know why it does not find it. 

These are the outputs:
Got @INC containing:
/volume1/SqueezeCenter
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/ppc-linux-thread-multi
/volume1/SqueezeCenter/lib
/volume1/SqueezeCenter/CPAN
/volume1/SSODS/lib/perl5/5.8.8/ppc-linux-thread-multi
/volume1/SSODS/lib/perl5/5.8.8
/volume1/SSODS/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi
/volume1/SSODS/lib/perl5/site_perl/5.8.8
/volume1/SSODS/lib/perl5/site_perl
.

Extended @INC to contain:
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/ppc-linux-thread-multi
/volume1/SqueezeCenter/lib
/volume1/SqueezeCenter/CPAN
/volume1/SqueezeCenter
/volume1/SqueezeCenter
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi
/volume1/SqueezeCenter/CPAN/arch/5.8.8/ppc-linux-thread-multi/auto
/volume1/SqueezeCenter/CPAN/arch/ppc-linux-thread-multi
/volume1/SqueezeCenter/lib
/volume1/SqueezeCenter/CPAN
/volume1/SSODS/lib/perl5/5.8.8/ppc-linux-thread-multi
/volume1/SSODS/lib/perl5/5.8.8
/volume1/SSODS/lib/perl5/site_perl/5.8.8/ppc-linux-thread-multi
/volume1/SSODS/lib/perl5/site_perl/5.8.8
/volume1/SSODS/lib/perl5/site_perl
.

Loaded module: [version] ok!
Loaded module: [Time::HiRes] ok!
Removing [DBD::mysql] from the symbol table - load failed.
Removing [DBI] from the symbol table - load failed.
Loaded module: [DBI] ok!
Removing [HTML::Parser] from the symbol table - load failed.
Removing [HTML::Entities] from the symbol table - load failed.
Loaded module: [XML::Parser::Expat] ok!
Loaded module: [YAML::Syck] ok!
The following modules are loaded after the first attempt:

Removing [DBD::mysql] from the symbol table - load failed.
Removing [HTML::Parser] from the symbol table - load failed.
Removing [HTML::Entities] from the symbol table - load failed.
Comment 13 Chris Owens 2009-04-27 09:34:24 UTC
It might be useful for flipflip to learn exactly what hardware you are using.
Comment 14 luny 2009-04-27 10:23:58 UTC
I have reported this bug on: a Synology Disk Station 107+ (2.1.0-0839)but others have reported the same bug on a QNAP ts109pro
Comment 15 Michael Herger 2009-05-08 11:46:21 UTC
*** Bug 11999 has been marked as a duplicate of this bug. ***
Comment 16 Michael Herger 2009-05-08 11:47:45 UTC
Ok, there's a more generic issue with devices running SC from the noCPAN
tarball.
Comment 17 Michael Herger 2009-05-08 14:32:43 UTC
Andy - I wonder whether we need to set PERL5LIB _before_ manipulating @INC, as otherwise the order of that list gets changed when calling exec() (like in the scanner case):


Index: D:/eclipse/7.4/server/slimserver.pl
===================================================================
--- D:/eclipse/7.4/server/slimserver.pl	(revision 26448)
+++ D:/eclipse/7.4/server/slimserver.pl	(working copy)
@@ -20,7 +20,6 @@
 
 use Config;
 my %check_inc;
-$ENV{PERL5LIB} = join $Config{path_sep}, grep { !$check_inc{$_}++ } @INC;
        
 my @original_args = @ARGV;
 
@@ -111,6 +110,8 @@
 use lib $Bin;
 
 BEGIN {
+	$ENV{PERL5LIB} = join $Config{path_sep}, grep { !$check_inc{$_}++ } @INC if scalar @INC;
+
 	use Slim::bootstrap;
 	use Slim::Utils::OSDetect;
Comment 18 Michael Herger 2009-05-08 15:10:54 UTC
Created attachment 5204 [details]
possible workaround for this issue

This file might help working around this issue. Drop it into Slim/Utils/OS/ of your installation and restart SC. Don't do this if there's already a Custom.pm file in place (as in SlimNAS).
Comment 19 Michael Herger 2009-05-08 15:13:26 UTC
Created attachment 5205 [details]
SlimNAS version of workaround

Save this file as usr/share/Slim/SlimNAS.pm in your SlimNAS installation, then restart SC using the FreeNAS web UI.
Comment 20 Michael Herger 2009-05-08 15:18:14 UTC
Comment on attachment 5204 [details]
possible workaround for this issue

Nope, that didn't do the trick :-(
Comment 21 Michael Herger 2009-05-08 16:02:18 UTC
Created attachment 5206 [details]
work around scanning issue in SSODS and others

Ok, this Custom.pm file should work. SSODS users - if this helps, you might want to contact flipflip so he can include this with SSODS until we've figured out how to fix it in SC. Thanks!

SlimNAS users please update to the latest SlimNAS 1.3.0: http://www.herger.net/SlimNAS
Comment 22 avr300 2009-05-09 06:03:31 UTC
Confirmed. FreeNAS is now working again.
Comment 23 Philippe Kehl 2009-05-11 00:53:12 UTC
I do not see the issue in various test installations of SSODS, not on old Synology firmwares (w/o Perl) nor on recent firmwares (w/Perl).

You shouldn't do this anyway:

/volume1/SqueezeCenter/scanner.pl ...  (or slimserver.pl)

You must do:

/volume1/SSODS/bin/perl /volume1/SqueezeCenter/scanner.pl ...

And the "official" (see SSODS FAQ) way to do it is:

ssctrl scanner ...

SSODS 3.16 will change the shebang to the right perl location (/volume1/SSODS/bin/perl instead of /usr/bin/perl). Once that's done, you can call the scripts directly. However, using ssctrl is recommended (because it works around a couple of other issues as well).

Regards,
flipflip
Comment 24 Michael Herger 2009-05-11 01:04:29 UTC
I think the issue here is rather that the scanner run from the command line would work ok, but _not_ when called from within SC. If ssctrl is needed/recommended, you might want to add a Slim/Utils/OS/Custom.pm file setting the scanner to that executable instead of the default value.
Comment 25 Michael Herger 2009-06-08 11:22:13 UTC
luny - is this still unresolved?
Comment 26 luny 2009-06-08 11:48:47 UTC
(In reply to comment #25)
> luny - is this still unresolved?

I had applied the workaround for a while, that worked.

Recently I have done a clean install, and since then scanner works fine, so issue resolved.

Thx
Comment 27 Michael Herger 2009-07-27 07:49:49 UTC
thanks for the thumbs up
Comment 28 James Richardson 2009-10-05 14:32:23 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.