Darkstat installed but there is no service running



  • I have update to last version, it is 3.1.3_1 and goes out today so I have installed it. Now darkstat doesn't work anymore, there is no service running, it disappear! What happened?


  • Banned

    Perhaps tick the Enable checkbox and Save.



  • There is no Darkstat under Diagnostic menu, so I can't access to darkstat's settings…
    Also, i have reboot pfsense and now router doesn't work, i can't web access login to pfsense, only ssh works, i have restored old configuration backup with no result, pfsense doesn't work anymore... it seems darkstat has broken it! Can I uninstall darkstat through shell?


  • Banned

    No, darkstat did not break pfSense. If you cannot access the GUI, perhaps you have the same issue like here: https://forum.pfsense.org/index.php?topic=124814.msg689342#msg689342



  • Doesn't work! I can't get internet access too. I can only ssh atm. Can I uninstall packages from shell? Squid or darkstat has broken pfsense, because before the package's update was working fine.


  • Banned

    OK, it broke pfSense, we are doomed.  ::)  Provide some errors you get, perhaps.

    
    clog /var/log/system.log
    
    


  • Ok, now it works (maybe i missed something before), but services are off like shown. Still not get access to internet. Reboot pfsense?
    edit:
    Pfsense rebooted, no webgui access, no internet access
    I try to get ssh in and restart webconfigurator (option 11). It returns to work, but still no internet access and same services status
    edit2: disabling and enabling wan interface internet starts to working….



  • Banned

    Dude, read the logs. The widget is nice but won't provide any useful info.



  • I explain what I have done:

    • updated squid packages through web gui
    • uninstalled darkstat
    • reboot
    • now i can access webgui and internet without any problem, all services are on
    • installed darkstat
    • no darkstart service started, and no menu settings under diagnostic menu
    • reboot
    • I can't access webgui on pfsense.

    So the problem is darkstat as I said before.

    Logs:

    Starting package ntopng...done.
    Starting package darkstat...
    [HTTPserver.cpp:503] ERROR: Unable to start HTTP server (IPv4) on ports 3000: Address already in use
    Bootup complete
    

    port 3000 is already used from ntopng….


  • Banned

    Yeah,so you once can access the WebGUI with darkstat, then you cannot access the WebGUI with darkstat… and post completely irrelevant piece of log showing ntopng noise.

    OK, good luck, perhaps someone else, I don't have time for this, sorry. Not even sure why'd you run ntopng and darkstat on the same box, just calls for trouble.



  • i tried to uninstall ntopng first, and then install darkstat but the final result is the same, still not access.
    I decided to uninstall darkstat for now, because I need pfsense working. But how to get it working with it?



  • @doktornotor:

    Yeah,so you once can access the WebGUI with darkstat, then you cannot access the WebGUI with darkstat… and post completely irrelevant piece of log showing ntopng noise.

    OK, good luck, perhaps someone else, I don't have time for this, sorry. Not even sure why'd you run ntopng and darkstat on the same box, just calls for trouble.

    dude, yestarday darkstat was working fine, also with ntopng… since few months, today I have updated it and everything stopped to working. Does your darkstat working fine with last update?


  • Banned

    Maybe you could FINALLY read the logs, and post them here. Instead of this absolutely unproductive bickering. So far the only error you've posted here is totally unrelated to darkstat.

    Sigh.



  • Don't want to seem rude, I thought that with info that I have given you was enough to understand the problem, without logs.
    btw here is the log

    log.txt


  • Banned

    Yeah, so you rebooted and get zillions of "Network is unreachable" messages, and then "Hotplug event detected for WAN(wan)" and "Hotplug event detected for LAN(lan)" and "Hotplug event detected for OPT1(opt1)"

    Dude, darkstat is not plugging your cables in and out. Not really sure what to say here.

    Plus, your WAN seems to be down and you've picked a broken lease from a cable modem:

    IP has changed, killing states on former IP 192.168.100.1.



  • you asked```
    clog /var/log/system.log

    my wan isn't down, it works properly without darkstat.

  • Banned

    Yeah OK. the evil darkstat men are pulling your cables in and out.  ::)

    So far, you've posted ZERO information pertinent to darkstat. Good luck. I'm done wasting my time with this.

    
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense syslogd: sendto: Network is unreachable
    Feb  1 01:12:57 pfsense kernel: bridge0: Ethernet address: 02:90:7b:25:e4:00
    Feb  1 01:12:57 pfsense php-cgi: rc.bootup: Resyncing OpenVPN instances.
    Feb  1 01:12:57 pfsense kernel: em1: promiscuous mode enabled
    Feb  1 01:12:57 pfsense kernel: bridge0: link state changed to UP
    Feb  1 01:12:57 pfsense kernel: em2: promiscuous mode enabled
    Feb  1 01:12:57 pfsense kernel: tun1: changing name to 'ovpns1'
    Feb  1 01:12:57 pfsense kernel: pflog0: promiscuous mode enabled
    Feb  1 01:12:57 pfsense kernel: ovpns1: link state changed to UP
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: Info: starting on ovpns1.
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: on (IP address: 172.16.0.1) (interface: []) (real interface: ovpns1).
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip called with empty interface.
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection -  ->  172.16.0.1 - Restarting packages.
    Feb  1 01:12:59 pfsense check_reload_status: Linkup starting em0
    Feb  1 01:12:59 pfsense kernel: em0: link state changed to UP
    Feb  1 01:12:59 pfsense check_reload_status: Linkup starting em1
    Feb  1 01:12:59 pfsense kernel: em1: link state changed to UP
    Feb  1 01:13:00 pfsense php-fpm[12272]: /rc.linkup: Hotplug event detected for WAN(wan) static IP (x.x.x.x )
    Feb  1 01:13:00 pfsense check_reload_status: rc.newwanip starting em0
    Feb  1 01:13:00 pfsense php-fpm[12272]: /rc.linkup: Hotplug event detected for LAN(lan) static IP (192.168.0.4 )
    Feb  1 01:13:00 pfsense syslogd: sendto: Host is down
    Feb  1 01:13:00 pfsense check_reload_status: rc.newwanip starting em1
    Feb  1 01:13:00 pfsense check_reload_status: Linkup starting em2
    Feb  1 01:13:00 pfsense kernel: em2: link state changed to UP
    Feb  1 01:13:01 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: Info: starting on em0.
    Feb  1 01:13:01 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: on (IP address: 31.185.100.90) (interface: WAN[wan]) (real interface: em0).
    Feb  1 01:13:01 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: Info: starting on em1.
    Feb  1 01:13:01 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: on (IP address: 192.168.0.4) (interface: LAN[lan]) (real interface: em1).
    Feb  1 01:13:01 pfsense php-fpm[12272]: /rc.linkup: Hotplug event detected for OPT1(opt1) static IP ( )
    Feb  1 01:13:01 pfsense check_reload_status: rc.newwanip starting em2
    Feb  1 01:13:02 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: Info: starting on em2.
    Feb  1 01:13:02 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: on (IP address: ) (interface: OPT1[opt1]) (real interface: em2).
    Feb  1 01:13:02 pfsense php-fpm[12272]: /rc.newwanip: IP has changed, killing states on former IP 192.168.100.1.
    
    

    So, you have absolutely whacky configuration there with a bridge, some OpenVPN interface assigned to another WAN, cable problems everywhere, hotplug events, picking up a temp lease from cable modem that's out of sync, but it sure like hell is darkstat fault.



  • Do you think that I want to make wasting time to someone? Sad… You asked logs and I posted it, I have only these informations on logs, nothing about darkstat. If I knew how to solve my problem I couldn't post here


  • Banned

    Yeah, and I'm telling you that you have completely broken network. On hardware/link level. Plus, with your configuration, it's very much a miracle it still manages to work at times.

    I have no idea what's your network configuration, there's a known race issue with OpenVPN assigned interfaces on boot, add bridges to that and the weirdo hotplug events… what are you bridging where? Job for a paid support. Sorry.

    When network is broken, services that require network up to start and work won't start. Yeah. Surprise.



  • I can say that i get that errors link only when system boots up while the network try to get internet. I do not know why … then the router works properly with no issues with no link up/link down issues (with darkstat uninstalled). It seems ridicolous but it is true. Maybe an hardware issue? I will try to reinstall pfsense, thanks for your time and patience.


  • Banned

    That is a giant issue, but not with darkstat. Look, on every such hotplug, the entire firewall gets reloaded, and the packages restarted. Over and over and over again. This absolutely needs to get solved before debugging anything else. Nothing will start properly when your network is broken like this.

    Look here:

    Feb  1 01:12:57 pfsense php-fpm[271]: /rc.start_packages: Restarting/Starting all packages.

    And then - one second later:

    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection -  ->  172.16.0.1 - Restarting packages.

    It just breaks things when you keep restarting them before they even had a chance to start.


  • Banned

    And this:

    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: Info: starting on ovpns1.
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip: on (IP address: 172.16.0.1) (interface: []) (real interface: ovpns1).
    Feb  1 01:12:58 pfsense php-fpm[12272]: /rc.newwanip: rc.newwanip called with empty interface.

    Well that's obviously no good. OpenVPN started before your WAN had a chance to start.

    Feb  1 01:12:59 pfsense check_reload_status: Linkup starting em0
    Feb  1 01:12:59 pfsense kernel: em0: link state changed to UP
    Feb  1 01:13:00 pfsense php-fpm[12272]: /rc.linkup: Hotplug event detected for WAN(wan) static IP (x.x.x.x )

    (As mentioned earlier, there are known issues with assigned OpenVPN interfaces racing on boot).

    Get rid of the OpenVPN assigned thing if at all possible.

    And this finishes the disaster:

    Feb  1 01:13:02 pfsense php-fpm[12272]: /rc.newwanip: IP has changed, killing states on former IP 192.168.100.1.

    So, the cable modem finally got you a valid lease on WAN – and things get restarted for the third time in some <5 seconds. No chance of working in a sane way.

    Also, there's a setting to reject this kind of unwanted leases from modems, use it.


  • Banned

    As for your stray menu entry mentioned elsewhere. If it's still a problem:

    1/ Diagnostics - Backup & Restore - Download configuration as XML. Do NOT proceeed until you have a backup.

    2/ Login via SSH and run this from shell:

    
    cd /tmp
    fetch https://raw.githubusercontent.com/pfsense/FreeBSD-ports/488e5a141599db497898a6305bbfa83daa96fa39/net-mgmt/pfSense-pkg-darkstat/files/usr/local/pkg/darkstat.xml
    
    

    3/ Go to Diagnostics - Command Prompt - Execute PHP Commands, paste this there (use Select, CTRL+C), and Execute:

    
    require_once("/etc/inc/pkg-utils.inc");
    $pkg_config = parse_xml_config_pkg("/tmp/darkstat.xml", "packagegui");
    $menus =& $config['installedpackages']['menu'];
    $changeset = "Removed stray darkstat menu entry";
    if (is_array($pkg_config['menu'])) {
    	if (is_array($pkg_config['menu']) && is_array($menus)) {
    		foreach ($pkg_config['menu'] as $menu) {
    			foreach ($menus as $key => $instmenu) {
    				if ($instmenu['name'] == $menu['name']) {
    					unset($menus[$key]);
    					break;
    				}
    			}
                    }
            }
    }
    write_config($changedesc);
    
    

    4/ Reload the webGUI.



  • Thanks for your help. I will try when I will come back to home


  • Banned

    Get 3.1.3_2 and it will have no issues with menu items or whatever, but obviously that won't solve your network issues. Those really need to be dealt with separately, they cause a lot of collateral damage here with many other packages, which, as you've noticed, fail to start properly as well.



  • I solved swapping pfsense machine with a new one because the old one stopped working definitely, same configuration and there is no problems with packages now. But ntopng still say me this:

    [HTTPserver.cpp:503] ERROR: Unable to start HTTP server (IPv4) on ports 3000: Address already in use 
    

    But there are only darkstat and ntopng running, and darkstat uses 666. If I try to access to pfsense_IP:3000 i can login with no problem. I have read other same issues but without now solutions, is it a bug or what?


  • Banned

    Yeah that ntopng noise has nothing to do with the topic here. Plus ntopng keeps crashing, and crashing, and crashing. https://redmine.pfsense.org/issues/7247



  • So I will uninstall it for now. Thanks for all dok  ;)


  • Banned

    Yeah I guess better wait and check it again when the ntopng package is updated to a newer snapshot build.


Log in to reply