Misbehaviour of ntopng web interface when changing the view in ntop-dashboard

Hi friends,

today I got a ntopng-update to version 4.0 community edition. Great so far. I really like it!

But there is a little misbehaviour of the ntopng site of nethserver.
When I try to change the view in ntopng here:

grafik

I’m redirected to the old server-manager dashboard:
grafik
I’ve to close the ntopng-site and reopen it from ckockpit, to get to the right view.
Tried it in FF and Chrome. Same behaviour.

Can someone please check this also @quality_team ? / cc @giacomo + @andre8244

TIA flatspin

I’m able to reproduce accessing ntopng using https://<fqdn>:980/hash but not directly on port 3000.
How are you accessing it?

It seems a problem on how ntopng handle the -Z option:

192.168.x.x - - [06/Jul/2020:14:25:51 +0200] "GET /xxxx98f335fa9bc68e8e7848525719be943ff084/lua/rest/get/interface/data.lua?ifid=0 HTTP/1.1" 200 1241
192.168.x.x - - [06/Jul/2020:14:25:52 +0200] "GET /xxxx98f335fa9bc68e8e7848525719be943ff084/lua/switch_system_status.lua?system_interface=0&csrf=1fd4fa6a76223535e378c25d278601de HTTP/1.1" 200 16
192.168.x.x - - [06/Jul/2020:14:25:52 +0200] "POST /xxxx98f335fa9bc68e8e7848525719be943ff084/?ifid=8 HTTP/1.1" 302 130
192.168.x.x - - [06/Jul/2020:14:25:52 +0200] "GET /?ifid=8 HTTP/1.1" 302 -

It seems that it does a request with the wrong URL.

I’d like to totally remove the proxy pass? What do you think?

@davide_marini please try to reproduce the issue and open an upstream bug if needed.

Inspecting ntopng web interface we discovered that changing the interface/view executes the following javascript code:

$.get(`/8f40883d7afe6b780fdb28f3e03dac54bc136203/lua/switch_system_status.lua`, {
             system_interface: flag,
             ...
          }, function(data) {
             if (data.success && $form == null) location.href = '/';
             if (data.success && $form != null) $form.submit();
             if (!data.success) {
                console.error("An error has occurred!");
             }
          });
          ...

If $.get() invocation is successful, a redirect to / is issued (location.href = '/').
If the user has accessed ntopng web interface through port 980, this is equivalent to a redirect to NethGUI home/login page.

We are investigating further this issue, we’ll keep informed

1 Like

From the application button “Open bandwidth monitor app” in cockpit:

grafik

I don’t use the old server-manager anymore.

1 Like

So yes, you’re accessing ntopng using the proxy on port 980.

Thanks again for reporting!

I just opened an issue for that :

@flatspin thanks a lot for reporting it!

3 Likes

like reported here: Applications: nTopNG-Link with wrong Port# assigned

Bad news ahead: the new stable version of ntopng is broken so we have to wait next release which should be ntopng 4.2.

The problem will be automatically fixed with next upstream release.

2 Likes

Thanks for your invetigations and your effort @giacomo, @andre8244 and @davide_marini.

It’s a minor issue in my opinion, so it’s o.k. to wait for next upstream release. :wink:

Stay save, my friends!

3 Likes