PDA

View Full Version : Synchronize between SliMP3 and Squeezebox broken?



Mike Riccio
2004-04-25, 09:23
I'm running SlimServer 5.1.5 on MacOS X with iTunes. I have 2 SliMP3s
with firmware 2.2 and a Squeezebox (wired) with firmware 21.

In preparation for a party I'm having, I spent over an hour yesterday
trying to get the SliMP3 and the Squeezebox to synchronize to each
other and was unsuccessful and very frustrated.

I had the Squeezebox play my Party iTunes playlist, repeat all, shuffle
by song. I synchronized the SliMP3 to the Squeezebox. On both
players, I display the progress meter with time remaining. Time
remaining would count down correctly, but the progress meter would not
fill in. When the end of the song is reached, the Squeezebox would
then play about a one second burst from around the last 10 seconds of
the song it just finished, then it would proceed to the next song.
Needless to say, this would be a horrible experience for the party.

So, I switched it around. I unsynchronized the players, played the
Party playlist on the SliMP3, repeat all, shuffle by song. Then I
synchronized the Squeezebox to the SliMP3. Same problem.

I swapped out the Squeezebox with the old SliMP3 that it replaced, and
the synchronization worked properly. The progress meter works, and no
random bursts of music between tracks. Good thing I didn't sell the
SliMP3 yet.

I bought the Squeezebox for its digital output for my main stereo
system, but it appears I'm not going to be able to use it for this
party.

Is anyone else having these synchronization problems? Are they known?
Is anyone working on a fix?

Thanks,
-Mike

Karl Auer
2004-04-25, 14:34
Further to slimserver 5.1.5 dying after a while. I turned on some debugging and found that it dies with this error message:

can't create /root/.slimserver.db: Permission denied at (eval 15) line 24

Looks like a cache issue; this is a Storable.pm error message. I have HTML, Tag and Playlist/Directory caching turned on.

slimserver gets started with the --user=slimserver and --group=slimserver options. /root is however the home directory of root, which runs the script that then runs slimserver with those options. The home directory of slimserver is (for the moment) /tmp. This is all SuSE, my own startup script.

It seems as if the slimserver program is trying to write cache information to the wrong home directory. The --help text offers nothing allowing me to override this location. Looking at the source, it looks to me like the cache should be written to the same location as the preferences, which in my case would be /etc as specified on my command line, but this clearly isn't happening (and would be sort of wrong anyway - I don't want caching happening in /etc, and I definitely don't want the slimserver user to be able to create files there).

Odd that it takes so long to die. Anyway, I'll turn off caching for now ;-)

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer (AT) biplane (DOT) com.au) +41-43-2660706 (h)
http://www.biplane.com.au/~kauer/ +41- 1-6327531 (w)

Richard Purdie
2004-04-25, 14:56
> Further to slimserver 5.1.5 dying after a while. I turned on some
> debugging and found that it dies with this error message:
>
> can't create /root/.slimserver.db: Permission denied at (eval 15) line
> 24
>
> Looks like a cache issue; this is a Storable.pm error message. I have
> HTML, Tag and Playlist/Directory caching turned on.

It's a permissions error. For some reason the server thinks it's running as
root hence it's trying to create the cache file in root's home directory.

> slimserver gets started with the --user=slimserver and --group=slimserver
> options. /root is however the home directory of root, which runs the
script
> that then runs slimserver with those options. The home directory of
> slimserver is (for the moment) /tmp. This is all SuSE, my own startup
> script.

Someone needs checkout why the server appears to be ignoring or
misunderstanding those options in this case. It may be the USER
environmental variable is confusing things. I'm not familiar with how the
slimserver handles suid cases so I can't be more specific without digging
into the code. Could you file a bug report please?

As a work around for now, switch to the slimserver user before running
starting the slimserver (typing "su slimserver" will switch users. A command
like sudo can run a command as another user.).

PS: Having users home directories as /tmp is a very bad idea from a security
point of view. I can't stress how much of a bad idea it is.

> It seems as if the slimserver program is trying to write cache information
> to the wrong home directory. The --help text offers nothing allowing me to
> override this location. Looking at the source, it looks to me like the
cache
> should be written to the same location as the preferences, which in my
case
> would be /etc as specified on my command line, but this clearly isn't
> happening (and would be sort of wrong anyway - I don't want caching
> happening in /etc, and I definitely don't want the slimserver user to be
> able to create files there).

Although to save settings, the slimserver user is going to need write
persmissons to the config file in /etc anyway.

> Odd that it takes so long to die. Anyway, I'll turn off caching for now
> ;-)

At a guess, it will only crash when it tries to save the file once it
finishes scanning.

--
RP

Karl Auer
2004-04-29, 11:09
I get a sudden death when I use the shoutcast plugin with 5.1.5. After the recent reports of a whole bunch of problems with newer versions I'm loath to upgrade just yet. Here's the relevant log snippet (the mailer will probably break some lines):

2004-04-29 16:15:43.6148 Recieved final blank line...
2004-04-29 16:15:43.6156 opened stream!
2004-04-29 16:15:43.6162 Scan::readList loading http://www.shoutcast.com/sbin/tunein-station.pls?id=65528&filename=playlist.pls
2004-04-29 16:15:43.6177 Scan::readList loaded playlist with 1 items
flock() on closed filehandle Symbol::GEN8629 at Plugins/ShoutcastBrowser.pm line 1248.
can't create /root/.shoutcastbrowser.recent: Permission denied at Plugins/ShoutcastBrowser.pm line 1272

This looks like the same problem as the cache paths - using the home directory of the real rather than the effective user as a path prefix.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer (AT) biplane (DOT) com.au) +41-43-2660706 (h)
http://www.biplane.com.au/~kauer/ +41- 1-6327531 (w)