Fedora Linux Support Community & Resources Center
  #1  
Old 4th December 2011, 05:59 AM
futuremonkey Offline
Registered User
 
Join Date: Feb 2009
Posts: 12
linuxfirefox
Can't start vnstat daemon, maybe permissions problem?

Fedora 16, KDE spin.

I'm having this problem with vnstat, and already tried the solution posted at that thread.

When I try to start the daemon, this is what shows up in /var/log/messages:

Code:
Dec  3 23:52:39 nexus6 vnstatd[6710]: vnStat daemon 1.11 started.               
Dec  3 23:52:39 nexus6 vnstatd[6710]: Error: pidfile failed, exiting.           
Dec  3 23:52:39 nexus6 vnstat[6706]: Starting vnstatd: pidfile: Permission denied
According to /etc/vnstat.conf, the pid file is supposed to be at /var/run/vnstat.pid.

Also, if I configure it to write its log messages to LogFile "/var/log/vnstat.log", the file is never created. It does write its messages to /var/log/messages.

I tried setting SELinux to permissive mode and that didn't help.

Any ideas?

Last edited by futuremonkey; 4th January 2012 at 05:04 AM.
Reply With Quote
  #2  
Old 4th December 2011, 12:38 PM
326bd935 Offline
Registered User
 
Join Date: Dec 2010
Posts: 34
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

If you are running as normal user you have to be part of the vnstat group, check which group owns the file with ls -l.
Reply With Quote
  #3  
Old 4th December 2011, 01:18 PM
futuremonkey Offline
Registered User
 
Join Date: Feb 2009
Posts: 12
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

I can run vnstat as a normal user and get realtime info, but since the daemon won't start (and thus the traffic databases are never updated) I can't get cumulative info, which is the only reason I want to use vnstat in the first place.

Code:
                      rx      /      tx      /     total    /   estimated
 p2p1: Not enough data available yet.
 wlan0: Not enough data available yet.
.. after a few weeks.
Reply With Quote
  #4  
Old 4th December 2011, 03:03 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,666
linuxfedorafirefox
Re: Can't start daemon, maybe permissions problem?

Try changing the pid file to "/run/vnstat.pid"

Fedora 15/16 have changed and no longer use /var/run.... You might also try making a symbolic link (if /var/run doesn't exist) to /run.
Reply With Quote
  #5  
Old 5th December 2011, 02:47 AM
futuremonkey Offline
Registered User
 
Join Date: Feb 2009
Posts: 12
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

Thanks, but that didn't work either. /var/run is already linked to /run, by the way.
Reply With Quote
  #6  
Old 4th January 2012, 04:49 AM
futuremonkey Offline
Registered User
 
Join Date: Feb 2009
Posts: 12
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

Still no progress on this.
Reply With Quote
  #7  
Old 9th January 2012, 10:12 AM
mrlee Offline
Registered User
 
Join Date: May 2011
Posts: 16
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

I have same problem but I found workaround and it works fine!
You need to edit one line in the /etc/rc.d/init.d/vnstat file then
it will work fine:

In the line where it says daemon --user vnstat $VNSTATD_BIN -d
will have to change --user "vnstat" into "root"

You can do this manually or execute this command it will do all this by itself [amazing]:
sudo sed -i 's/daemon --user vnstat/daemon --user root/' /etc/rc.d/init.d/vnstat

it should look like this:

line 37: daemon --user root $VNSTATD_BIN -d

After all this done then:
sudo service vnstat restart


This works for me nice. I'm not sure if this will work for you. But try. Its worth... good day

Last edited by mrlee; 9th January 2012 at 10:33 AM. Reason: better idea
Reply With Quote
  #8  
Old 20th January 2013, 09:06 PM
mrlee Offline
Registered User
 
Join Date: May 2011
Posts: 16
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

Now I have Fedora 17 installed and the same problems with vnstat nothing seems is fixed. I still getting Unable create database backup /var/lib/vnstat/.ppp0
To fix this I exceute this command:
sudo sed -i 's/daemon --user vnstat/daemon --user root/' /etc/rc.d/init.d/vnstat
which makes vnstatd to run as a root (this supposed to fix red/write permission) then I got next error in log - SELinux is preventing vnstatd from using the dac_override capability then I had to make selinux to allow vnstat to do whatever reason was blocked. Then after issuing command sudo service vnstat restart the vnstat is again loging data and is working seems properely if something goes wrong I will post it...

Last edited by mrlee; 21st January 2013 at 09:19 AM. Reason: mistake
Reply With Quote
  #9  
Old 5th February 2013, 06:53 AM
LinuxBlue Offline
Registered User
 
Join Date: Jan 2013
Location: Australia
Posts: 19
linuxfedorakonqueror
Re: Can't start daemon, maybe permissions problem?

Re: Can't start daemon, maybe permissions problem?
I have same problem but I found workaround and it works fine!
You need to edit one line in the /etc/rc.d/init.d/vnstat file then
it will work fine:

In the line where it says daemon --user vnstat $VNSTATD_BIN -d
will have to change --user "vnstat" into "root"

You can do this manually or execute this command it will do all this by itself [amazing]:
sudo sed -i 's/daemon --user vnstat/daemon --user root/' /etc/rc.d/init.d/vnstat

it should look like this:

line 37: daemon --user root $VNSTATD_BIN -d

After all this done then:
sudo service vnstat restart
Reply With Quote
  #10  
Old 5th February 2013, 09:58 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,666
linuxfirefox
Re: Can't start daemon, maybe permissions problem?

Perhaps that was all that was needed to avoid the SELinux alert too?
Reply With Quote
Reply

Tags
daemon, permissions, problem, start

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Hal Daemon Fails to Start shduff Using Fedora 8 25th November 2013 08:48 PM
HAL Daemon won't start SideshowMel Hardware & Laptops 8 27th February 2013 04:54 AM
Hal daemon fails to start mukiwa Using Fedora 3 9th December 2006 06:49 PM
How to start vsftpd as a daemon ? hongqian Servers & Networking 2 8th December 2006 07:07 AM
to start LISa daemon? tibin2 Servers & Networking 2 22nd November 2004 03:16 PM


Current GMT-time: 01:14 (Thursday, 24-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat