Re: Latest stable Ubuntu 16.04 ntopng deb fails on supposed missing redis server but only when started by systemctl

Kevin Branch <[email protected]> Mon, 25 Feb 2019 20:59:27 -0500
Newsgroups gmane.linux.ntop.general
Message-ID <CA+dGL9F3_8-3w42xx9dDhKH2VG8f2Hpe+daAd9oLN__YdTHADg@mail.gmail.com>
--===============8895790009358624871==
Content-Type: multipart/alternative; boundary="000000000000f44d1a0582c26800"

--000000000000f44d1a0582c26800
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=3D9845,expires=3D9762,avg_ttl=3D1832241


On Thu, Feb 21, 2019 at 4:04 AM Emanuele Faranda <[email protected]> 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_amd6=
4.deb
>
> and using this /etc/ntopng/ntopng.conf
>
>
> --http-port=3D0
> --https-port=3D3000
> --data-dir=3D/usr/local/ntopng
> --local-networks=3D"192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
> --interface=3Deth1
> --interface=3Deth2
> --dns-mode=3D1
> --community
> --daemon
> --disable-login=3D1
> -G=3D/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
> =E2=97=8F 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 [email protected]://listgateway.unipi.it/mai=
lman/listinfo/ntop
>
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop

--000000000000f44d1a0582c26800
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Indeed I can:<div><br></div><div><div>roo=
t@NSM:~# redis-cli info</div><div># Server</div><div>redis_version:3.0.6</d=
iv><div>redis_git_sha1:00000000</div><div>redis_git_dirty:0</div><div>redis=
_build_id:28b6715d3583bf8e</div><div>redis_mode:standalone</div><div>os:Lin=
ux 4.4.0-141-generic x86_64</div><div>arch_bits:64</div><div>multiplexing_a=
pi:epoll</div><div>gcc_version:5.4.0</div><div>process_id:5184</div><div>ru=
n_id:ee16ae2d1cf3121a11195d9dae222fe65199b26a</div><div>tcp_port:6379</div>=
<div>uptime_in_seconds:458809</div><div>uptime_in_days:5</div><div>hz:10</d=
iv><div>lru_clock:7642404</div><div>config_file:/etc/redis/redis.conf</div>=
<div><br></div><div># Clients</div><div>connected_clients:3</div><div>clien=
t_longest_output_list:0</div><div>client_biggest_input_buf:0</div><div>bloc=
ked_clients:0</div><div><br></div><div># Memory</div><div>used_memory:71061=
60</div><div>used_memory_human:6.78M</div><div>used_memory_rss:19603456</di=
v><div>used_memory_peak:24644712</div><div>used_memory_peak_human:23.50M</d=
iv><div>used_memory_lua:36864</div><div>mem_fragmentation_ratio:2.76</div><=
div>mem_allocator:jemalloc-3.6.0</div><div><br></div><div># Persistence</di=
v><div>loading:0</div><div>rdb_changes_since_last_save:604</div><div>rdb_bg=
save_in_progress:0</div><div>rdb_last_save_time:1551146252</div><div>rdb_la=
st_bgsave_status:ok</div><div>rdb_last_bgsave_time_sec:0</div><div>rdb_curr=
ent_bgsave_time_sec:-1</div><div>aof_enabled:0</div><div>aof_rewrite_in_pro=
gress:0</div><div>aof_rewrite_scheduled:0</div><div>aof_last_rewrite_time_s=
ec:-1</div><div>aof_current_rewrite_time_sec:-1</div><div>aof_last_bgrewrit=
e_status:ok</div><div>aof_last_write_status:ok</div><div><br></div><div># S=
tats</div><div>total_connections_received:17</div><div>total_commands_proce=
ssed:97662381</div><div>instantaneous_ops_per_sec:54</div><div>total_net_in=
put_bytes:7594073868</div><div>total_net_output_bytes:6696286668</div><div>=
instantaneous_input_kbps:4.66</div><div>instantaneous_output_kbps:3.12</div=
><div>rejected_connections:0</div><div>sync_full:0</div><div>sync_partial_o=
k:0</div><div>sync_partial_err:0</div><div>expired_keys:982251</div><div>ev=
icted_keys:0</div><div>keyspace_hits:21703677</div><div>keyspace_misses:583=
63958</div><div>pubsub_channels:0</div><div>pubsub_patterns:0</div><div>lat=
est_fork_usec:1174</div><div>migrate_cached_sockets:0</div><div><br></div><=
div># Replication</div><div>role:master</div><div>connected_slaves:0</div><=
div>master_repl_offset:0</div><div>repl_backlog_active:0</div><div>repl_bac=
klog_size:1048576</div><div>repl_backlog_first_byte_offset:0</div><div>repl=
_backlog_histlen:0</div><div><br></div><div># CPU</div><div>used_cpu_sys:46=
11.45</div><div>used_cpu_user:1096.64</div><div>used_cpu_sys_children:17.90=
</div><div>used_cpu_user_children:79.96</div><div><br></div><div># Cluster<=
/div><div>cluster_enabled:0</div><div><br></div><div># Keyspace</div><div>d=
b0:keys=3D9845,expires=3D9762,avg_ttl=3D1832241</div></div><div><br></div><=
/div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Thu, Feb 21, 2019 at 4:04 AM Emanuele Faranda &lt;<a href=3D"mailto=
:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF">
    <p>Hi Kevin,</p>
    <p>Can you successfully use the redis cli tools? For example, can
      you successfully run &quot;redis-cli info&quot; from the terminal?</p=
>
    <p>Regards,<br>
    </p>
    <p>Emanuele<br>
    </p>
    <div class=3D"gmail-m_1193236798133950657moz-cite-prefix">On 2/21/19 3:=
50 AM, Kevin Branch wrote:<br>
    </div>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div dir=3D"ltr">
          <div dir=3D"ltr">
            <div dir=3D"ltr">
              <div>This issue has come up with newer version(s) of the
                ntopng deb.=C2=A0 Specifically I was just now testing with
                this deb:</div>
              <div><br>
              </div>
              <blockquote>
                <div><a href=3D"http://packages.ntop.org/apt-stable/16.04/x=
64/ntopng_3.8.190219-6179_amd64.deb" target=3D"_blank">http://packages.ntop=
.org/apt-stable/16.04/x64/ntopng_3.8.190219-6179_amd64.deb</a></div>
                <div><br>
                </div>
              </blockquote>
              and using this /etc/ntopng/ntopng.conf<br>
            </div>
            <blockquote>
              <div>
                <div><br>
                </div>
                <div>--http-port=3D0</div>
              </div>
              <div>
                <div>--https-port=3D3000</div>
              </div>
              <div>
                <div>--data-dir=3D/usr/local/ntopng</div>
              </div>
              <div>
                <div>--local-networks=3D&quot;<a href=3D"http://192.168.0.0=
/16,10.0.0.0/8,172.16.0.0/12" target=3D"_blank">192.168.0.0/16,10.0.0.0/8,1=
72.16.0.0/12</a>&quot;</div>
              </div>
              <div>
                <div>--interface=3Deth1</div>
              </div>
              <div>
                <div>--interface=3Deth2</div>
              </div>
              <div>
                <div>--dns-mode=3D1</div>
              </div>
              <div>
                <div>--community</div>
              </div>
              <div>
                <div>--daemon</div>
              </div>
              <div>
                <div>--disable-login=3D1</div>
              </div>
              <div>
                <div>-G=3D/var/tmp/ntopng.pid</div>
              </div>
              <div><br>
              </div>
            </blockquote>
            If I try to start it with &quot;systemctl start ntopng&quot;, i=
t fails
            with this complaint even through stock Ubuntu redis-server
            is indeed running:</div>
          <blockquote>
            <div>
              <div>
                <div><br>
                </div>
                <div>Feb 20 19:29:35=C2=A0<a href=3D"http://nsm.server.org/=
" target=3D"_blank">nsm.server.org</a>=C2=A0ntopng[7443]:
                  20/Feb/2019 19:29:35 [Redis.cpp:111] ERROR: ntopng
                  requires redis server to be up and running</div>
              </div>
            </div>
            <div>
              <div>
                <div>Feb 20 19:29:35 nsm.server=C2=A0.org ntopng[7443]:
                  20/Feb/2019 19:29:35 [Redis.cpp:112] ERROR: Please
                  start it and try again or use -r</div>
              </div>
            </div>
            <div>
              <div>
                <div>Feb 20 19:29:35 nsm.server=C2=A0.org ntopng[7443]:
                  20/Feb/2019 19:29:35 [Redis.cpp:113] ERROR: to specify
                  a redis server other than the default</div>
              </div>
            </div>
          </blockquote>
          <div dir=3D"ltr">
            <div><br>
            </div>
            <div>Manually adding the -r option to=C2=A0ntopng.conf pointed =
at
              the running redis-server listener makes no difference.</div>
            <div><br>
            </div>
            <div>But if I start it ntopng the manual way, it starts up,
              daemonizes, and works just fine in my web browser:</div>
            <div><br>
            </div>
          </div>
          <blockquote>
            <div dir=3D"ltr">
              <div>/usr/local/bin/ntopng /etc/ntopng/ntopng.conf<br>
              </div>
              <div><br>
              </div>
            </div>
          </blockquote>
        </div>
        <div>In either case, my redis-server is installed and running
          just fine</div>
        <div dir=3D"ltr"><br>
          <div dir=3D"ltr">
            <blockquote>
              <div>
                <div>root@nsm:~# apt info redis-server</div>
                <div>E: Invalid operation info</div>
                <div>root@nsm:~# apt show redis-server</div>
                <div>Package: redis-server</div>
                <div>Version: 2:3.0.6-1ubuntu0.3</div>
                <div>Priority: optional</div>
                <div>Section: universe/misc</div>
                <div>Source: redis</div>
                <div>Origin: Ubuntu</div>
                <div>...</div>
                <div><br>
                </div>
                <div>root@nsm:~# systemctl status redis-server</div>
                <div>=E2=97=8F redis-server.service - Advanced key-value st=
ore</div>
                <div>=C2=A0 =C2=A0Loaded: loaded
                  (/lib/systemd/system/redis-server.service; enabled;
                  vendor preset: enabled)</div>
                <div>=C2=A0 =C2=A0Active: active (running) since Wed 2019-0=
2-20
                  18:31:08 UTC; 56min ago</div>
                <div>=C2=A0 =C2=A0...</div>
              </div>
            </blockquote>
            <br>
            <div dir=3D"ltr">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.</div>
            <div dir=3D"ltr"><br>
            </div>
            <div>Do you have any idea what might be going on?=C2=A0=C2=A0</=
div>
            <div class=3D"gmail-m_1193236798133950657gmail-yj6qo gmail-m_11=
93236798133950657gmail-ajU">
              <div id=3D"gmail-m_1193236798133950657gmail-:346" class=3D"gm=
ail-m_1193236798133950657gmail-ajR"><img class=3D"gmail-m_11932367981339506=
57gmail-ajT"></div>
            </div>
            <span class=3D"gmail-m_1193236798133950657gmail-HOEnZb gmail-m_=
1193236798133950657gmail-adL">
              <div>Kevin Branch</div>
            </span></div>
        </div>
      </div>
      <br>
      <fieldset class=3D"gmail-m_1193236798133950657mimeAttachmentHeader"><=
/fieldset>
      <pre class=3D"gmail-m_1193236798133950657moz-quote-pre">_____________=
__________________________________
Ntop mailing list
<a class=3D"gmail-m_1193236798133950657moz-txt-link-abbreviated" href=3D"ma=
ilto:[email protected]" target=3D"_blank">[email protected]=
</a>
<a class=3D"gmail-m_1193236798133950657moz-txt-link-freetext" href=3D"http:=
//listgateway.unipi.it/mailman/listinfo/ntop" target=3D"_blank">http://list=
gateway.unipi.it/mailman/listinfo/ntop</a></pre>
    </blockquote>
  </div>

_______________________________________________<br>
Ntop mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Ntop@listgat=
eway.unipi.it</a><br>
<a href=3D"http://listgateway.unipi.it/mailman/listinfo/ntop" rel=3D"norefe=
rrer" target=3D"_blank">http://listgateway.unipi.it/mailman/listinfo/ntop</=
a></blockquote></div>

--000000000000f44d1a0582c26800--

--===============8895790009358624871==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop
--===============8895790009358624871==--