aaea [Solved] MPDScribble : pid error at system startup - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Multimedia

Multimedia Having problems running your new shiny and blinking gadget or watching DVDs, listening to CDs etc.?

Reply
 
Thread Tools Display Modes
  #1  
Old December 21st, 2009, 17:52
AxelBSD AxelBSD is offline
Junior Member
 
Join Date: Nov 2008
Location: Paris, France
Posts: 35
Thanks: 14
Thanked 1 Time in 1 Post
Default MPDScribble : pid error at system startup

Hi,

I have installed from ports mpdscribble on my laptop under 8.0-p1 and configured it (/usr/local/etc/mpdscribble.conf).
I have added the line in /etc/rc.conf
Code:
mpdscribble_enable="YES"
to launch it at system startup but I got the message
Code:
mpdscribble: Failed to create pidfile /var/run/mpdscribble.pid: Permission denied
If I launch it from root or using the sudo command, I haven't got problem.
But from startup or from my user account (that is in 'wheel' and 'operator' groups), I got the same message above.

I have created a system user called "mpdscribble" using the command :
Code:
# pw user add mpdscribble -c "mpdscribble" \-d noexistent -s /usr/sbin/nologin
and set the option daemon_user in the conf file but I always got the same error.

Here my conf file /usr/local/etc/mpdscribble.conf :

Code:
## mpdscribble - an audioscrobbler for the Music Player Daemon.
## http://mpd.wikia.com/wiki/Client:mpdscribble

# HTTP proxy URL.
#proxy = http://the.proxy.server:3128

# The location of the pid file.  mpdscribble saves its process id there.
pidfile = /var/run/mpdscribble.pid

# Change to this system user after daemonization.
#daemon_user = mpdscribble

# The location of the mpdscribble log file.  The special value
# "syslog" makes mpdscribble use the local syslog daemon.  On most
# systems, log messages will appear in /var/log/daemon.log then.
# "-" means log to stderr (the current terminal).
log = syslog

# How verbose mpdscribble's logging should be.  Default is 1.
verbose = 1

# How often should mpdscribble save the journal file? [seconds]
journal_interval = 600

# The host running MPD, possibly protected by a password
# ([passw...@]hostname).  Defaults to $MPD_HOST or localhost.
host = localhost

# The port that the MPD listens on and mpdscribble should try to
# connect to.  Defaults to $MPD_PORT or 6600.
port = 6600

[last.fm]
url = http://post.audioscrobbler.com/
username =my_username
password =my_password
# The file where mpdscribble should store its Last.fm journal in case
# you do not have a connection to the Last.fm server.
journal = /var/cache/mpdscribble/lastfm.journal

#[libre.fm]
#url = http://turtle.libre.fm/
#username = my_username
#password = my_password
#journal = /var/cache/mpdscribble/librefm.journal

#[jamendo]
#url = http://postaudioscrobbler.jamendo.com/
#username = my_username
#password = my_password
#journal = /var/cache/mpdscribble/jamendo.journal
Thank you in advance.

Last edited by AxelBSD; December 22nd, 2009 at 16:54. Reason: Add "Solved" to the thread title
Reply With Quote
  #2  
Old December 21st, 2009, 18:16
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,694
Thanks: 47
Thanked 2,020 Times in 1,859 Posts
Default

That user ID doesn't have permission to write in /var/run/. The solution is to create a directory /var/run/mpdscribble and set the owner to mpdscribble. You also need to change the pid location to /var/run/mpdscribble/mpdscribble.pid.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old December 22nd, 2009, 16:59
AxelBSD AxelBSD is offline
Junior Member
 
Join Date: Nov 2008
Location: Paris, France
Posts: 35
Thanks: 14
Thanked 1 Time in 1 Post
Smile

I have found a solution to my problem.
I have created the directory /var/run/mpdscribble
But the error was always present.
Then I changed rights to this directory with the umask 777 and rebooted the system : the error disappeared.
The PID file was well created by "nobody" user.

To solve my problem, I changed the owner of /var/run/mpdscribble directory ("nobody" user) and the group to "mpdscribble" (as created before).

Now, mpdscribble can start at system startup without problem.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
System > Administration > Network > Unlock button > ERROR engine252 GNOME 1 August 23rd, 2009 10:13
[Solved] see error when system start or reboot mfaridi System Hardware 4 August 14th, 2009 18:38
need help error : "pid 3612 (httpd), uid 80: exited on signal 11" saktie Web & Network Services 1 August 5th, 2009 10:20
about FreeBSD system services startup smartly General 14 May 13th, 2009 11:49
System full- error ki_ko Installing & Upgrading 4 March 20th, 2009 22:19


All times are GMT +1. The time now is 10:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0