PDA

View Full Version : Several plugins does not work on SlimNAS



Kuben72
2008-05-12, 14:12
I have installed several plugins under SlimNAS and I have discovered that they don't work. I have tried with the following plugins:

DynamicPlayList
SQLPlaysList
TrackStat
EmailChecker.

All of them gives an error 404: Unable to find settings and lists the path to where it exspects to find the settings for the plugin.

I have other plugins that works fine:

DanskRadio
AutoDisplay
LazySearch2

Does any one have any idea what is wrong?

I am running 7.0.1.19251 on SlimNAS 0.99999.

/Kuben72

kdf
2008-05-12, 14:24
>
> Does any one have any idea what is wrong?

it may be that these plugins depend on perl modules not included with SC
that are not compatible with SlimNAS in some way.

These or other errors should be showing up in the server.log file.

If not, try going into the web ui, server settings->logging, and set
plugins to DEBUG. Then check the box at the top to save logging settings,
the click apply in the bottom corner. Restart the server and check the
log again (the link to the log file is on the server settings->logging
page if you don't have direct access to the file)

-kdf

syburgh
2008-05-12, 18:41
TrackStat works with SlimServer 6.5.1 on SlimNAS

Kuben72
2008-05-12, 23:58
I have copied the entries from the logfile. See attachment.

kdf
2008-05-13, 00:04
I'm seeing permission problem errors, so you need to make sure that
the plugin files are readable, and perhaps the plugin folders are
writeable
-k
On 12-May-08, at 11:58 PM, Kuben72 wrote:

>
> I have copied the entries from the logfile. See attachment.
>
>
> +-------------------------------------------------------------------+
> |Filename: SC_logfile.txt |
> |Download: http://forums.slimdevices.com/attachment.php?attachmentid=5080
> |
> +-------------------------------------------------------------------+
>
> --
> Kuben72
> ------------------------------------------------------------------------
> Kuben72's Profile: http://forums.slimdevices.com/member.php?userid=15308
> View this thread: http://forums.slimdevices.com/showthread.php?t=47564
>
>

Kuben72
2008-05-13, 04:07
I have checked and the directory is both readable and writeble.
This is the error message I get: 404 Not Found: settings/plugins/DynamicPlayList/settings/basic.html

And the logfile says:

[08-05-13 12:45:03.3896] Slim::bootstrap::tryModuleLoad (271) Warning: Module [Plugins::DynamicPlayList::Plugin] failed to load:
Permission denied at /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 872.
BEGIN failed--compilation aborted at (eval 606) line 2

I just don't understand it.

/Kuben72

signor_rossi
2008-05-13, 06:46
Have you tried giving full permissions for everyone? Just to rule out if it is a permission problem or not.

Bye, signor_rossi.

kdf
2008-05-13, 07:49
On 13-May-08, at 4:07 AM, Kuben72 wrote:

>
> I have checked and the directory is both readable and writeble.
> This is the error message I get: 404 Not Found:
> settings/plugins/DynamicPlayList/settings/basic.html
>
> And the logfile says:
>
> [08-05-13 12:45:03.3896] Slim::bootstrap::tryModuleLoad (271) Warning:
> Module [Plugins::DynamicPlayList::Plugin] failed to load:
> Permission denied at /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm
> line 872.
line 872 has to do with being able to open/create the temp file in /tmp.
-k

Kuben72
2008-05-13, 07:59
signor_rossi: I have no permissions set becuase the version of FreeNAS I am using does not support it. So everybody has access to everything.

kdf: Do you know where that tmp katalog is supposed to be? Is it in SC's direcory or is it in FreeNAS = system tmp?

/Kuben72

kdf
2008-05-13, 08:07
On 13-May-08, at 7:59 AM, Kuben72 wrote:

>
> signor_rossi: I have no permissions set becuase the version of
> FreeNAS I
> am using does not support it. So everybody has access to everything.
>
> kdf: Do you know where that tmp katalog is supposed to be? Is it in
> SC's direcory or is it in FreeNAS = system tmp?

I have no idea, as I do not use FreeNAS.

the code seems to be looking for the following environment vars:
PAR_TMPDIR TMPDIR TEMPDIR TEMP TMP )

as well as c:\temp and /tmp. then creates a par-(username) dir under
that.

you can also try:
perldoc PAR

for more information, if you have access to the command-line terminal.

-kdf

erland
2008-05-13, 16:22
I have checked and the directory is both readable and writeble.
This is the error message I get: 404 Not Found: settings/plugins/DynamicPlayList/settings/basic.html

And the logfile says:

[08-05-13 12:45:03.3896] Slim::bootstrap::tryModuleLoad (271) Warning: Module [Plugins::DynamicPlayList::Plugin] failed to load:
Permission denied at /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 872.
BEGIN failed--compilation aborted at (eval 606) line 2

I just don't understand it.

/Kuben72

This messages seems to indicate problem with PAR files, this should mean that you should have the same problem with all third party plugins that bundle their code as a par file. This is the case with all my plugin and probably most of the third party plugins, it is not the case with the built in SqueezeCenter plugins though.

From kdf's answer it sounds like your problem is permissions in the /tmp directory, or the directory that one of the PAR_TMPDIR TMPDIR TEMPDIR TEMP TMP environment variables points to.

I would suggest that you check if the user of the SqueezeCenter process has write access to these directories. If it works for some third party plugins that bundle their code as a PAR file, I would suggest that you also check that there is some space left on /tmp so it isn't stored on a separate partition that gets full.

Kuben72
2008-05-14, 12:29
Hi Erland,

That would explain why the email-checker plugin does not work either.

Okay I have done a bit of digging:

There is none of the mentioned environment variables set up as far as I can tell. There is a /tmp directory but that is not on the same partition as SC. Is that nessacary ? Everybody kan write to the /tmp directory as FreeNAS has no user setup that works.
There is 864 MB availble on the partition where /tmp is created. That should be enough(?).

I was wondering if it was possible to get a version of DynamicPlayList that logged the filename including the path it is trying to create when it failes?

/Kuben72

kdf
2008-05-14, 13:43
It's not Erland's plugin that is causing the problem, so you won't really find much to edit there that would give you the filename.

What you want to look for is Par.pm, which for squeezecenter, is located in server/CPAN/PAR.pm. This is the one that will be used, unless you have a different copy installed on your system elsewhere.

Change line 872 from:
open $fh, '+>', $filename or die $!;

to:
open $fh, '+>', $filename or die "cannot write to $filename";

Then check the logs for that message once you've restarted the server.

-kdf

Kuben72
2008-05-14, 23:59
Okay, Sorry I misunderstood that. I have implemented the change and this is what I get:

cannot write to /d8339255.pm at /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 873.
It looks like it doesn't find the tmp directory at all.


As I was looking at the logfile I saw another entry from PAR.pm:
[08-05-15 08:49:43.8707] Slim::Utils::Misc::msg (1329) Warning: [08:49:43.8691] Use of uninitialized value in scalar assignment at /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 740

This log happens before the error from DynamicPlayList.

Line 740 has also something to do with tempdir so could this be related

kdf
2008-05-15, 00:20
try setting an environment variable PAR_TEMP to /tmp.
I'm not sure of the specifics on doing that, given the SlimNAS
environment.
-kdf
On 14-May-08, at 11:59 PM, Kuben72 wrote:

>
> Okay, Sorry I misunderstood that. I have implemented the change and
> this
> is what I get:
>
> cannot write to /d8339255.pm at
> /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 873.
> It looks like it doesn't find the tmp directory at all.
>
>
> As I was looking at the logfile I saw another entry from PAR.pm:
> [08-05-15 08:49:43.8707] Slim::Utils::Misc::msg (1329) Warning:
> [08:49:43.8691] Use of uninitialized value in scalar assignment at
> /mnt/Musikdisk/slimnas/squeezecenter/CPAN/PAR.pm line 740
>
> This log happens before the error from DynamicPlayList.
>
> Line 740 has also something to do with tempdir so could this be
> related
>
>
> --
> Kuben72
> ------------------------------------------------------------------------
> Kuben72's Profile: http://forums.slimdevices.com/member.php?userid=15308
> View this thread: http://forums.slimdevices.com/showthread.php?t=47564
>
>

Kuben72
2008-05-15, 00:49
Neither am I. (One of these days I am going to move SC to my windows server where I know what I am doing). I will have to do some digging.

Thanks for your help so far.

kdf
2008-05-15, 01:10
depending on the shell, it will be some variant of:
setenv PAR_TEMP /tmp
or
export PAR_TEMP=/tmp

the quesion is where you need to add this in order for it to be
permanent every time you start SC or reboot.

/etc/profile might be one place for the second version.

-kdf
On 15-May-08, at 12:49 AM, Kuben72 wrote:

>
> Neither am I. (One of these days I am going to move SC to my windows
> server where I know what I am doing). I will have to do some digging.
>
> Thanks for your help so far.
>
>
> --
> Kuben72
> ------------------------------------------------------------------------
> Kuben72's Profile: http://forums.slimdevices.com/member.php?userid=15308
> View this thread: http://forums.slimdevices.com/showthread.php?t=47564
>
>

Kuben72
2008-05-15, 04:50
Yep. It worked.

In the etc directory I edited .profile and added PAR_TEMP /tmp and then rebootede the server. After that DynamicPlayList was loaded as it should.

Thanks very much for your help.

I will try to get Michael Herger interested in this, so he can change the SlimNAS installation and add the environment variable during the installation.

/Kuben72

Kuben72
2008-05-15, 11:43
I am afraid that I am not out of the woods yet:

If I stop and start SC from the FreeNAS WEB administration page then the environment variable for the /tmp directory is gone! If I reboot the server then PAR.pm finds the environment variable again.

I'm lost!

/Kuben72

erland
2008-05-15, 12:09
Does SlimNAS have a /etc/default/squeezecenter file like debian installations ?
If it does, it might work to add a line like below to this file:
PAR_TEMP=/tmp

Kuben72
2008-05-15, 12:26
No. At least not as far as I can tell. Sorry.

/Kuben72