PDA

View Full Version : Unable to run slimserver 6.0.0 on linux as user other thanroot



Daniel Born
2005-03-28, 16:21
Hi,

If I try to have the slimserver run as another user (slimserver), I
get this message in log file:
DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
open database file(1) at dbdimp.c line 94 at
/usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106

Since my user "slimserver" has its home directory at /home/slimserver,
it's not surprising that it can't open the file in the root's home
directory. If I use user "root", then it works fine.

Thanks,
Daniel

mherger
2005-03-28, 23:07
Daniel

What linux are you using? How did you install?

On Mon, 28 Mar 2005 23:21:14 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
wrote:

> Hi,
>
> If I try to have the slimserver run as another user (slimserver), I
> get this message in log file:
> DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
> open database file(1) at dbdimp.c line 94 at
> /usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106
>
> Since my user "slimserver" has its home directory at /home/slimserver,
> it's not surprising that it can't open the file in the root's home
> directory. If I use user "root", then it works fine.
>
> Thanks,
> Daniel
>
>
>

Daniel Cohen
2005-03-29, 00:23
I've just upgraded to 6.0. No comments as yet.

AlienBBC installs but doesn't play anything. I have traced the
problem to mplayer, which doesn't seem to work.

That is, I've tried running mplayer from the command line and I get
the following log. mplayer certainly used to work, AlienBBC worked
fine before the BBC Web page got upgraded. I have just moved from Mac
OS 10.3.7 to 10.3.8, but wouldn't expect that to be an issue.

Any suggestions? Here's the log.

/sw/bin/mplayer http://www.bbc.co.uk/radio/aod/shows/rpms/radio2/paul_jones.rpm
MPlayer dev-CVS-041116-19:27-3.3 (C) 2000-2004 MPlayer Team

AltiVec found
CPU: PowerPC
Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file
or directory
Reading config file /Users/danco/.mplayer/config
Reading /Users/danco/.mplayer/codecs.conf: Can't open
'/Users/danco/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
font: can't open file: /Users/danco/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using Darwin accurate timing
Can't open input config file /Users/danco/.mplayer/input.conf: No
such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No
such file or directory
Falling back on default (hardcoded) input config

Playing http://www.bbc.co.uk/radio/aod/shows/rpms/radio2/paul_jones.rpm.
Resolving www.bbc.co.uk for AF_INET6...
Couldn't resolve name for AF_INET6: www.bbc.co.uk
Resolving www.bbc.co.uk for AF_INET...
Connecting to server www.bbc.co.uk[212.58.224.86]:80 ...
Cache size set to 320 KBytes
Connected to server: www.bbc.co.uk
Cache fill: 0.01% (0 bytes)

Exiting... (End of file)
--
Daniel Cohen

Neil Sleightholm
2005-03-29, 05:17
You need to use the -playlist option if you are going to play an rpm
file.

Neil

Daniel Cohen wrote:

> I've just upgraded to 6.0. No comments as yet.
>
> AlienBBC installs but doesn't play anything. I have traced the
> problem to mplayer, which doesn't seem to work.
>
> That is, I've tried running mplayer from the command line and I get
> the following log. mplayer certainly used to work, AlienBBC worked
> fine before the BBC Web page got upgraded. I have just moved from Mac
> OS 10.3.7 to 10.3.8, but wouldn't expect that to be an issue.
>
> Any suggestions? Here's the log.
>
> /sw/bin/mplayer
> http://www.bbc.co.uk/radio/aod/shows/rpms/radio2/paul_jones.rpm
> MPlayer dev-CVS-041116-19:27-3.3 (C) 2000-2004 MPlayer Team
>
> AltiVec found
> CPU: PowerPC
> Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file
> or directory Reading config file /Users/danco/.mplayer/config
> Reading /Users/danco/.mplayer/codecs.conf: Can't open
> '/Users/danco/.mplayer/codecs.conf': No such file or directory
> Reading /usr/local/etc/mplayer/codecs.conf: Can't open
> '/usr/local/etc/mplayer/codecs.conf': No such file or directory Using
> built-in default codecs.conf. font: can't open file:
> /Users/danco/.mplayer/font/font.desc font: can't open file:
> /usr/local/share/mplayer/font/font.desc Using Darwin accurate timing
> Can't open input config file /Users/danco/.mplayer/input.conf: No
> such file or directory Can't open input config file
> /usr/local/etc/mplayer/input.conf: No such file or directory Falling
> back on default (hardcoded) input config
>
> Playing
> http://www.bbc.co.uk/radio/aod/shows/rpms/radio2/paul_jones.rpm.
> Resolving www.bbc.co.uk for AF_INET6... Couldn't resolve name for
> AF_INET6: www.bbc.co.uk Resolving www.bbc.co.uk for AF_INET...
> Connecting to server www.bbc.co.uk[212.58.224.86]:80 ...
> Cache size set to 320 KBytes
> Connected to server: www.bbc.co.uk
> Cache fill: 0.01% (0 bytes)
>
> Exiting... (End of file)

Daniel Born
2005-03-29, 05:55
Hi Michael,

I'm running slimserver on a Buffalo Linkstation. I downloaded the
complete .tar.gz archive and expanded it in /usr/local/slimserver
directory so I did not use any rpm. My call script uses --daemon and
--user slimserver etc...
(I created that user with its home directory at /home/slimserver).

This used to work just fine for V5.4.x where all "user" files would
get created in /home/slimserver but now it seems that --user doesn't
completely work (seems like some paths are hardcoded maybe?)

Tonight I'll try looking at the code that generates the error to see
if I can find anything...

Thanks,
Daniel

On Tue, 29 Mar 2005 08:07:11 +0200, "Michael Herger"
<slim (AT) herger (DOT) net> wrote:

>Daniel
>
>What linux are you using? How did you install?
>
>On Mon, 28 Mar 2005 23:21:14 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>wrote:
>
>> Hi,
>>
>> If I try to have the slimserver run as another user (slimserver), I
>> get this message in log file:
>> DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
>> open database file(1) at dbdimp.c line 94 at
>> /usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106
>>
>> Since my user "slimserver" has its home directory at /home/slimserver,
>> it's not surprising that it can't open the file in the root's home
>> directory. If I use user "root", then it works fine.
>>
>> Thanks,
>> Daniel
>>
>>
>>

mherger
2005-03-29, 06:20
On Tue, 29 Mar 2005 12:55:22 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
wrote:

> Hi Michael,
>
> I'm running slimserver on a Buffalo Linkstation. I downloaded the
> complete .tar.gz archive and expanded it in /usr/local/slimserver
> directory so I did not use any rpm. My call script uses --daemon and
> --user slimserver etc...
> (I created that user with its home directory at /home/slimserver).

SlimServer tries to access its database in the /root/ folder - where the
user "slimserver" does not have access to. I guess the first time you ran
slimserver you did it as root. Try removing /etc/slimserver* as well as
~/.slimserver.prefs. Then start slimserver as user "slimserver". This
should create a new .slimserver.prefs file.

Or use the --cachedir option.

> This used to work just fine for V5.4.x where all "user" files would
> get created in /home/slimserver but now it seems that --user doesn't
> completely work (seems like some paths are hardcoded maybe?)

I guess it was configured when you (accidentally?) ran it as user root.

> Tonight I'll try looking at the code that generates the error to see
> if I can find anything...

Have fun :-)


> Thanks,
> Daniel
>
> On Tue, 29 Mar 2005 08:07:11 +0200, "Michael Herger"
> <slim (AT) herger (DOT) net> wrote:
>
>> Daniel
>>
>> What linux are you using? How did you install?
>>
>> On Mon, 28 Mar 2005 23:21:14 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>> wrote:
>>
>>> Hi,
>>>
>>> If I try to have the slimserver run as another user (slimserver), I
>>> get this message in log file:
>>> DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
>>> open database file(1) at dbdimp.c line 94 at
>>> /usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106
>>>
>>> Since my user "slimserver" has its home directory at /home/slimserver,
>>> it's not surprising that it can't open the file in the root's home
>>> directory. If I use user "root", then it works fine.
>>>
>>> Thanks,
>>> Daniel
>>>
>>>
>>>

Daniel Cohen
2005-03-29, 06:58
On 29/3/05 at 12:17 pm +0000, Neil Sleightholm wrote
>You need to use the -playlist option if you are going to play an rpm
>file.
>
>Neil
>
>Daniel Cohen wrote:
>
>> I've just upgraded to 6.0. No comments as yet.
>>
> > AlienBBC installs but doesn't play anything.

Right, that gets mplayer working.

But AlienBBC doesn't work. The plugin exists, and I can navigate
through the menus, but when I try to play something, I get the
following messages

Connecting ...

Connecting to play

Connecting

and then just "stopped" without anything having played.
--
Daniel Cohen

Neil Sleightholm
2005-03-29, 12:40
Are you able to run slimserver from the command line and see if you can
get any additional tracing. I use the command line:
slim --d_plugins --d_parse --d_remotestream

Also if you edit slimserver-convert.conf and change #PIPE# to
#DEBUGPIPE# you should see mplayer starting with some extra tracing.

Let me know what you see.

Neil

Daniel Cohen wrote:

> On 29/3/05 at 12:17 pm +0000, Neil Sleightholm wrote
> > You need to use the -playlist option if you are going to play an rpm
> > file.
> >
> > Neil
> >
> > Daniel Cohen wrote:
> >
> >> I've just upgraded to 6.0. No comments as yet.
> > >
> > > AlienBBC installs but doesn't play anything.
>
> Right, that gets mplayer working.
>
> But AlienBBC doesn't work. The plugin exists, and I can navigate
> through the menus, but when I try to play something, I get the
> following messages
>
> Connecting ...
>
> Connecting to play
>
> Connecting
>
> and then just "stopped" without anything having played.

Daniel Born
2005-03-29, 15:21
That's the thing, I haven't run it as root. As a matter of fact, I
just cleared out *everything* pertaining to slimserver on my
linkstation and reinstalled *everything* back from the official 6.0.0
release. Then I used my startup script with the --user slimserver in
it and it still does the exact same thing...

Thankfully it seems that setting the --cachedir to the directory I
wanted did the trick though. I still think there's a bug in the code.

Thanks,
Daniel

On Tue, 29 Mar 2005 15:20:43 +0200, "Michael Herger"
<slim (AT) herger (DOT) net> wrote:

>On Tue, 29 Mar 2005 12:55:22 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>wrote:
>
>> Hi Michael,
>>
>> I'm running slimserver on a Buffalo Linkstation. I downloaded the
>> complete .tar.gz archive and expanded it in /usr/local/slimserver
>> directory so I did not use any rpm. My call script uses --daemon and
>> --user slimserver etc...
>> (I created that user with its home directory at /home/slimserver).
>
>SlimServer tries to access its database in the /root/ folder - where the
>user "slimserver" does not have access to. I guess the first time you ran
>slimserver you did it as root. Try removing /etc/slimserver* as well as
>~/.slimserver.prefs. Then start slimserver as user "slimserver". This
>should create a new .slimserver.prefs file.
>
>Or use the --cachedir option.
>
>> This used to work just fine for V5.4.x where all "user" files would
>> get created in /home/slimserver but now it seems that --user doesn't
>> completely work (seems like some paths are hardcoded maybe?)
>
>I guess it was configured when you (accidentally?) ran it as user root.
>
>> Tonight I'll try looking at the code that generates the error to see
>> if I can find anything...
>
>Have fun :-)
>
>
>> Thanks,
>> Daniel
>>
>> On Tue, 29 Mar 2005 08:07:11 +0200, "Michael Herger"
>> <slim (AT) herger (DOT) net> wrote:
>>
>>> Daniel
>>>
>>> What linux are you using? How did you install?
>>>
>>> On Mon, 28 Mar 2005 23:21:14 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> If I try to have the slimserver run as another user (slimserver), I
>>>> get this message in log file:
>>>> DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
>>>> open database file(1) at dbdimp.c line 94 at
>>>> /usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106
>>>>
>>>> Since my user "slimserver" has its home directory at /home/slimserver,
>>>> it's not surprising that it can't open the file in the root's home
>>>> directory. If I use user "root", then it works fine.
>>>>
>>>> Thanks,
>>>> Daniel
>>>>
>>>>
>>>>

Daniel Born
2005-03-29, 16:28
Another thing, after clearing out everything and re-installing I got
this message in the log file (over and over):
Couldn't write preferences file out /etc/slimserver6.conf

It appears that this file was created by slimserver under user root...
After a chown slimserver:slimserver, things were able to be saved in
the prefs file...

What do I need to do to have this run as user slimserver?? I have
everything under /usr/local/slimserver6 as user slimserver:slimserver,
my startup script uses --user slimserver and still... what am I
missing?

Thanks,
Daniel

On Tue, 29 Mar 2005 22:21:03 +0000, Daniel Born
<born_daniel (AT) yahoo (DOT) com> wrote:

>That's the thing, I haven't run it as root. As a matter of fact, I
>just cleared out *everything* pertaining to slimserver on my
>linkstation and reinstalled *everything* back from the official 6.0.0
>release. Then I used my startup script with the --user slimserver in
>it and it still does the exact same thing...
>
>Thankfully it seems that setting the --cachedir to the directory I
>wanted did the trick though. I still think there's a bug in the code.
>
>Thanks,
>Daniel
>
>On Tue, 29 Mar 2005 15:20:43 +0200, "Michael Herger"
><slim (AT) herger (DOT) net> wrote:
>
>>On Tue, 29 Mar 2005 12:55:22 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>>wrote:
>>
>>> Hi Michael,
>>>
>>> I'm running slimserver on a Buffalo Linkstation. I downloaded the
>>> complete .tar.gz archive and expanded it in /usr/local/slimserver
>>> directory so I did not use any rpm. My call script uses --daemon and
>>> --user slimserver etc...
>>> (I created that user with its home directory at /home/slimserver).
>>
>>SlimServer tries to access its database in the /root/ folder - where the
>>user "slimserver" does not have access to. I guess the first time you ran
>>slimserver you did it as root. Try removing /etc/slimserver* as well as
>>~/.slimserver.prefs. Then start slimserver as user "slimserver". This
>>should create a new .slimserver.prefs file.
>>
>>Or use the --cachedir option.
>>
>>> This used to work just fine for V5.4.x where all "user" files would
>>> get created in /home/slimserver but now it seems that --user doesn't
>>> completely work (seems like some paths are hardcoded maybe?)
>>
>>I guess it was configured when you (accidentally?) ran it as user root.
>>
>>> Tonight I'll try looking at the code that generates the error to see
>>> if I can find anything...
>>
>>Have fun :-)
>>
>>
>>> Thanks,
>>> Daniel
>>>
>>> On Tue, 29 Mar 2005 08:07:11 +0200, "Michael Herger"
>>> <slim (AT) herger (DOT) net> wrote:
>>>
>>>> Daniel
>>>>
>>>> What linux are you using? How did you install?
>>>>
>>>> On Mon, 28 Mar 2005 23:21:14 +0000, Daniel Born <born_daniel (AT) yahoo (DOT) com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> If I try to have the slimserver run as another user (slimserver), I
>>>>> get this message in log file:
>>>>> DBI connect('dbname=/root/.slimserversql.db','',...) failed: unable to
>>>>> open database file(1) at dbdimp.c line 94 at
>>>>> /usr/local/slimserver6/Slim/DataStores/DBI/DataModel.pm line 106
>>>>>
>>>>> Since my user "slimserver" has its home directory at /home/slimserver,
>>>>> it's not surprising that it can't open the file in the root's home
>>>>> directory. If I use user "root", then it works fine.
>>>>>
>>>>> Thanks,
>>>>> Daniel
>>>>>
>>>>>
>>>>>

Daniel Cohen
2005-03-29, 17:22
On 29/3/05 at 7:40 pm +0000, Neil Sleightholm wrote
>Are you able to run slimserver from the command line and see if you can
>get any additional tracing. I use the command line:
> slim --d_plugins --d_parse --d_remotestream


Will try later

>
>Also if you edit slimserver-convert.conf and change #PIPE# to
>#DEBUGPIPE# you should see mplayer starting with some extra tracing.

slimserver-convert.conf doesn't have #PIPE# anywhere.

It just reads

# AlienBBC - unix version

# Default mplayer up to pre6

rtsp wav * *

[mplayer.sh] -really-quiet -vo null -cache 128 -af
resample=44100:0:1 -ao pcm -nowaveheader -aofile /dev/fd/3 $FILE$

rtsp mp3 * *

[mplayer.sh] -really-quiet -vo null -cache 128 -af
resample=44100:0:1 -ao pcm -aofile /dev/fd/3 $FILE$ | [lame] --silent
-q $QUALITY$ -b $BITRATE$ - -

#

# Alternative for mplayer pre7 or later

#rtsp wav * *

# [mplayer.sh] -really-quiet -vo null -cache 128 -af
resample=44100:0:1 -ao pcm:nowaveheader:file=/dev/fd/3 $FILE$

#rtsp mp3 * *

# [mplayer.sh] -really-quiet -vo null -cache 128 -af
resample=44100:0:1 -ao pcm:file=/dev/fd/3 $FILE$ | [lame] --silent -q
$QUALITY$ -b $BITRATE$ - -

#

# To boost volume, change resample=44100:0:1 to
volume=x:sc,resample=44100:0:1, where x is a number e.g. 8


--
Daniel Cohen