PDA

View Full Version : Help! 6.5.1 Kills Fully Working Server Install on Gentoo



Bradley
2007-01-19, 18:54
Tried to get this going two different ways:

1. New Install
2. Overlay over the 6.5.0 install

This is what I see when I run ./slimserver.pl:

2007-01-19 20:05:19.1228 ERROR: Cannot write to preferences file /root/slimserver.pref, any changes made will not be preserved for the next startup of the server

2007-01-19 20:05:19.1240 Use of uninitialized value in negation (-) at /usr/local/slimserver/Slim/Utils/Misc.pm line 1148.
2007-01-19 20:05:19.1254 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.1256 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.3706 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.3710 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.3712 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.3714 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
2007-01-19 20:05:19.3715 Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
mkdir /MySQL: Permission denied at /usr/local/slimserver/Slim/Utils/MySQLHelper.pm line 156
2007-01-19 20:05:19.3749 Use of uninitialized value in sprintf at /usr/local/slimserver/Slim/Utils/MySQLHelper.pm line 470.


Any all help is greatly appreciated!

*Bradley

kdf
2007-01-19, 19:12
seems obviously a permissions problem. you should consider creating a
slimserver user and running slimserver.pl as that user.

-kdf

Bradley
2007-01-19, 19:55
seems obviously a permissions problem. you should consider creating a
slimserver user and running slimserver.pl as that user.

-kdf

It's NOT so Obvious and NOT so simple apparently

I have a slimserver user and slimserver group. I've done a chown -R on everything slimserver related.

I still get the same error.

I even tried installing the Ebuild of Slimserver-6.5.1 through Portage. Still get the same error.

I can still get my old Slimserver 6.5.0 build up and running. Thus I say, the Slimserver 6.5.1 build is BROKEN -- because SOMETHING has changed between versions.

Can ANYONE Please Help me? Thanks in advance

*Bradley

kdf
2007-01-19, 20:21
On 19-Jan-07, at 6:55 PM, Bradley wrote:

>
> kdf;172149 Wrote:
>> seems obviously a permissions problem. you should consider creating a
>> slimserver user and running slimserver.pl as that user.
>>
>> -kdf
>
> It's NOT so Obvious and NOT so simple apparently
>
good luck then

Maybe ask a gentoo forum why they have a permission denied error in the
OS when it has nothing to do with permissions.

cheers
kdf

Mark Miksis
2007-01-19, 20:29
2007-01-19 20:05:19.1228 ERROR: Cannot write to preferences file /root/slimserver.pref, any changes made will not be preserved for the next startup of the server

This will happen if you've run slimserver (or scanner.pl) as root.

snarlydwarf
2007-01-19, 20:29
It's NOT so Obvious and NOT so simple apparently

I have a slimserver user and slimserver group. I've done a chown -R on everything slimserver related.


Define "everything slimserver related"...



2007-01-19 20:05:19.1228 ERROR: Cannot write to preferences file /root/slimserver.pref, any changes made will not be preserved for the next startup of the server


Which says you are writing to /root/slimserv.pref for your config files.... Which most likely means your home directory is "/root"... are you starting Slimserver as root?



I even tried installing the Ebuild of Slimserver-6.5.1 through Portage. Still get the same error.

No idea what that means -- I use the .deb on debian...


I can still get my old Slimserver 6.5.0 build up and running. Thus I say, the Slimserver 6.5.1 build is BROKEN -- because SOMETHING has changed between versions.


How are you starting the 6.5.0 version? Surely you are not starting it as root from a shell...

Ron Olsen
2007-01-19, 20:39
I just installed SlimServer 6.5.1 via "emerge slimserver" on my Gentoo Linux system and it works fine. All I had to do was copy in some additional third-party plugins that weren't in the new /opt/slimserver/Plugins directory. I did not change any permissions or ownership of any files in the /opt/slimserver directory.

I start SlimServer via "service slimserver start" as root. The /etc/init.d/slimserver script runs SlimServer as userid and groupid "slimserver", and uses the preferences file /etc/slimserver.prefs; you should try this instead of doing a ./slimserver.pl in the /opt/slimserver directory.

Try running "service slimserver start" as root and see if it fixes your startup problem. If you do this, check to make sure your /etc/slimserver.prefs file has the preferences carried over from the 6.5.0 version.

System info:

SlimServer Version: 6.5.1 - 11206 - Linux - EN - utf8
Server IP address: 192.168.0.6
Perl Version: 5.8.8 i686-linux
MySQL Version: 5.0.21-standard

Bradley
2007-01-19, 22:00
My old 6.5.0 install works fine. Maybe that's the problem. Is the 6.5.1 script expecting to create directories? They're already all there based on having a 6.5.0 install, as is a full non-slimserver install of MySQL.

As for the permissions issue, all the /opt/slimserver or /usr/local/slimserver or the /var/cache/slimserver or the /var/log/slimserver directories/files are chowned to slimserver:slimserver.

The user slimserver, however does not have a home directory.

When I normally start slimserver, I use the /etc/init.d/slimserver start command -- which is run as root but then switches to the slimserver user using the --user parm in the script.

The reason I was running ./slimserver.pl is to see the error output because running the /etc/init.d/slimserver start command displays nothing.

I did a search on the forums and see that there are several other users that have had the same problem on the pre-release version of 6.5.1 since December. I do not see a resolution to their issues either and they stem from the same problem.

I took a look at the MySQLHelper.pm script (where the error is happening) and don't see anything significantly different about 6.5.0 and 6.5.1 in there.

I'm willing to provide more debugging information. I just need someone to specify more helpful info, so I can help debug. For example: What directory is it trying to create? Perhaps I can manually create it and set the correct permissions.

Please try to help me.

Thank you,

*Bradley

kdf
2007-01-19, 22:17
On 19-Jan-07, at 9:00 PM, Bradley wrote:
>
> I'm willing to provide more debugging information. I just need someone
> to specify more helpful info, so I can help debug. For example: What
> directory is it trying to create? Perhaps I can manually create it and
> set the correct permissions.
>
> Please try to help me.
>
If you'll refrain from barking at the attempt, I'll be willing to
suggest a next step.

slimserver.pl --d_mysql --d_startup

please try to avoid running it as root, so that it will not try to
create/access files in /root.

If you have been using an init.d script, you have the option of
pointing slimserver to that usual prefs file:

../slimserver.pl --d_mysql --d_startup --prefsfile /etc/slimserver.pref

edit to suit the location for your system, of course.

-kdf

Bradley
2007-01-19, 22:34
The error originally described at the start of this thread dealt with an error happening in MySQLHelper.pm. I briefly eyeballed the script and really saw nothing apparent in the 6.5.0 vs. the 6.5.1 versions, so I copied the MySQLHelper.pm script from the 6.5.0 release to the proper place in the 6.5.1 release. That eliminated the permissions problems!

So, pretty pretty please: SD/Logitech Devs please look into what's going on with the logic in THAT script between 6.5.0 and 6.5.1.

That'll probably reveal the ultimate problem and get a solid fix for me and anyone else struggling with this or a similar problem.

For now, the "bandaid" I discovered at least is allowing me to run under 6.5.1.

If anyone has any further insight, please add to this thread.

*Bradley

Ron Olsen
2007-01-19, 22:40
MySQLHelper.pm should be part of the Gentoo 6.5.1 ebuild. It is located in /opt/slimserver/Slim/Utils/MySQLHelper.pm in my installation of the 6.5.1 Gentoo ebuild.

I wonder why it's not present in your version. Did you install 6.5.1 via "emerge slimserver"? If so, you should have MySQLHelper.pm in the correct location.

MySQLHelper.pm is also in the Slim/Utils directory in the SlimServer_v6.5.1.tar.gz download file.

Frankly, I don't think there's anything wrong with 6.5.1, nor the Gentoo ebuild for it. There is something specific to your installation that's causing the problem.

Bradley
2007-01-19, 22:51
MySQLHelper.pm should be part of the Gentoo 6.5.1 ebuild. It is located in /opt/slimserver/Slim/Utils/MySQLHelper.pm in my installation of the 6.5.1 Gentoo ebuild.

I wonder why it's not present in your version. Did you install 6.5.1 via "emerge slimserver"? If so, you should have MySQLHelper.pm in the correct location.

MySQLHelper.pm is also in the Slim/Utils directory in the SlimServer_v6.5.1.tar.gz download file.


Ron:

It was in the 6.5.1 build. It just wasn't working.

Perhaps your install is working because it's a new install? I've been using slimserver since version 2 or 3 on my machine.

Ron Olsen
2007-01-19, 22:59
I installed 6.5.1 over 6.5.0 via "emerge slimserver", and after copying some third-party plugins to /opt/slimserver/Plugins, everything worked fine.

Again, I did not change any permissions or ownership of any files in /opt/slimserver, and I ran 6.5.1 via "service slimserver start" as root.

Everything worked as expected. To ensure a clean start for 6.5.1, I also did a complete rescan of my music files.

I suggest doing an "emerge -C slimserver" to remove all of the files in /opt/slimserver, then doing an "emerge slimserver" to repopulate the /opt/slimserver directory. Make sure /etc/slimserver.prefs has your desired options, and you have the desired third-party plugins in /opt/slimserver/Plugins. Then do "service slimserver start" as root. This should work.

Bradley
2007-01-19, 23:01
Please feel free to add more info to the bug record.

Ron Olsen
2007-01-19, 23:05
Did you try what I suggested? It's not a bug; it's something specific to your install.

kdf
2007-01-19, 23:08
On 19-Jan-07, at 9:34 PM, Bradley wrote:
>
> That'll probably reveal the ultimate problem and get a solid fix for me
> and anyone else struggling with this or a similar problem.
>
not so much. The differences between the two versions (svn 9916 for
6.5.0 and svn 11206 for 6.5.1) centre mostly around fixes for windows
(I can post a diff, if you are that curious). It does, however, output
info when using --d_mysql. Comparing the log output between versions
might shed some highlight what is specifically happening on your system
to make such a difference between modules. While it is always nice for
someone else to do the work, someone else isn't working with your
setup. Were a 'dev' to look at this, the dev would ask for log output.
It quite often shows the exact nature of the problem, and failing that
gives much clearer steps for potentially replicating the problem on
another machine.

However, as you have a working solution now, what you do going forward
is up to you.

-kdf

Bradley
2007-01-19, 23:39
More fiddling around seems to point to the init.d script (and thus the slimserver.pl) not finding the correct pref file -- left from the previous version. I copied the original 6.5.1 version of MySQLHelper.pl into the 6.5.1, making sure that the script starts up with the proper location of the pref file explicitly specified and it worked.

I've updated my bug report to reflect this finding. Don't know why this new version needed the pref file to be specified as it is located in the default location.