Error ntopng requires redis server to be up and running

redis-server [26973] 12 Oct 12:04:57.356 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf [26973] 12 Oct 12:04:5...

No, it does NOT work; I hope you’ll take 1 mn to read the following proof:

root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# ls -al libssl*
lrwxrwxrwx 1 actionmystique actionmystique 35 Oct 12 09:20 libssl.so -> /usr/lib/x86_64-linux-gnu/libssl.so
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# ./ntopng —version
v.2.1.151015 [Community Edition]
GIT rev: dev:a35ec1ea8c86d32b5b0c64351bbabfac0b88b798:20151015
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# make cert
openssl req -new -x509 -sha1 -extensions v3_ca -nodes -days 365 -out cert.pem
Generating a 2048 bit RSA private key
………………+++
…………………+++

writing new private key to ‘privkey.pem’

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,

If you enter ‘.’, the field will be left blank.

Country Name (2 letter code) [AU]:FR
State or Province Name (full name) [Some-State]:Yvelines
Locality Name (eg, city) []:Fontenay-Le-Fleury
Organization Name (eg, company) [Internet Widgits Pty Ltd]:SIT
Organizational Unit Name (eg, section) []:Consultants
Common Name (e.g. server FQDN or YOUR name) []:ntopng.msi-ge60-ubuntu.actionmystique.net
Email Address []:manciot.jeanchristophe@gmail.com
cat privkey.pem cert.pem > httpdocs/ssl/ntopng-cert.pem
/bin/rm -f privkey.pem cert.pem
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# ntopng -i 1 —user root
15/Oct/2015 20:04:31 [Ntop.cpp:929] Setting local networks to 127.0.0.0/8
15/Oct/2015 20:04:31 [Redis.cpp:105] Successfully connected to redis 127.0.0.1:6379@0
15/Oct/2015 20:04:32 [PcapInterface.cpp:81] Reading packets from interface wlan0…
15/Oct/2015 20:04:32 [Ntop.cpp:1178] Registered interface view wlan0 [id: 4]
15/Oct/2015 20:04:32 [Ntop.cpp:1148] Registered interface wlan0 [id: 0]
15/Oct/2015 20:04:32 [Utils.cpp:304] User changed to root
15/Oct/2015 20:04:32 [main.cpp:237] PID stored in file /var/tmp/ntopng.pid


15/Oct/2015 20:04:32 [HTTPserver.cpp:458] Please read https://github.com/ntop/ntopng/blob/dev/doc/README.SSL if you want to enable SSL.


15/Oct/2015 20:04:32 [HTTPserver.cpp:501] Web server dirs [/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng/httpdocs][/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng/scripts]
15/Oct/2015 20:04:32 [HTTPserver.cpp:504] HTTP server listening on port 3000
15/Oct/2015 20:04:32 [main.cpp:290] Working directory: /var/tmp/ntopng
15/Oct/2015 20:04:32 [main.cpp:292] Scripts/HTML pages directory: /home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng
15/Oct/2015 20:04:32 [Ntop.cpp:260] Welcome to ntopng x86_64 v.2.1.151015 — (C) 1998-15 ntop.org
15/Oct/2015 20:04:32 [Ntop.cpp:265] Built on Ubuntu 15.04
15/Oct/2015 20:04:32 [PeriodicActivities.cpp:53] Started periodic activities loop…
15/Oct/2015 20:04:32 [RuntimePrefs.cpp:32] Dumping alerts into syslog
15/Oct/2015 20:04:32 [Ntop.cpp:512] Adding 192.168.1.0/24 as IPv4 local network
15/Oct/2015 20:04:32 [Ntop.cpp:542] Adding fe80::260a:64ff:fedd:b13c/64 as IPv6 local network
15/Oct/2015 20:04:32 [NetworkInterface.cpp:1450] Started packet polling on interface wlan0 [id: 0]…
^C15/Oct/2015 20:04:45 [main.cpp:37] Shutting down…
15/Oct/2015 20:04:45 [PcapInterface.cpp:183] Terminated packet polling for wlan0
^C15/Oct/2015 20:04:46 [main.cpp:34] Ok I am leaving now

Содержание

  1. Running on WindowsВ¶
  2. List Monitored InterfacesВ¶
  3. Manipulating ntopng Windows Service SettingsВ¶
  4. TroubleshootingВ¶
  5. Redis Connection error [Connection refused] #2429
  6. Comments
  7. ERROR: ntopng requires redis server to be up and running although it is up and running #224
  8. Comments
  9. writing new private key to ‘privkey.pem’
  10. Error ntopng requires redis server to be up and running

Running on WindowsВ¶

on Windows ntopng runs as service. The ntopng installer registers the service and automatically starts is as shown below.

The Windows Services Manager

You can start ntopng from cmd.exe only for debug purposes or for manipulating the service settings. In this case you can start cmd.exe (i.e. Windows Commands Prompt) and navigate to the ntopng installation directory (i.e. C:Program Filesntopng). Commands are issued after a /c that stands for console. For example to display the inline help it suffices to run

ntopng requires the Redis service to be up and running or it will not start. Make sure this service is running and auto-started on boot. Check its status from the Services application.

List Monitored InterfacesВ¶

As network interfaces on Windows can have long names, a numeric index is associated to the interface in order to ease the ntopng configuration. The association between interface name and index is shown in the inline help.

In the above example the network adapter Intel(R) PRO/1000 MT Desktop is associated with index 1. To select this adapter ntopng needs to be started with -i 1 option.

Manipulating ntopng Windows Service SettingsВ¶

Windows services are started and stopped using the Services application part of the Windows administrative tools. When ntopng is used as service, command line options need to be specified at service registration and can be modified only by removing and re-adding the service. The ntopng installer registers ntopng as a service with the default options. The default registered service options can be changed using these commands:

Note that when you install the ntopng service (/i) you can specify a configuration file (the format is the same one used on Linux) instead of specifying the individual options. Example

Please make sure to

  • Specify an absolute configuration file path (i.e. c:….) and not a local one.
  • Store the file in a directory that is readeable by the Windows service manager.

TroubleshootingВ¶

ntopng requires the Redis service to be activated in order to start. You can check Redis status from the Services application.

In some Windows PCs, in particular those with WiFi adapters, ntopng might not be able to detect these adapters. Shall this be the case, we suggest you to uninstall the Win10Pcap drivers that are installed with ntopng and move to the ncap Windows drivers that can be installed from ncap Windows drivers.

Источник

Redis Connection error [Connection refused] #2429

This issue has come up with newer version(s) of the ntopng deb. Specifically I was just now testing with this deb:

and using this /etc/ntopng/ntopng.conf

If I try to start it with «systemctl start ntopng», it fails with this complaint even through stock Ubuntu redis-server is indeed running:

I even fired up a dedicated new redis service on port 6380, confirmed it was working with «redis-cli -p 6380» and added this to ntopng.conf, but systemctl still fails in exactly the same way

But if I start it ntopng the manual way, it starts up, daemonizes, and works just fine in my web browser:

In either case, my redis-server is installed and running just fine

Somehow it appears that the running redis-server process is invisible to systemd where ntopng is involved, thus preventing my from using systemctl to start it.

Do you have any idea what might be going on?

The text was updated successfully, but these errors were encountered:

Are you running ubuntu 16? It works fine in my test system with a modified version of the configuration above

Yes, Ubuntu 16.04 Server. I am not sure how to further diagnose this as it only comes up when systemctl tries to start ntopng. I actually find that on another Ubuntu 16.04 server in a very similar role, that the version of ntopng installed via the same exact deb does not exhibit this problem. Any ideas on how I could test this further?

You can try to inspect the loopback interface communication on port 6379 and see how ntopng and redis communicate and what goes wrong. ntopng sends a «PING» message to redis to verify the communication. The other option is to reinstall ntopng or install the dev version as this issue is really weird

Hi, I inspected the loopback interface and zero packets on 6379 are seen when I run «systemctl start ntopng» while when I just run «ntopng /etc/ntopng/ntopng.conf» I do see the expected redis packets.

I then tried using strace when starting up ntopng with systemctl but nothing particularly interesting stood out to me when inspecting all the noisy output of that.

Lastly I switched to installing the daily build deb rather than the stable deb for ntopng and it still fails with systemctl while working with a manual call, but the error output is a bit different:

and this is seen in syslog output

One other thing I tried was to blow away ntopng.conf entirely and run ntopng that way so it just takes default settings only, which when I start manually does result in the daemon coming up. When I tweaked /etc/systemd/system/ntopng.service to remove the reference to ntopng.conf, the same failure occurs with a systemctl start attempt, so it appears clear there is nothing in my unique ntopng.conf breaking things.

This really is perplexing and I welcome any other diagnostic suggestions you might have.

Connection error [Connection refused] that seems more a firewall issue.

Please, check and make sure there’s nothing blocking such connections. maybe iptables?

It is only reaching out to localhost to reach the running redis service.
When I run /usr/local/bin/ntopng /etc/ntopng/ntopng.conf it works
but when I run systemctl start ntopng it fails
so I can’t see how iptables could be interfering

I’ve just tried to reproduce using your exact config and

. it works perfectly on ubuntu16.

Note that it doesn’t matter if it’s on localhost . if there’s something (e.g., a firewall) preventing ntopng from connecting on localhost. the connection will fail.

  • try and remove option —daemon
  • are you sure the /etc/systemd/system/ntopng.service hasn’t been changed/tampered?

Regular output is

That is, there is a series of ExecStartPre, ExecStopPost that don’t show up in your output..

Try with an apt-get install —reinstall ntopng

I purged and reinstalled ntopng, making sure the ntopng.service file was untouched and now it shows the missing lines you mentioned. Yes I had commented those lines out experimentally earlier.

This time I also completely disabled ufw and flushed iptables.

Then while running «systemctl start ntopng» in one terminal I ran «tcpdump -i lo port 6389 -nn» in another terminal and caught zero packets.

It still fails with the same mysterious complaint. Is there perhaps some specific way I might use strace to see more details about the attempt to connect to redis? I am not very good with that tool but open to suggestions.

Thanks for sticking with me on this,
Kevin

Источник

ERROR: ntopng requires redis server to be up and running although it is up and running #224

redis-server
[26973] 12 Oct 12:04:57.356 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[26973] 12 Oct 12:04:57.357 * Increased maximum number of open files to 10032 (it was originally set to 1024).
.
.- __ »-._ _.- . . »-._ Redis 2.8.19 (00000000/0) 64 bit
.- .-«.«/ _.,_ »-._ ( ‘ , .- | , ) Running in stand alone mode | -. -. — __. -. -._|’ .-‘| Port: 6379
| -._ ._ / .-‘ | PID: 26973
-._ -.
-./ _.-‘ _.-‘ | -. -._ -.**.-‘ .-‘.-‘|
| -._ -.
.-‘.-‘ | http://redis.io
-._ -. -.**.-‘_.-‘ _.-‘ | -. -._ -.**.-‘ .-‘.-‘|
| -._ -._ .-‘.-‘ |
-._ -. -.**.-‘_.-‘ _.-‘ -. -.__.-‘ _.-‘ -._ _.-‘
`-.__.-‘

[26973] 12 Oct 12:04:57.358 # Server started, Redis version 2.8.19
[26973] 12 Oct 12:04:57.358 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
[26973] 12 Oct 12:04:57.358 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
[26973] 12 Oct 12:04:57.358 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
[26973] 12 Oct 12:04:57.358 * The server is now ready to accept connections on port 6379

/Ntop/ntopng$ ntopng -i 1 -user actionmystique
12/Oct/2015 12:07:34 [Prefs.cpp:580] ntopng will use redis actionmystique:6379@0
12/Oct/2015 12:07:34 [Prefs.cpp:797] Logging into /var/tmp/ntopng/ntopng.log
12/Oct/2015 12:07:34 [Ntop.cpp:929] Setting local networks to 127.0.0.0/8
12/Oct/2015 12:07:34 [Redis.cpp:92] ERROR: ntopng requires redis server to be up and running
12/Oct/2015 12:07:34 [Redis.cpp:93] ERROR: Please start it and try again or use -r
12/Oct/2015 12:07:34 [Redis.cpp:94] ERROR: to specify a redis server other than the default

The text was updated successfully, but these errors were encountered:

I do not know if it is a copy-paste error, but if you want to specify a different system user you have to specify it using ‘—‘ (double dash) and not just ‘-‘.
Probably the system detects the ‘r’ of ‘-user’ as the option -r to specify the redis location (checkout the following log line)
12/Oct/2015 12:07:34 [Prefs.cpp:580] ntopng will use redis actionmystique:6379@0
According to the help, I suggest you to use either —user action mystique or -U mystique in your cli

You’re right: —user instead of -user.
One complimentary question: do you know how to compile ntopng with openssl support; the» configure —help» does not talk about it.

I already followed those guidelines.

What platform and package are you using exactly?

ntopng x86_64 v.2.1.151014
Ubuntu 15.04

Ah I cannot help I told you. The packages are for Ubuntu 14.04 LTS. I use myself for developing Ubuntu 15.04 and if you compile from source everything will work.

No, it does NOT work; I hope you’ll take 1 mn to read the following proof:

root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# ls -al libssl*
lrwxrwxrwx 1 actionmystique actionmystique 35 Oct 12 09:20 libssl.so -> /usr/lib/x86_64-linux-gnu/libssl.so
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# ./ntopng —version
v.2.1.151015 [Community Edition]
GIT rev: dev:a35ec1ea8c86d32b5b0c64351bbabfac0b88b798:20151015
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Ntop/ntopng# make cert
openssl req -new -x509 -sha1 -extensions v3_ca -nodes -days 365 -out cert.pem
Generating a 2048 bit RSA private key
. +++
. +++

writing new private key to ‘privkey.pem’

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,

Источник

Error ntopng requires redis server to be up and running

Всем привет , работаю с 2.3.2-RELEASE (amd64) built on Tue Jul 19 12:44:43 CDT 2016 FreeBSD 10.3-RELEASE-p5 , установил пакет ntopng , все работало замечательно , моргнул свет , включаю смотрю в сервисе ntopng лежит , зашел в командную строку пытаюсь стартануть : ntopng.

ntopng : 27/Mar/2017 17:34:15 [Prefs.cpp:919] Logging into /var/tmp/ntopng/ntopng.log
27/Mar/2017 17:34:15 [Ntop.cpp:1121] Setting local networks to 127.0.0.0/8
27/Mar/2017 17:34:17 [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
27/Mar/2017 17:34:17 [Redis.cpp:80] ERROR: Please start it and try again or use -r
27/Mar/2017 17:34:17 [Redis.cpp:81] ERROR: to specify a redis server other than the default

Идем дальше смотрю логи redis’a :

Redis logs : /var/log/redis/redis.log
13771:M 27 Mar 16:06:34.087 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:06:34.087 * Background saving started by pid 73803
73803:C 27 Mar 16:06:34.092 * DB saved on disk
13771:M 27 Mar 16:06:34.194 * Background saving terminated with success
13771:M 27 Mar 16:11:35.077 * 10 changes in 300 seconds. Saving.
13771:M 27 Mar 16:11:35.078 * Background saving started by pid 89520
89520:C 27 Mar 16:11:35.083 * DB saved on disk
13771:M 27 Mar 16:11:35.181 * Background saving terminated with success
13771:M 27 Mar 16:16:36.083 * 10 changes in 300 seconds. Saving.
13771:M 27 Mar 16:16:36.083 * Background saving started by pid 11670
11670:C 27 Mar 16:16:36.088 * DB saved on disk
13771:M 27 Mar 16:16:36.190 * Background saving terminated with success
13771:M 27 Mar 16:21:37.029 * 10 changes in 300 seconds. Saving.
13771:M 27 Mar 16:21:37.030 * Background saving started by pid 32620
32620:C 27 Mar 16:21:37.035 * DB saved on disk
13771:M 27 Mar 16:21:37.137 * Background saving terminated with success
13771:M 27 Mar 16:26:38.083 * 10 changes in 300 seconds. Saving.
13771:M 27 Mar 16:26:38.084 * Background saving started by pid 81885
81885:C 27 Mar 16:26:38.089 * DB saved on disk
13771:M 27 Mar 16:26:38.191 * Background saving terminated with success
13771:M 27 Mar 16:31:39.071 * 10 changes in 300 seconds. Saving.
13771:M 27 Mar 16:31:39.072 * Background saving started by pid 24264
24264:C 27 Mar 16:31:39.077 * DB saved on disk
13771:M 27 Mar 16:31:39.173 * Background saving terminated with success
13771:signal-handler (1490632348) Received SIGTERM scheduling shutdown.
13771:M 27 Mar 16:32:28.955 # User requested shutdown.
13771:M 27 Mar 16:32:28.955 * Saving the final RDB snapshot before exiting.
13771:M 27 Mar 16:32:28.968 * DB saved on disk
13771:M 27 Mar 16:32:28.968 * Removing the pid file.
13771:M 27 Mar 16:32:28.968 # Redis is now ready to exit, bye bye.

Решил проблему так : service-redis /usr/local/etc/redis.conf
Я думал что я решил проблему :DD перезагружаю ПК и вижу что все повторяется по кругу

Сислоги :
syslog : Mar 27 11:02:48 pfSense php-fpm[280]: /rc.start_packages: [ntopng] Cannot set admin password — redis-server is not running.
Mar 27 11:02:50 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:02:50 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:03:10 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:03:10 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:06:42 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:06:42 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:12:30 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:12:30 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:14:24 pfSense admin: /usr/local/etc/rc.d/redis: WARNING: failed to start redis
Mar 27 11:18:52 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:18:52 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:20:33 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:20:33 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:20:48 pfSense admin: /usr/local/etc/rc.d/redis: WARNING: failed to start redis

Если кто нибудь сталкивался с проблемой , помогите пожалуйста .

Источник

Topic: ntopng and redis  (Read 11719 times)

I had both of these working on my setup, but have noticed recently that neither of them were running and wouldn’t start after a reboot or when trying to manually start them.

I’ve removed both plugins and retried installing them, yet they still will not start

Would there be a configuration setup that could be preventing these from restarting/working

thanks


Logged


Can you search the forums? There was a guy with similar problem, deleting some old db folder and rsinstalled .. then it worked


Logged


I had similar issue which is resolved by below:

Note: Some times directly removing database works without removing package but mostly not..
1. Remove ntog and redis package.
2. Remove redis database: From Terminal:
# rm -rf /var/db/redis/DATABASE
OR Simple remove entire filder
# rm -rf /var/db/redis
3. Reinstall package and it will work.


Logged


you don’t need to reinstall. You can also stop the service and then execute your commands and afterwards start redis again.

It may save you some time.


Logged


sorry for the late response (had a lot going on)

I only have the two nics on the board (gigabyte j1900n-d3v) and the webgui is listening on the lan interface only.

my current setup is
modem (hg612) -> opnsense -> samknows whitebox -> switch -> devices

My internet provider is Sky who renew the lease every 30 minutes and if the lease does not renew successfully you get disconnected, but I don’t think this is the issue as if connect to my modem (hg612) and can see that it is still connected and can connect to other devices on my network.

When I loose connection to the internet I cannot access the opnsense box via ip address or via name, nor can i access the internet and only way to rectify the issue is to force reboot the system (which has potential to cause drive issues if not careful)

I’m not sure what is causing the failures, but compared to when I was running pfsense, I’ve had more downtime with opnsense since installing than I ever did with pfsense in two years.

« Last Edit: January 08, 2019, 10:57:24 am by walkerx »


Logged


I’m here for the same reason.  Both services stopped a little while ago and no longer run.  Maybe there has been a change driven by an update or something?  All worked fine before.


Logged


same here.
i came from 18.7.1 where redis, ntopng, and ups were working as expected, to 19.1.1 and both ntopng and ups are complaining.

now, the ups part is something i find normal due to the small amount of testing it has had (blazer driver), but ntopng is something i dont understand…

redis is started, is listening to localhost, but when trying to start ntopng it mentions that redis needs to be started.


Logged



Logged


concerning the ups, it just states the ups is unavailable. seems like a regression of some sorts in the driver.

concerning redis/ntopng, redis starts fine and is running.
ntopng however cannot seem to find it.

root@firewall:/usr/local/etc/nut # service redis status
redis is running as pid 161.
root@firewall:/usr/local/etc/nut # service ntopng status
ntopng is not running.
root@firewall:/usr/local/etc/nut # service ntopng start
Starting ntopng.
05/Mar/2019 17:19:34 [Ntop.cpp:1902] Setting local networks to 127.0.0.0/8
05/Mar/2019 17:19:34 [Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
05/Mar/2019 17:19:34 [Redis.cpp:112] ERROR: Please start it and try again or use -r
05/Mar/2019 17:19:34 [Redis.cpp:113] ERROR: to specify a redis server other than the default
root@firewall:/usr/local/etc/nut # sockstat | grep -i redis
redis    redis-serv 161   5  dgram  -> /var/run/log
redis    redis-serv 161   7  tcp4   127.0.0.1:6379        *:*
redis    redis-serv 161   8  tcp6   ::1:6379              *:*
redis    redis-serv 161   9  stream /var/run/redis/redis.sock
root@firewall:/usr/local/etc/nut #

additionally, for some reason, my dns will no longer respond to queries on and from 127.0.0.1 (even though it is running), but will respond to queries to any of the other interface addresses.

obody   dnsmasq    61335 14 udp4   10.0.1.1:53           *:*
nobody   dnsmasq    61335 15 tcp4   10.0.1.1:53           *:*
nobody   dnsmasq    61335 16 udp4   127.0.0.1:53          *:*
nobody   dnsmasq    61335 17 tcp4   127.0.0.1:53          *:*

mind you that i commented in this topic, but i am currently running 19.1.2

« Last Edit: March 05, 2019, 05:32:09 pm by ThuTex »


Logged


ok guys, i fixed the issue with ntopng.

I remembered a bug/feature discussion about the loopback interface (and renaming it etc because it could be used as an actual interface)

@mimugmail and @franco werent you guys part of that discussion? :)
anyway, since it seemed no service was available on the loopback interface, i decided to go for a guess and went into Firewall: Virtual IPs: Settings and added 127.0.0.1 without gateway as an ip alias on the loopback interface.

dns, ping, and ntopng now function as expected.
maybe an oversight somewhere ?

(i did check on the terminal and lo0 did have 127.0.0.1 assigned already, but i still needed to add it to the virtual ip list for it to actually work)

« Last Edit: March 05, 2019, 05:47:07 pm by ThuTex »


Logged


I can confirm setting up a virtual IP for 127.0.0.1 fixed this issue for me. I ran into this issue tonight after setting up Unbound to do DNS over TLS (well I think that’s what caused it as it!).


Logged


This sounds like https://github.com/opnsense/core/issues/3287

It seems ntopng is the real culprit here. Adding a VIP 127.0.0.1 just indicates the system is highly unstable as that should never be required.

We suspected that ntopng listening on all interfaces / loopback would maybe cause this…

Cheers,
Franco


Logged


Всем привет , работаю с 2.3.2-RELEASE (amd64)  built on Tue Jul 19 12:44:43 CDT 2016  FreeBSD 10.3-RELEASE-p5  , установил пакет ntopng , все работало замечательно , моргнул свет , включаю смотрю в сервисе ntopng лежит , зашел в командную строку пытаюсь стартануть : ntopng.

ntopng : 27/Mar/2017 17:34:15 [Prefs.cpp:919] Logging into /var/tmp/ntopng/ntopng.log
27/Mar/2017 17:34:15 [Ntop.cpp:1121] Setting local networks to 127.0.0.0/8
27/Mar/2017 17:34:17 [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
27/Mar/2017 17:34:17 [Redis.cpp:80] ERROR: Please start it and try again or use -r
27/Mar/2017 17:34:17 [Redis.cpp:81] ERROR: to specify a redis server other than the default

Идем дальше смотрю логи redis’a :

Redis logs : /var/log/redis/redis.log
13771:M 27 Mar 16:06:34.087 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:06:34.087 * Background saving started by pid 73803
73803:C 27 Mar 16:06:34.092 * DB saved on disk
13771:M 27 Mar 16:06:34.194 * Background saving terminated with success
13771:M 27 Mar 16:11:35.077 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:11:35.078 * Background saving started by pid 89520
89520:C 27 Mar 16:11:35.083 * DB saved on disk
13771:M 27 Mar 16:11:35.181 * Background saving terminated with success
13771:M 27 Mar 16:16:36.083 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:16:36.083 * Background saving started by pid 11670
11670:C 27 Mar 16:16:36.088 * DB saved on disk
13771:M 27 Mar 16:16:36.190 * Background saving terminated with success
13771:M 27 Mar 16:21:37.029 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:21:37.030 * Background saving started by pid 32620
32620:C 27 Mar 16:21:37.035 * DB saved on disk
13771:M 27 Mar 16:21:37.137 * Background saving terminated with success
13771:M 27 Mar 16:26:38.083 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:26:38.084 * Background saving started by pid 81885
81885:C 27 Mar 16:26:38.089 * DB saved on disk
13771:M 27 Mar 16:26:38.191 * Background saving terminated with success
13771:M 27 Mar 16:31:39.071 * 10 changes in 300 seconds. Saving…
13771:M 27 Mar 16:31:39.072 * Background saving started by pid 24264
24264:C 27 Mar 16:31:39.077 * DB saved on disk
13771:M 27 Mar 16:31:39.173 * Background saving terminated with success
13771:signal-handler (1490632348) Received SIGTERM scheduling shutdown…
13771:M 27 Mar 16:32:28.955 # User requested shutdown…
13771:M 27 Mar 16:32:28.955 * Saving the final RDB snapshot before exiting.
13771:M 27 Mar 16:32:28.968 * DB saved on disk
13771:M 27 Mar 16:32:28.968 * Removing the pid file.
13771:M 27 Mar 16:32:28.968 # Redis is now ready to exit, bye bye…

Решил проблему так : service-redis /usr/local/etc/redis.conf
Я думал что я решил проблему :DD перезагружаю ПК и вижу что все повторяется по кругу

Сислоги :
syslog : Mar 27 11:02:48 pfSense php-fpm[280]: /rc.start_packages: [ntopng] Cannot set admin password — redis-server is not running.
Mar 27 11:02:50 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:02:50 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:03:10 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:03:10 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:06:42 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:06:42 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:12:30 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:12:30 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:14:24 pfSense admin: /usr/local/etc/rc.d/redis: WARNING: failed to start redis
Mar 27 11:18:52 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:18:52 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:20:33 pfSense ntopng: [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
Mar 27 11:20:33 pfSense ntopng: [Redis.cpp:81] ERROR: to specify a redis server other than the default
Mar 27 11:20:48 pfSense admin: /usr/local/etc/rc.d/redis: WARNING: failed to start redis

Если кто нибудь сталкивался с проблемой , помогите  пожалуйста .

Updated 9/11/2015: New instructions on how to start and configure ntopng, after Ntop has changed the behaviour. New CentOS repository added. Hiredis is now needed. Thanks so much to Shashi and Steven for your comments.

Ntop NG is an extraordinary tool that helps you to know more about your network traffic. It has a lot of great features and I use it mainly to know quickly what kind of traffic is being generated in my network lab thanks to its web interface with summaries and rrd charts. It supports sFlow so it will be great to use it with openvswitch and get some statistics.

Ntop offers RPM packages for both CentOS/RHEL 6 and CentOS/RHEL 7 so it’s very easy to install.

First of all we’re going to add the EPEL repository:

yum install epel-release wget

We’ll need to install the latest RPM packages: ntopng-data and ntopng.

Let’s create the ntop repository for the nightly builds:

cat <<EOT > /etc/yum.repos.d/ntop.repo
[ntop]
name=ntop packages
baseurl=http://packages.ntop.org/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://packages.ntop.org/centos/RPM-GPG-KEY-deri
[ntop-noarch]
name=ntop packages
baseurl=http://packages.ntop.org/centos/$releasever/noarch/
enabled=1
gpgcheck=1
gpgkey=http://packages.ntop.org/centos/RPM-GPG-KEY-deri
EOT

Let’s install the packages. We’ll have to accept Luca Deri’s GPG key:

yum install ntopng ntopng-data

Updated (thanks to Davide Lorenzetti for his comment): Let’s install the hiredis-devel package and start the redis server before starting ntopng. You can also enable the service to start at boot time using: systemctl enable redis.service

yum install hiredis-devel
systemctl start redis.service

Let’s start ntopng using systemctl.

systemctl start ntopng.service

Ntop will create a default configuration file at /etc/ntopng/ntopng.conf, however if you check the status, you’ll see that NTOP warns you about no Pro licence is found and so it will run in community mode after 10 minutes.

systemctl status ntopng
oct 16 19:29:38 tornasol.artemit.lab ntopng[3001]: [pro/NtopPro.cpp:145] WARNING: [LICENSE] ntopng will now run in pro mode for 10 minutes oct 16 19:29:38 tornasol.artemit.lab ntopng[3001]: [pro/NtopPro.cpp:147] WARNING: [LICENSE] before returning to community mode oct 16 19:29:38 tornasol.artemit.lab ntopng[3001]: [pro/NtopPro.cpp:148] WARNING: [LICENSE] You can buy a permanent license at http://shop.ntop.org oct 16 19:29:38 tornasol.artemit.lab ntopng[3001]: [pro/NtopPro.cpp:149] WARNING: [LICENSE] or run ntopng in community mode starting oct 16 19:29:38 tornasol.artemit.lab ntopng[3001]: [pro/NtopPro.cpp:150] WARNING: [LICENSE] ntopng --community oct 16 19:29:39 tornasol.artemit.lab ntopng[3001]: [src/HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 3000,3001s Success

As we have no Pro licence (unless you get one of course) we can edit /etc/ntopng/ntopng.conf file to remove the warnings (I’ve added a after the pid file):

-G=/var/tmp/ntopng.pid
--community

We’ll restart ntopng and check the status again:

systemctl restart ntopng
systemctl status ntopng
ntopng.service - Start/stop ntopng program Loaded: loaded (/etc/systemd/system/ntopng.service; enabled) Active: active (running) since vie 2015-10-16 21:19:52 CEST; 21s ago Process: 1711 ExecStop=/etc/systemd/scripts/ntopng stop (code=exited, status=0/SUCCESS) Process: 1756 ExecStart=/etc/systemd/scripts/ntopng start (code=exited, status=0/SUCCESS) Main PID: 1762 (ntopng) CGroup: /system.slice/ntopng.service └─1762 /usr/bin/ntopng /etc/ntopng/ntopng.conf oct 16 21:19:52 tornasol.artemit.lab ntopng[1756]: Starting ntopng: [ OK ] oct 16 21:19:52 tornasol.artemit.lab systemd[1]: Started Start/stop ntopng program.

Sweet. You can also enable the service to start at boot time using:

systemctl enable redis.service
systemctl enable ntopng.service

Ntopng listens by default at the 3000 TCP port so you’ll need a firewall rule if trying
to get access from a remote machine. If using the dynamic firewall daemon you can use
firewall-cmd to configure the firewall to allow traffic to 3000 port coming from a specific IP address (-s X.X.X.X, e.g my IP is 192.168.5.100). Note that this rule is not permanent.

firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 3000 -s 192.168.5.100 -j ACCEPT

Using a web browser, introduce the IP address of the host running ntop specifying port 3000(e.g http://192.168.1.185:3000). If a login/password shows, enter user admin and password admin and enjoy your ntopng network monitor!

ntop_screenshot

If you want to set any configuration options to /etc/ntopng/ntopng.conf file, I found it a little tricky so read the man page (man ntopng). I’ll update this post offering some examples.

A big thank you to Luca Deri and Ntop’s team!

Cheers!

P.S: If you want to use SSL with the web interface please read my post

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error no matching distribution found for torch
  • Error not supported between instances of nonetype and int
  • Error no matching distribution found for tensorflow
  • Error not support wireless lan in system
  • Error not set start date generation please call перевод

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии