Mailing List Archive

Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl
This issue has come up with newer version(s) of the ntopng deb.
Specifically I was just now testing with this deb:

http://packages.ntop.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb

and using this /etc/ntopng/ntopng.conf


--http-port=0
--https-port=3000
--data-dir=/usr/local/ntopng
--local-networks="192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
--interface=eth1
--interface=eth2
--dns-mode=1
--community
--daemon
--disable-login=1
-G=/var/tmp/ntopng.pid

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


Feb 20 19:29:35 nsm.server.org ntopng[7443]: 20/Feb/2019 19:29:35
[Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
[Redis.cpp:112] ERROR: Please start it and try again or use -r
Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
[Redis.cpp:113] ERROR: to specify a redis server other than the default


Manually adding the -r option to ntopng.conf pointed at the running
redis-server listener makes no difference.

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

/usr/local/bin/ntopng /etc/ntopng/ntopng.conf

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

root@nsm:~# apt info redis-server
E: Invalid operation info
root@nsm:~# apt show redis-server
Package: redis-server
Version: 2:3.0.6-1ubuntu0.3
Priority: optional
Section: universe/misc
Source: redis
Origin: Ubuntu
...

root@nsm:~# systemctl status redis-server
? redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled;
vendor preset: enabled)
Active: active (running) since Wed 2019-02-20 18:31:08 UTC; 56min ago
...


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?
Kevin Branch
Re: Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl [ In reply to ]
Hi Kevin,

Can you successfully use the redis cli tools? For example, can you
successfully run "redis-cli info" from the terminal?

Regards,

Emanuele

On 2/21/19 3:50 AM, Kevin Branch wrote:
> This issue has come up with newer version(s) of the ntopng deb. 
> Specifically I was just now testing with this deb:
>
> http://packages.ntop.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb
>
> and using this /etc/ntopng/ntopng.conf
>
>
> --http-port=0
> --https-port=3000
> --data-dir=/usr/local/ntopng
> --local-networks="192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
> <http://192.168.0.0/16,10.0.0.0/8,172.16.0.0/12>"
> --interface=eth1
> --interface=eth2
> --dns-mode=1
> --community
> --daemon
> --disable-login=1
> -G=/var/tmp/ntopng.pid
>
> If I try to start it with "systemctl start ntopng", it fails with this
> complaint even through stock Ubuntu redis-server is indeed running:
>
>
> Feb 20 19:29:35 nsm.server.org
> <http://nsm.server.org/> ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:111] ERROR: ntopng requires redis server to be up and
> running
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:112] ERROR: Please start it and try again or use -r
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:113] ERROR: to specify a redis server other than the
> default
>
>
> Manually adding the -r option to ntopng.conf pointed at the running
> redis-server listener makes no difference.
>
> But if I start it ntopng the manual way, it starts up, daemonizes, and
> works just fine in my web browser:
>
> /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
>
> In either case, my redis-server is installed and running just fine
>
> root@nsm:~# apt info redis-server
> E: Invalid operation info
> root@nsm:~# apt show redis-server
> Package: redis-server
> Version: 2:3.0.6-1ubuntu0.3
> Priority: optional
> Section: universe/misc
> Source: redis
> Origin: Ubuntu
> ...
>
> root@nsm:~# systemctl status redis-server
> ? redis-server.service - Advanced key-value store
>    Loaded: loaded (/lib/systemd/system/redis-server.service;
> enabled; vendor preset: enabled)
>    Active: active (running) since Wed 2019-02-20 18:31:08 UTC;
> 56min ago
>    ...
>
>
> 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?
> Kevin Branch
>
> _______________________________________________
> Ntop mailing list
> Ntop@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop
Re: Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl [ In reply to ]
Indeed I can:

root@NSM:~# redis-cli info
# Server
redis_version:3.0.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:28b6715d3583bf8e
redis_mode:standalone
os:Linux 4.4.0-141-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:5.4.0
process_id:5184
run_id:ee16ae2d1cf3121a11195d9dae222fe65199b26a
tcp_port:6379
uptime_in_seconds:458809
uptime_in_days:5
hz:10
lru_clock:7642404
config_file:/etc/redis/redis.conf

# Clients
connected_clients:3
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:7106160
used_memory_human:6.78M
used_memory_rss:19603456
used_memory_peak:24644712
used_memory_peak_human:23.50M
used_memory_lua:36864
mem_fragmentation_ratio:2.76
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:604
rdb_bgsave_in_progress:0
rdb_last_save_time:1551146252
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:17
total_commands_processed:97662381
instantaneous_ops_per_sec:54
total_net_input_bytes:7594073868
total_net_output_bytes:6696286668
instantaneous_input_kbps:4.66
instantaneous_output_kbps:3.12
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:982251
evicted_keys:0
keyspace_hits:21703677
keyspace_misses:58363958
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:1174
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:4611.45
used_cpu_user:1096.64
used_cpu_sys_children:17.90
used_cpu_user_children:79.96

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=9845,expires=9762,avg_ttl=1832241


On Thu, Feb 21, 2019 at 4:04 AM Emanuele Faranda <faranda@ntop.org> wrote:

> Hi Kevin,
>
> Can you successfully use the redis cli tools? For example, can you
> successfully run "redis-cli info" from the terminal?
>
> Regards,
>
> Emanuele
> On 2/21/19 3:50 AM, Kevin Branch wrote:
>
> This issue has come up with newer version(s) of the ntopng deb.
> Specifically I was just now testing with this deb:
>
>
> http://packages.ntop.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb
>
> and using this /etc/ntopng/ntopng.conf
>
>
> --http-port=0
> --https-port=3000
> --data-dir=/usr/local/ntopng
> --local-networks="192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
> --interface=eth1
> --interface=eth2
> --dns-mode=1
> --community
> --daemon
> --disable-login=1
> -G=/var/tmp/ntopng.pid
>
> If I try to start it with "systemctl start ntopng", it fails with this
> complaint even through stock Ubuntu redis-server is indeed running:
>
>
> Feb 20 19:29:35 nsm.server.org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:112] ERROR: Please start it and try again or use -r
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:113] ERROR: to specify a redis server other than the default
>
>
> Manually adding the -r option to ntopng.conf pointed at the running
> redis-server listener makes no difference.
>
> But if I start it ntopng the manual way, it starts up, daemonizes, and
> works just fine in my web browser:
>
> /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
>
> In either case, my redis-server is installed and running just fine
>
> root@nsm:~# apt info redis-server
> E: Invalid operation info
> root@nsm:~# apt show redis-server
> Package: redis-server
> Version: 2:3.0.6-1ubuntu0.3
> Priority: optional
> Section: universe/misc
> Source: redis
> Origin: Ubuntu
> ...
>
> root@nsm:~# systemctl status redis-server
> ? redis-server.service - Advanced key-value store
> Loaded: loaded (/lib/systemd/system/redis-server.service; enabled;
> vendor preset: enabled)
> Active: active (running) since Wed 2019-02-20 18:31:08 UTC; 56min ago
> ...
>
>
> 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?
> Kevin Branch
>
> _______________________________________________
> Ntop mailing listNtop@listgateway.unipi.ithttp://listgateway.unipi.it/mailman/listinfo/ntop
>
> _______________________________________________
> Ntop mailing list
> Ntop@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop
Re: Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl [ In reply to ]
Indeed I can:

root@NSM:~# redis-cli info
# Server
redis_version:3.0.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:28b6715d3583bf8e
redis_mode:standalone
os:Linux 4.4.0-141-generic x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:5.4.0
process_id:5184
run_id:ee16ae2d1cf3121a11195d9dae222fe65199b26a
tcp_port:6379
uptime_in_seconds:458809
uptime_in_days:5
hz:10
lru_clock:7642404
config_file:/etc/redis/redis.conf

# Clients
connected_clients:3
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:7106160
used_memory_human:6.78M
used_memory_rss:19603456
used_memory_peak:24644712
used_memory_peak_human:23.50M
used_memory_lua:36864
mem_fragmentation_ratio:2.76
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:604
rdb_bgsave_in_progress:0
rdb_last_save_time:1551146252
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:17
total_commands_processed:97662381
instantaneous_ops_per_sec:54
total_net_input_bytes:7594073868
total_net_output_bytes:6696286668
instantaneous_input_kbps:4.66
instantaneous_output_kbps:3.12
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:982251
evicted_keys:0
keyspace_hits:21703677
keyspace_misses:58363958
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:1174
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:4611.45
used_cpu_user:1096.64
used_cpu_sys_children:17.90
used_cpu_user_children:79.96

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=9845,expires=9762,avg_ttl=1832241


On Thu, Feb 21, 2019 at 4:04 AM Emanuele Faranda <faranda@ntop.org> wrote:

> Hi Kevin,
>
> Can you successfully use the redis cli tools? For example, can you
> successfully run "redis-cli info" from the terminal?
>
> Regards,
>
> Emanuele
> On 2/21/19 3:50 AM, Kevin Branch wrote:
>
> This issue has come up with newer version(s) of the ntopng deb.
> Specifically I was just now testing with this deb:
>
>
> http://packages.ntop.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb
>
> and using this /etc/ntopng/ntopng.conf
>
>
> --http-port=0
> --https-port=3000
> --data-dir=/usr/local/ntopng
> --local-networks="192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
> --interface=eth1
> --interface=eth2
> --dns-mode=1
> --community
> --daemon
> --disable-login=1
> -G=/var/tmp/ntopng.pid
>
> If I try to start it with "systemctl start ntopng", it fails with this
> complaint even through stock Ubuntu redis-server is indeed running:
>
>
> Feb 20 19:29:35 nsm.server.org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:112] ERROR: Please start it and try again or use -r
> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019 19:29:35
> [Redis.cpp:113] ERROR: to specify a redis server other than the default
>
>
> Manually adding the -r option to ntopng.conf pointed at the running
> redis-server listener makes no difference.
>
> But if I start it ntopng the manual way, it starts up, daemonizes, and
> works just fine in my web browser:
>
> /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
>
> In either case, my redis-server is installed and running just fine
>
> root@nsm:~# apt info redis-server
> E: Invalid operation info
> root@nsm:~# apt show redis-server
> Package: redis-server
> Version: 2:3.0.6-1ubuntu0.3
> Priority: optional
> Section: universe/misc
> Source: redis
> Origin: Ubuntu
> ...
>
> root@nsm:~# systemctl status redis-server
> ? redis-server.service - Advanced key-value store
> Loaded: loaded (/lib/systemd/system/redis-server.service; enabled;
> vendor preset: enabled)
> Active: active (running) since Wed 2019-02-20 18:31:08 UTC; 56min ago
> ...
>
>
> 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?
> Kevin Branch
>
> _______________________________________________
> Ntop mailing listNtop@listgateway.unipi.ithttp://listgateway.unipi.it/mailman/listinfo/ntop
>
> _______________________________________________
> Ntop mailing list
> Ntop@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop
Re: Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl [ In reply to ]
There should be no differences in running ntopng as a service or from
cli with config file as the redis connection is handled manually and not
by systemd.

Please open an issue on https://github.com/ntop/ntopng .

Regards,

Emanuele

On 2/26/19 2:59 AM, Kevin Branch wrote:
> Indeed I can:
>
> root@NSM:~# redis-cli info
> # Server
> redis_version:3.0.6
> redis_git_sha1:00000000
> redis_git_dirty:0
> redis_build_id:28b6715d3583bf8e
> redis_mode:standalone
> os:Linux 4.4.0-141-generic x86_64
> arch_bits:64
> multiplexing_api:epoll
> gcc_version:5.4.0
> process_id:5184
> run_id:ee16ae2d1cf3121a11195d9dae222fe65199b26a
> tcp_port:6379
> uptime_in_seconds:458809
> uptime_in_days:5
> hz:10
> lru_clock:7642404
> config_file:/etc/redis/redis.conf
>
> # Clients
> connected_clients:3
> client_longest_output_list:0
> client_biggest_input_buf:0
> blocked_clients:0
>
> # Memory
> used_memory:7106160
> used_memory_human:6.78M
> used_memory_rss:19603456
> used_memory_peak:24644712
> used_memory_peak_human:23.50M
> used_memory_lua:36864
> mem_fragmentation_ratio:2.76
> mem_allocator:jemalloc-3.6.0
>
> # Persistence
> loading:0
> rdb_changes_since_last_save:604
> rdb_bgsave_in_progress:0
> rdb_last_save_time:1551146252
> rdb_last_bgsave_status:ok
> rdb_last_bgsave_time_sec:0
> rdb_current_bgsave_time_sec:-1
> aof_enabled:0
> aof_rewrite_in_progress:0
> aof_rewrite_scheduled:0
> aof_last_rewrite_time_sec:-1
> aof_current_rewrite_time_sec:-1
> aof_last_bgrewrite_status:ok
> aof_last_write_status:ok
>
> # Stats
> total_connections_received:17
> total_commands_processed:97662381
> instantaneous_ops_per_sec:54
> total_net_input_bytes:7594073868
> total_net_output_bytes:6696286668
> instantaneous_input_kbps:4.66
> instantaneous_output_kbps:3.12
> rejected_connections:0
> sync_full:0
> sync_partial_ok:0
> sync_partial_err:0
> expired_keys:982251
> evicted_keys:0
> keyspace_hits:21703677
> keyspace_misses:58363958
> pubsub_channels:0
> pubsub_patterns:0
> latest_fork_usec:1174
> migrate_cached_sockets:0
>
> # Replication
> role:master
> connected_slaves:0
> master_repl_offset:0
> repl_backlog_active:0
> repl_backlog_size:1048576
> repl_backlog_first_byte_offset:0
> repl_backlog_histlen:0
>
> # CPU
> used_cpu_sys:4611.45
> used_cpu_user:1096.64
> used_cpu_sys_children:17.90
> used_cpu_user_children:79.96
>
> # Cluster
> cluster_enabled:0
>
> # Keyspace
> db0:keys=9845,expires=9762,avg_ttl=1832241
>
>
> On Thu, Feb 21, 2019 at 4:04 AM Emanuele Faranda <faranda@ntop.org
> <mailto:faranda@ntop.org>> wrote:
>
> Hi Kevin,
>
> Can you successfully use the redis cli tools? For example, can you
> successfully run "redis-cli info" from the terminal?
>
> Regards,
>
> Emanuele
>
> On 2/21/19 3:50 AM, Kevin Branch wrote:
>> This issue has come up with newer version(s) of the ntopng deb. 
>> Specifically I was just now testing with this deb:
>>
>> http://packages.ntop.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb
>>
>> and using this /etc/ntopng/ntopng.conf
>>
>>
>> --http-port=0
>> --https-port=3000
>> --data-dir=/usr/local/ntopng
>> --local-networks="192.168.0.0/16,10.0.0.0/8,172.16.0.0/12
>> <http://192.168.0.0/16,10.0.0.0/8,172.16.0.0/12>"
>> --interface=eth1
>> --interface=eth2
>> --dns-mode=1
>> --community
>> --daemon
>> --disable-login=1
>> -G=/var/tmp/ntopng.pid
>>
>> If I try to start it with "systemctl start ntopng", it fails with
>> this complaint even through stock Ubuntu redis-server is indeed
>> running:
>>
>>
>> Feb 20 19:29:35 nsm.server.org
>> <http://nsm.server.org/> ntopng[7443]: 20/Feb/2019 19:29:35
>> [Redis.cpp:111] ERROR: ntopng requires redis server to be up
>> and running
>> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019
>> 19:29:35 [Redis.cpp:112] ERROR: Please start it and try again
>> or use -r
>> Feb 20 19:29:35 nsm.server .org ntopng[7443]: 20/Feb/2019
>> 19:29:35 [Redis.cpp:113] ERROR: to specify a redis server
>> other than the default
>>
>>
>> Manually adding the -r option to ntopng.conf pointed at the
>> running redis-server listener makes no difference.
>>
>> But if I start it ntopng the manual way, it starts up,
>> daemonizes, and works just fine in my web browser:
>>
>> /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
>>
>> In either case, my redis-server is installed and running just fine
>>
>> root@nsm:~# apt info redis-server
>> E: Invalid operation info
>> root@nsm:~# apt show redis-server
>> Package: redis-server
>> Version: 2:3.0.6-1ubuntu0.3
>> Priority: optional
>> Section: universe/misc
>> Source: redis
>> Origin: Ubuntu
>> ...
>>
>> root@nsm:~# systemctl status redis-server
>> ? redis-server.service - Advanced key-value store
>>    Loaded: loaded (/lib/systemd/system/redis-server.service;
>> enabled; vendor preset: enabled)
>>    Active: active (running) since Wed 2019-02-20 18:31:08
>> UTC; 56min ago
>>    ...
>>
>>
>> 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?
>> Kevin Branch
>>
>> _______________________________________________
>> Ntop mailing list
>> Ntop@listgateway.unipi.it <mailto:Ntop@listgateway.unipi.it>
>> http://listgateway.unipi.it/mailman/listinfo/ntop
> _______________________________________________
> Ntop mailing list
> Ntop@listgateway.unipi.it <mailto:Ntop@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop
>
>
> _______________________________________________
> Ntop mailing list
> Ntop@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop