Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Darkstat installed but there is no service running

    Scheduled Pinned Locked Moved Traffic Monitoring
    29 Posts 2 Posters 9.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      doktornotor Banned
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • N Offline
        ninoalcamo
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • N Offline
          ninoalcamo
          last edited by

          @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?

          1 Reply Last reply Reply Quote 0
          • D Offline
            doktornotor Banned
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • N Offline
              ninoalcamo
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • D Offline
                doktornotor Banned
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • N Offline
                  ninoalcamo
                  last edited by

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

                  my wan isn't down, it works properly without darkstat.
                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    doktornotor Banned
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      ninoalcamo
                      last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        doktornotor Banned
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          ninoalcamo
                          last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            doktornotor Banned
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              doktornotor Banned
                              last edited by

                              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.

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                doktornotor Banned
                                last edited by

                                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.

                                1 Reply Last reply Reply Quote 0
                                • N Offline
                                  ninoalcamo
                                  last edited by

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

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    doktornotor Banned
                                    last edited by

                                    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.

                                    1 Reply Last reply Reply Quote 0
                                    • N Offline
                                      ninoalcamo
                                      last edited by

                                      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?

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        doktornotor Banned
                                        last edited by

                                        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

                                        1 Reply Last reply Reply Quote 0
                                        • N Offline
                                          ninoalcamo
                                          last edited by

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

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            doktornotor Banned
                                            last edited by

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

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.