Hi Luca,
I tried valgrind - but there is so much output I can't really figure out
what is happening.
I did try compiling only Redis.cpp with -O2 and that fixed my problem
on the CentOS 6.4 boxes. The only difference between 6634 when I started
seeing the problem are shown below.
Also as a side note I took my compiled ntopng binary from my F14 system
compiled with gcc-c++-4.5.1-4.fc14.i686 and it worked on the CentOS 6.4 box.
The compiler on CentOS 6.4 is gcc-c++-4.4.7-3.el6.i686 which is the latest
available on CentOS 6.4.
Also I compiled ntopng on F12 with gcc-c++-4.4.4-10.fc12.x86_64 and it worked
fine.
So it seems there is something about the CentOS 6.4 gcc version that is causing
the
problem when compiled without optimization.
$ svn diff -r6633:6634 Redis.cpp
Index: Redis.cpp
===================================================================
--- Redis.cpp (revision 6633)
+++ Redis.cpp (revision 6634)
@@ -351,14 +351,14 @@
/* **************************************** */
-void Redis::getHostContacts(lua_State* vm, Host *h, bool client_contacts) {
+void Redis::getHostContacts(lua_State* vm, GenericHost *h, bool
client_contacts) {
int rc;
- char **rsp, buf[64], key[128];
+ char **rsp, hkey[64], key[64];
- if(h->get_ip() == NULL) return;
+ h->get_string_key(hkey, sizeof(hkey));
+ if(hkey[0] == '\0') return;
- snprintf(key, sizeof(key), "%s.%s",
- h->get_ip()->print(buf, sizeof(buf)),
+ snprintf(key, sizeof(key), "%s.%s", hkey,
client_contacts ? "client" : "server");
lua_newtable(vm);
On 07/31/2013 11:16 AM, Luca Deri wrote:
Steve
please run ntopng with valgrind (and without -O2) to figure out that errors you
experience (this as everything works for me)
Luca
On Jul 31, 2013, at 5:13 PM, Steve Clark <[email protected]
<mailto:[email protected]>> wrote:
Hi Luca,
Don't know what to think about this but
I add -O2 to the CPPFLAGS and now I don't
get any errors!
Go figure.
On 07/31/2013 09:53 AM, Steve Clark wrote:
Hi Luca,
I am still fighting this problem.
Another data point is if the
host list shows a mac address as "local" it works OK.
It is only when the host list show an ip as "local" that
I get the following error. I went thru the host_details.lua
script and made checks for nil but it seems like everything
is nil.
In what module is the data stored?
I have been trying to understand the architecture of ntopng
but so far have been very successful.
Thanks,
Steve
On 07/29/2013 01:48 PM, Steve Clark wrote:
Hi Luca,
In case you are not aware I am seeing the following when trying to select a
host.
29/Jul/2013 13:46:01 [Lua.cpp:1359] WARNING: Script failure
[/var/lib/pgsql/ntopng/scripts/lua/host_details.lua][/var/lib/pgsql/ntopng/scripts/lua/host_details.lua:144:
attempt to concatenate field 'mac' (a nil value)]
29/Jul/2013 13:46:33 [Lua.cpp:1359] WARNING: Script failure
[/var/lib/pgsql/ntopng/scripts/lua/host_details.lua][/var/lib/pgsql/ntopng/scripts/lua/host_details.lua:144:
attempt to concatenate field 'mac' (a nil value)]
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected] <mailto:[email protected]>
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev