Page 1 of 1

Network Monitor Problem

PostPosted: Wed Jun 09, 2021 11:42 am
by pablorvh83
Hello. I have problems activating the Net Monitor service. I have NWSP2 and a Cloudbox, to do a test mount the hard disk in the Cloudbox and from there I lost Network Monitor in the image you can see that this service is disabled. How can I restore it?

Log

[Tue Jun 08 20:26:30.357314 2021] [auth_digest:notice] [pid 1316] AH01757: generating secret for digest authentication ...
[Tue Jun 08 20:26:30.600896 2021] [mpm_prefork:notice] [pid 1316] AH00163: Apache/2.4.7 (Unix) OpenSSL/1.0.1m PHP/5.6.6 configured -- resuming normal operations
[Tue Jun 08 20:26:30.601303 2021] [core:notice] [pid 1316] AH00094: Command line: '/usr/bin/httpd -f httpd.conf -d /etc'
[Tue Jun 08 20:41:35.513327 2021] [mpm_prefork:error] [pid 1316] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
API[2021/06/08 21:54:50] daemonfunc_vnstat_commit.finc(110)[1634]: Error: kill daemon [killall vnstatd] failed (1).
API[2021/06/08 21:54:50] sysfunc_set_net_monitor.finc(16)[1634]: Error: fail to stop or start vnstatd, err= -2
API[2021/06/08 21:58:04] sysfunc_addon_hassupdate.finc(63)[1634]: Not found addons-url on [http://plugout.net]

Re: Network Monitor Problem

PostPosted: Wed Jun 09, 2021 1:50 pm
by Jocko
Hi

Do you have enable first the network traffic monitor ? You have to do from the LAN setup menu by checking the option "Enable the network traffic monitor"

Re: Network Monitor Problem

PostPosted: Wed Jun 09, 2021 4:29 pm
by pablorvh83
Yes I did, but it returns an error that Enable Net Monitor cannot be enabled error: (- 2). I have checked vnstat.conf in the / var / directory I have checked nas_conf_xml in the / etc directory I have checked nas_services, the code of the php files without achieving anything.
Tomorrow I will show the image of the error so that you could see them.

Re: Network Monitor Problem

PostPosted: Wed Jun 09, 2021 5:56 pm
by Jocko
Ok

But I don't understand what you mean by "I have checked vnstat.conf in the / var / directory" because no vnstat.conf file is set by the firmware

Re: Network Monitor Problem

PostPosted: Thu Jun 10, 2021 9:10 am
by Jocko
Hi

I deepened more your issue. I think there is an orphan file in /var: pid file whereas vnstat is not running. In this case by rebooting the nas, all should be right again

Re: Network Monitor Problem

PostPosted: Thu Jun 10, 2021 11:58 am
by pablorvh83
Sorry yesterday I couldn't sit down to check the NAS. When I go to the configuration of the LAN network the service appears enabled, I discard it and there this error appears

Error: fail to stop or start vnstatd, err = -2

I have rebooted, shutdown, changed the vnstat value in the xml file located in / etc / from true to false. Executed the program that is located in / usr / sbin / vnstat obtaining the results in console mode. When I activate or deactivate the checkbox in the LAN configuration I always get the same result, you cannot save configarion.

Error: fail to stop or start vnstatd, err = -2

And the end result is the image shown above.

Re: Network Monitor Problem

PostPosted: Thu Jun 10, 2021 12:31 pm
by Jocko
Hi

pablorvh83 wrote:Executed the program that is located in / usr / sbin / vnstat obtaining the results in console mode
It was not a good idea because vnstat must be run as a daemon and unless you did it some options were missing
So we go to reset fully the vnstat environment:
I assume that vnstat is not enabled (checkbox unchecked) then run these commands
Code: Select all
killall vnstatd
unlink /var/run/vnstat.pid
chmod 775 /etc
chown 0:999 /etc
rm -rf '/direct-usb/fvdw/vnstat'
rm -rf '/usr/htdocs/.vnstat'

Store the attached package in a share, I assume fvdw, and install the new files:
Code: Select all
tar -xf /direct-usb/fvdw/restore-vnstat.tgz -C /


Then try to enable vnstat (use only the firmware interface!), you can or not reboot the nas first.

Re: Network Monitor Problem

PostPosted: Thu Jun 10, 2021 2:25 pm
by pablorvh83
Thanks Jocko, today i am going to test it and i will give you an answer about what happens. Greetings.

Re: Network Monitor Problem

PostPosted: Fri Jun 11, 2021 12:27 pm
by pablorvh83
Images of the procedure to restore the vnstat service. The service is up and running again. Thanks Jocko.