[pmacct-discussion] Error pmacct 1.7.2 Field 'class_id' doesn't have a default value
Hello, I have found the error bellow after execute the pmacctd -f /etc/pmacct/pmacctd.conf command: ERROR ( default_mysql/mysql ): Field 'class_id' doesn't have a default value I'm using table V9, below is my pmacctd.conf file: root@srv-xflow:~# cat /etc/pmacct/pmacctd.conf daemonize: true pidfile: /var/run/pmacctd.pid syslog: daemon ! interface: ens32 ! plugins: mysql aggregate:tag,class,src_as,dst_as,vlan,src_host,dst_host,src_mac,dst_mac,src_port,dst_port,proto sql_host: localhost sql_user: root sql_passwd: mypassword sql_db: pmacct sql_table_type: bgp !sql_optimize_clauses: true sql_table: acct_v9 sql_table_version: 9 networks_file: /etc/pmacct/hosts.networks ! ! refresh the db every minute sql_refresh_time: 60 ! reduce the size of the insert/update clause sql_optimize_clauses: true ! accumulate values in each row for up to an hour sql_history: 5m ! create new rows on the minute, hour, day boundaries sql_history_roundoff: mhd sql_cache_entries: 256000 logfile: /var/log/pmacctd.log Has anyone seen this problem? or do you have any idea how to solve it? Regards ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] error compiling v1.7.0 with rabbitmq
Hi Hrothgar, Thanks very much for your feedback. This is actually good food for some further documentation. I've just committed the following basing on this email exchange: https://github.com/pmacct/pmacct/commit/59d4318385409cb5eb1208f8c1e06e9e49a04e37 Hopefully it will be of help to others. Cheers, Paolo On Fri, Oct 27, 2017 at 09:37:05AM -0400, Hrothgar Wrecker wrote: > Hi, > I was able to get it to work using PKG_CONFIG_PATH. > After unsetting RABBITMQ_LIBS and RABBITMQ_CFLAGS, this works: > > PKG_CONFIG_PATH=/usr/local/rabbitmq-c-0.8.0/lib64/pkgconfig/ ./configure > --enable-rabbitmq --enable-jansson > > Also, i think my RABBITMQ_LIBS might have been wrong. I haven't tested, > but I think it should have been: > > RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64 -lrabbitmq". > > Which is clearly stated in the QUICKSTART that I didn't fully read. Lesson > learned: RTFD. > > Thanks for your help. > > > > On Fri, Oct 27, 2017 at 6:50 AM, Paolo Lucentewrote: > > > > > Hi Hrothgar, > > > > I wonder whether it is possible you did build only the shared object > > version of the rabbitmq-c library and the location where it's installed, > > /usr/local/rabbitmq-c-0.8.0/lib64 , is not in the path for ldconfig / > > ld.so.conf and this is creating issues. > > > > I can confirm that I'm compiling exact same pmacct version against the > > exact same rabbitmq-c version and all works fine (but my rabbitmq-c is > > in standard /usr/local/lib). > > > > Paolo > > > > On Thu, Oct 26, 2017 at 05:19:29PM -0400, Hrothgar Wrecker wrote: > > > Hello, > > > I'm getting an error trying to build version 1.7.0 with > > --enable-rabbitmq. > > > > > > I'm doing the following: > > > > > > export RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64" > > > export RABBITMQ_CFLAGS="-I/usr/local/rabbitmq-c-0.8.0/include" > > > ./configure --enable-rabbitmq --enable-jansson > > > > > > > > > > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_set_content_type_json': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:130: undefined reference > > to > > > `amqp_cstring_bytes' > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_set_content_type_binary': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:138: undefined reference > > to > > > `amqp_cstring_bytes' > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_get_version': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:153: undefined reference > > to > > > `amqp_version' > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_close': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference > > to > > > `amqp_get_socket' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference > > to > > > `amqp_connection_close' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:307: undefined reference > > to > > > `amqp_destroy_connection' > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_connect_to_publish': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:158: undefined reference > > to > > > `amqp_new_connection' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:160: undefined reference > > to > > > `amqp_tcp_socket_new' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:167: undefined reference > > to > > > `amqp_socket_open' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:175: undefined reference > > to > > > `amqp_login' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:182: undefined reference > > to > > > `amqp_channel_open' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:184: undefined reference > > to > > > `amqp_get_rpc_reply' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > > to > > > `amqp_cstring_bytes' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > > to > > > `amqp_cstring_bytes' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > > to > > > `amqp_empty_table' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > > to > > > `amqp_exchange_declare' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:198: undefined reference > > to > > > `amqp_get_rpc_reply' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:224: undefined reference > > to > > > `amqp_cstring_bytes' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > > to > > > `amqp_cstring_bytes' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > > to > > > `amqp_cstring_bytes' > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > > to > > > `amqp_empty_table' > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > > `p_amqp_is_alive': > > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:314: undefined reference > > to > > > `amqp_get_sockfd' > > >
Re: [pmacct-discussion] error compiling v1.7.0 with rabbitmq
Hi, I was able to get it to work using PKG_CONFIG_PATH. After unsetting RABBITMQ_LIBS and RABBITMQ_CFLAGS, this works: PKG_CONFIG_PATH=/usr/local/rabbitmq-c-0.8.0/lib64/pkgconfig/ ./configure --enable-rabbitmq --enable-jansson Also, i think my RABBITMQ_LIBS might have been wrong. I haven't tested, but I think it should have been: RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64 -lrabbitmq". Which is clearly stated in the QUICKSTART that I didn't fully read. Lesson learned: RTFD. Thanks for your help. On Fri, Oct 27, 2017 at 6:50 AM, Paolo Lucentewrote: > > Hi Hrothgar, > > I wonder whether it is possible you did build only the shared object > version of the rabbitmq-c library and the location where it's installed, > /usr/local/rabbitmq-c-0.8.0/lib64 , is not in the path for ldconfig / > ld.so.conf and this is creating issues. > > I can confirm that I'm compiling exact same pmacct version against the > exact same rabbitmq-c version and all works fine (but my rabbitmq-c is > in standard /usr/local/lib). > > Paolo > > On Thu, Oct 26, 2017 at 05:19:29PM -0400, Hrothgar Wrecker wrote: > > Hello, > > I'm getting an error trying to build version 1.7.0 with > --enable-rabbitmq. > > > > I'm doing the following: > > > > export RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64" > > export RABBITMQ_CFLAGS="-I/usr/local/rabbitmq-c-0.8.0/include" > > ./configure --enable-rabbitmq --enable-jansson > > > > > > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_set_content_type_json': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:130: undefined reference > to > > `amqp_cstring_bytes' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_set_content_type_binary': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:138: undefined reference > to > > `amqp_cstring_bytes' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_get_version': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:153: undefined reference > to > > `amqp_version' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_close': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference > to > > `amqp_get_socket' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference > to > > `amqp_connection_close' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:307: undefined reference > to > > `amqp_destroy_connection' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_connect_to_publish': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:158: undefined reference > to > > `amqp_new_connection' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:160: undefined reference > to > > `amqp_tcp_socket_new' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:167: undefined reference > to > > `amqp_socket_open' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:175: undefined reference > to > > `amqp_login' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:182: undefined reference > to > > `amqp_channel_open' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:184: undefined reference > to > > `amqp_get_rpc_reply' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > to > > `amqp_empty_table' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference > to > > `amqp_exchange_declare' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:198: undefined reference > to > > `amqp_get_rpc_reply' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:224: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference > to > > `amqp_empty_table' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_is_alive': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:314: undefined reference > to > > `amqp_get_sockfd' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_publish_string': > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference > to > > `amqp_cstring_bytes' > > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference > to > > `amqp_basic_publish' > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > > `p_amqp_publish_binary': > >
Re: [pmacct-discussion] error compiling v1.7.0 with rabbitmq
Hi Hrothgar, I wonder whether it is possible you did build only the shared object version of the rabbitmq-c library and the location where it's installed, /usr/local/rabbitmq-c-0.8.0/lib64 , is not in the path for ldconfig / ld.so.conf and this is creating issues. I can confirm that I'm compiling exact same pmacct version against the exact same rabbitmq-c version and all works fine (but my rabbitmq-c is in standard /usr/local/lib). Paolo On Thu, Oct 26, 2017 at 05:19:29PM -0400, Hrothgar Wrecker wrote: > Hello, > I'm getting an error trying to build version 1.7.0 with --enable-rabbitmq. > > I'm doing the following: > > export RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64" > export RABBITMQ_CFLAGS="-I/usr/local/rabbitmq-c-0.8.0/include" > ./configure --enable-rabbitmq --enable-jansson > > > > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_set_content_type_json': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:130: undefined reference to > `amqp_cstring_bytes' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_set_content_type_binary': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:138: undefined reference to > `amqp_cstring_bytes' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_get_version': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:153: undefined reference to > `amqp_version' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_close': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference to > `amqp_get_socket' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference to > `amqp_connection_close' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:307: undefined reference to > `amqp_destroy_connection' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_connect_to_publish': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:158: undefined reference to > `amqp_new_connection' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:160: undefined reference to > `amqp_tcp_socket_new' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:167: undefined reference to > `amqp_socket_open' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:175: undefined reference to > `amqp_login' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:182: undefined reference to > `amqp_channel_open' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:184: undefined reference to > `amqp_get_rpc_reply' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to > `amqp_empty_table' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to > `amqp_exchange_declare' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:198: undefined reference to > `amqp_get_rpc_reply' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:224: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to > `amqp_empty_table' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_is_alive': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:314: undefined reference to > `amqp_get_sockfd' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_publish_string': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to > `amqp_basic_publish' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_publish_binary': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to > `amqp_cstring_bytes' > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to > `amqp_basic_publish' > ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function > `p_amqp_get_sockfd': > /root/Downloads/pmacct-1.7.0/src/amqp_common.c:145: undefined reference to > `amqp_get_sockfd' > collect2: error: ld returned 1 exit status > gmake[2]: *** [pmacctd] Error 1 > gmake[2]: Leaving directory `/root/Downloads/pmacct-1.7.0/src' > gmake[1]: *** [all-recursive] Error 1 > gmake[1]: Leaving directory `/root/Downloads/pmacct-1.7.0/src' > make: *** [all-recursive] Error 1 > > > Thanks! > ___ >
[pmacct-discussion] error compiling v1.7.0 with rabbitmq
Hello, I'm getting an error trying to build version 1.7.0 with --enable-rabbitmq. I'm doing the following: export RABBITMQ_LIBS="-L/usr/local/rabbitmq-c-0.8.0/lib64" export RABBITMQ_CFLAGS="-I/usr/local/rabbitmq-c-0.8.0/include" ./configure --enable-rabbitmq --enable-jansson ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_set_content_type_json': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:130: undefined reference to `amqp_cstring_bytes' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_set_content_type_binary': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:138: undefined reference to `amqp_cstring_bytes' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_get_version': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:153: undefined reference to `amqp_version' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_close': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference to `amqp_get_socket' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:301: undefined reference to `amqp_connection_close' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:307: undefined reference to `amqp_destroy_connection' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_connect_to_publish': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:158: undefined reference to `amqp_new_connection' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:160: undefined reference to `amqp_tcp_socket_new' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:167: undefined reference to `amqp_socket_open' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:175: undefined reference to `amqp_login' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:182: undefined reference to `amqp_channel_open' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:184: undefined reference to `amqp_get_rpc_reply' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to `amqp_empty_table' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:195: undefined reference to `amqp_exchange_declare' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:198: undefined reference to `amqp_get_rpc_reply' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:224: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:192: undefined reference to `amqp_empty_table' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_is_alive': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:314: undefined reference to `amqp_get_sockfd' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_publish_string': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:244: undefined reference to `amqp_basic_publish' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_publish_binary': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to `amqp_cstring_bytes' /root/Downloads/pmacct-1.7.0/src/amqp_common.c:278: undefined reference to `amqp_basic_publish' ./.libs/libdaemons.a(libdaemons_la-amqp_common.o): In function `p_amqp_get_sockfd': /root/Downloads/pmacct-1.7.0/src/amqp_common.c:145: undefined reference to `amqp_get_sockfd' collect2: error: ld returned 1 exit status gmake[2]: *** [pmacctd] Error 1 gmake[2]: Leaving directory `/root/Downloads/pmacct-1.7.0/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/root/Downloads/pmacct-1.7.0/src' make: *** [all-recursive] Error 1 Thanks! ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error inserting mysql
Hi Raphael, You can set debug to true for the plugin, ie. debug[mysql]: true (suggest in this case not to log to the screen but to a logfile, ie. logfile: /path/to/file.log) and/or enable query log on the MySQL server side. IMO, pick the quicker solution of the two. Cheers, Paolo On Wed, Jul 02, 2014 at 12:05:45PM +0200, Raphael Mazelier wrote: Hi Paolo, I've seen this on ip_proto but I have no ipv6 flow activated. And on as_path but this is more normal since as_path could be very long. How I can view the value trying to be inserted in sql ? regards, Le 01/07/2014 23:31, Paolo Lucente a écrit : Hi Raphael, Can you dig what entry is precisely causing this? I've seen that happening especially when enabling IPv6, ie. when pmacct tries to insert strings like ipv6-icmp in a CHAR(4). On the other hand, pmacct is unaware of the length of the field in the schema (nor i'm aware MySQL, or any other supported RDBMS, offers a feature to truncate values) so, in a few docs, i believe it's specified correctness of the schema is user responsibility (basic but effective). Cheers, Paolo On Tue, Jul 01, 2014 at 06:34:43PM +0200, Raphael Mazelier wrote: Hum find it, but I seems I found a bug : with mysqld parameter : sql_mode = TRADITIONAL which enable strict mode, an insert failed immediatly if an error of size or else is detected. This is strange beacause column ip_proto is CHAR(4), that is sufficient. I think pmacct should handle this error earlier, or truncate the data, because when arriving in the rdbm the field is left blanked. Regards, Le 01/07/2014 18:20, Raphael Mazelier a écrit : Hello Paolo, I upgrade my system today to debian wheezy, percona-server-5.6. Since this upgrade I have error message like : Jul 01 18:18:01 ERROR ( out_hour/mysql ): Data too long for column 'ip_proto' at row 445 and no data are filled in the database. How I can debug this issue ? ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
[pmacct-discussion] Error
Hello Paolo, I upgrade my system today to debian wheezy, percona-server-5.6. Since this upgrade I have error message like : Jul 01 18:18:01 ERROR ( out_hour/mysql ): Data too long for column 'ip_proto' at row 445 and no data are filled in the database. How I can debug this issue ? -- Raphael Mazelier AS39605 ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error inserting mysql
Hi Raphael, Can you dig what entry is precisely causing this? I've seen that happening especially when enabling IPv6, ie. when pmacct tries to insert strings like ipv6-icmp in a CHAR(4). On the other hand, pmacct is unaware of the length of the field in the schema (nor i'm aware MySQL, or any other supported RDBMS, offers a feature to truncate values) so, in a few docs, i believe it's specified correctness of the schema is user responsibility (basic but effective). Cheers, Paolo On Tue, Jul 01, 2014 at 06:34:43PM +0200, Raphael Mazelier wrote: Hum find it, but I seems I found a bug : with mysqld parameter : sql_mode = TRADITIONAL which enable strict mode, an insert failed immediatly if an error of size or else is detected. This is strange beacause column ip_proto is CHAR(4), that is sufficient. I think pmacct should handle this error earlier, or truncate the data, because when arriving in the rdbm the field is left blanked. Regards, Le 01/07/2014 18:20, Raphael Mazelier a écrit : Hello Paolo, I upgrade my system today to debian wheezy, percona-server-5.6. Since this upgrade I have error message like : Jul 01 18:18:01 ERROR ( out_hour/mysql ): Data too long for column 'ip_proto' at row 445 and no data are filled in the database. How I can debug this issue ? ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error: 'sql_multi_values' is too small (100). Try with a larger value
Hi Edward, On Tue, 3 Sep 2013, Edward van Kuik wrote: Sep 2 17:59:01 microserver pmacctd[17603]: ERROR ( summary/mysql ): 'sql_multi_values' is too small (100). Try with a larger value. I set mine to 1000. OK, so 1000 might work for you now. But it seems that pmacct can't split the inserts into multiple batches, otherwise a smaller batch size would work too. So one day you might have more than 1000 flows to insert at a time, and you'd get this error and lose data. In fact are you sure you haven't lost any data already? Cheers, Chris. -- Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838 Citylife House, Sturton Street, Cambridge, CB1 2QF, UK Aptivate is a not-for-profit company registered in England and Wales with company number 04980791. ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error: 'sql_multi_values' is too small (100). Try with a larger value
On Tue, 3 Sep 2013, Edward van Kuik wrote: No, it should definitely batch the data into inserts of 1000 values each. Then why would it give me this error message? The error doesn't make sense if pmacct does break inserts into smaller batches. Sep 2 17:59:01 microserver pmacctd[17603]: ERROR ( summary/mysql ): 'sql_multi_values' is too small (100). Try with a larger value. Cheers, Chris. -- Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838 Citylife House, Sturton Street, Cambridge, CB1 2QF, UK Aptivate is a not-for-profit company registered in England and Wales with company number 04980791. ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error: 'sql_multi_values' is too small (100). Try with a larger value
Hi Paolo, On Tue, 3 Sep 2013, Paolo Lucente wrote: Maybe a bug in documentation in the release you are using? CONFIG-KEYS says: The value of the directive is intended to be the size (in bytes) of the multi-values buffer.. So 100 bytes is on the low side, and by default MySQL comes with a 1MB buffer - after that you should tweak MySQL config first, then set the sql_multi_values value accordingly. I can confirm statements are batched in several buffers if one can't fit them all. Thanks, I understand now. I had completely missed that it was in bytes instead of rows. There does seem to be a minor bug in that pmacct appears to fall over if the value is too small. I'm sure it could log a warning and write larger but valid INSERT statements, with at least one VALUES row per statement. Cheers, Chris. -- Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838 Citylife House, Sturton Street, Cambridge, CB1 2QF, UK Aptivate is a not-for-profit company registered in England and Wales with company number 04980791. ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
[pmacct-discussion] Error: 'sql_multi_values' is too small (100). Try with a larger value
Hi all, I tried to enable the sql_multi_values option, but setting it to a reasonable number of rows to insert at once (100) to avoid hitting the MySQL packet size limit. But I get these errors in the logs: Sep 2 17:59:01 microserver pmacctd[17603]: ERROR ( summary/mysql ): 'sql_multi_values' is too small (100). Try with a larger value. Sep 2 16:57:46 microserver pmacctd[17608]: ERROR ( inbound/mysql ): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (FROM_UNIXTIME(1378141141), FROM_UNIXTIME(1378141080), '00:1b:21:92:98:17' at line 1 This looks like a bug to me? Surely it should be reasonable to insert up to 100 rows at a time (per SQL statement) instead of just 1? Cheers, Chris. -- Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838 Citylife House, Sturton Street, Cambridge, CB1 2QF, UK Aptivate is a not-for-profit company registered in England and Wales with company number 04980791. ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error in mongodb_plugin
Hi Slava, For manually patching the issue: open mongodb_plugin.c file at the lines (two) where the error is found by the compiler and replace: data-src_host_country with data-src_ip_country data-dst_host_country with data-dst_ip_country About setproctitle: we should see what's going on: on one hand i would not expect setproctitle to be a library on its own; on the other there is a setproctitle() defined internally to pmacct to kick-in when the function is not made available by the OS. If you can provide access to the box for some troubleshooting, let's follow-up privately on this. Cheers, Paolo On Sat, Mar 09, 2013 at 08:08:59PM +0200, Viacheslav Dubrovskyi wrote: 09.03.2013 17:01, Paolo Lucente ??: Hi Slava, Issue is fixed now. Thanks for reporting it. You can download latest code from CVS to get it. Thank you! But can you show patch for this issue? Sorry, I hardly know cvs. :( And about another issue. I get: ./configure --build=i586-alt-linux --host=i586-alt-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var/lib --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --without-included-gettext --with-pgsql-includes=/usr/include/pgsql --enable-threads --enable-ulog --enable-64bit --enable-v4-mapped --enable-ipv6 --enable-geoip --enable-mysql --disable-pgsql --disable-sqlite3 ...skip... checking for setproctitle... no But I know, that have libs [builder@localhost ~]$ rpm -qa | grep setproc setproctitle-devel-0.3.2-alt3 setproctitle-0.3.2-alt3 So I check config.log: configure:6697: checking for setproctitle configure:6697: i586-alt-linux-gcc -o conftest -O2 -pipe -Wall -g -O2 -march=i586 -mtune=generic -DENABLE_ULOG -Wl,--export-dynamic conftest.c -lmysqlclient -lpcap -lGeoIP -ldl -lm -lz -lpthread 5 /usr/src/tmp/cc8hmMMj.o: In function `main': /usr/src/RPM/BUILD/pmacct-0.14.2/conftest.c:87: undefined reference to `setproctitle' collect2: error: ld returned 1 exit status And not see -lsetproctitle So I need add export LIBS=-lsetproctitle before ./configure. Seems it's bug. -- WBR, Viacheslav Dubrovskyi ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] ERROR ( pni/mysql ): We are missing data.
Hi Stefano, I recommend to change the relationship between the two buffer sizes: try to get from 1:2000 to, firstly, 1:1000 then to 1:100 and see if that improves the situation. Cheers, Paolo On Tue, Nov 27, 2012 at 07:03:17PM +0100, stefano birmani wrote: Hi, we've a pmacct installation on a RHEL Server rel 5.5, (Linux XXX 2.6.18-194.26.1.el5 #1 SMP XXX x86_64 x86_64 x86_64 GNU/Linux) and following is our nfacctd.conf file: daemonize: true logfile: /usr/local/pmacct/var/nfacctd.log nfacctd_disable_checks: true nfacctd_time_new: true nfacctd_renormalize: true nfacctd_net: netflow nfacctd_port: 5678 nfacctd_ip: XXX.XXX.XXX.XXX plugins: mysql[pni] plugin_buffer_size: 819200 plugin_pipe_size: 163840 sql_optimize_clauses: true sql_dont_try_update: true sql_cache_entries: 991 sql_multi_values: 90 sql_history_roundoff[pni]: m sql_history[pni]: 5m sql_refresh_time[pni]: 300 sql_table[pni]: acct_pni_%Y%m%d_%H%M sql_host[pni]: 10.0.0.2 sql_table_schema[pni]: /usr/local/pmacct/etc/acct_pni.sql bgp_daemon: true bgp_daemon_ip: XXX bgp_daemon_max_peers: 500 bgp_table_peer_buckets: 100 bgp_neighbors_file: /usr/local/pmacct/var/routers.txt bgp_aspath_radius: 3 bgp_agent_map: /usr/local/pmacct/etc/agent.map nfacctd_as_new: bgp aggregate[pni]: in_iface, peer_dst_as, peer_src_as, peer_src_ip, peer_dst_ip bgp_peer_src_as_type: bgp pre_tag_map_entries: 1000 sampling_map: /usr/local/pmacct/etc/sampling.map refresh_maps: true Whenever we restart the daemon after a while we start seeing in the log file multiple entries like the following: XXX ERROR ( pni/mysql ): We are missing data. XXX If you see this message once in a while, discard it. Otherwise some solutions follow: XXX - increase shared memory size, 'plugin_pipe_size'; now: '163840'. XXX - increase buffer size, 'plugin_buffer_size'; now: '819200'. XXX - increase system maximum socket size. We tried, as suggested, to change both the plugin_pipe_size and the plugin_buffer_size values increasing them until the values shown but nothing has changed... We've found that when the message is printed in the log file the difference between the seq values is always equal to the ratio between the plugin_pipe_size and the plugin_buffer_size values (2000 in our case), for example: ((struct ch_buf_hdr *)rg-ptr)-seq: 5808 seq: 7808 Can anyone help us? We need pmacct :-) so before starting studying the src code we ask for help because we don't know how to go on. Thanks, Stefano ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] ERROR: Counter sizes mismatch: daemon: 0 client: 32
I just wanted to follow up and say that Paolo was able to figure out what the problem was. It was a locking issue and all I needed to do to fix it was use the -l command line option for the pmacct client. Paolo, Thanks for your help! Gerard On Fri, Mar 16, 2012 at 3:15 PM, Gerard Dupont III ger...@shelbybb.com wrote: I'm not sure if something is wrong with my config or if this is a bug, but I keep getting this error. I've tried versions 0.12.5, 0.14.0rc3, and 0.14.0-cvs on FreeBSD 9, FreeBSD 7, and CentOS 5.8 all with the same results. I've tried compiling with and without --enable-64bit. nfacctd.conf: daemonize: false nfacctd_port: 64121 plugins: memory[both] networks_file: ./networks.lst aggregate[both]: src_host, dst_host, src_port, dst_port imt_mem_pools_number: 0 plugin_buffer_size: 10240 plugin_pipe_size: 1024000 Exact Error: [root@x5:nfacctd]# pmacct -c src_host,dst_port -N * ERROR: Counter sizes mismatch: daemon: 0 client: 32 ERROR: It's very likely that a 64bit package has been mixed with a 32bit one. ERROR: Please fix the issue before trying again. Any ideas? Thanks! Gerard ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] ERROR: Counter sizes mismatch: daemon: 0 client: 32
Hi Paolo, I just installed Ubuntu Server 10.04.4 on a VM and installed pmacct using apt. Same config and command line as I was using before. Same exact problem. I've tried it on multiple systems with the same results. It does it with both nfacctd and pmacctd. I'd be more than happy to give you access to the VM and/or a capture of the netflow traffic coming in. Thanks, Gerard On Sat, Mar 17, 2012 at 9:05 AM, Paolo Lucente pa...@pmacct.net wrote: Hi Gerard, Config is allright and i can't reproduce the issue: can it be you are mixing on the system your self-compiled 64-bit version of the package with some pre-existing 32-bit version? I see, for example, in the commandline below you call 'pmacct' without specifiying a path. Also, the correct commandline - that one would return just zero - is: pmacct -c src_host,dst_port -N *,* Let me know. Cheers, Paolo On Fri, Mar 16, 2012 at 03:15:26PM -0400, Gerard Dupont III wrote: I'm not sure if something is wrong with my config or if this is a bug, but I keep getting this error. I've tried versions 0.12.5, 0.14.0rc3, and 0.14.0-cvs on FreeBSD 9, FreeBSD 7, and CentOS 5.8 all with the same results. I've tried compiling with and without --enable-64bit. nfacctd.conf: daemonize: false nfacctd_port: 64121 plugins: memory[both] networks_file: ./networks.lst aggregate[both]: src_host, dst_host, src_port, dst_port imt_mem_pools_number: 0 plugin_buffer_size: 10240 plugin_pipe_size: 1024000 Exact Error: [root@x5:nfacctd]# pmacct -c src_host,dst_port -N * ERROR: Counter sizes mismatch: daemon: 0 client: 32 ERROR: It's very likely that a 64bit package has been mixed with a 32bit one. ERROR: Please fix the issue before trying again. Any ideas? Thanks! Gerard ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
Re: [pmacct-discussion] Error for building pmacct 0.12 from source
Hi Rodolfo, In addition to what Brent correctly said you might want to double check whether you have development kit for MySQL installed at all (libraries and headers). A chance can be you have got installed only, say, MySQL client, server and tools. Cheers, Paolo On Tue, Jun 22, 2010 at 12:01:03PM -0400, rodolfo mondion wrote: I ve downloaded the latest version of pmacct and trying with 2 linux distributions (ubuntu server 9.04 and 10 for i386) i get the same errors related to the librarie libmysqlclient when i make the ./configure --enable-mysql y get: checking default locations for libmysqlclient ... not found checking for mysql_real_connect in lmysqlclient no configure: error: ERROR: missing Mysql client library. Refer to http://www.mysql.com I ve installed at the beginning of the server installation the LAMP option, i dont know if i must install mysql manually or if theres a problem with my mysql version (5.0.75) Thanks for ur help -- Rodolfo Mondion R. ___ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
[pmacct-discussion] ERROR on AMD64 - x86_64 [Resend] - again?
Hello, This is my second Bug Report. The error is nearly exact that one, that i already had on 12th Jun 2005, but now it seems to log correctly into Database. I am getting some errors on flowing System: ipacc:~# cat /proc/cpuinfo vendor_id : AuthenticAMD model name : AMD Athlon(tm) 64 Processor 3200+ cpu MHz : 1999.795 cache size : 512 KB Debian AMD64 - x86_64 Port 2GB RAM pmacct build with: # ./configure --enable-64bit --enable-mysql --enable-v4-mapped --enable-ipv6 --with-pcap-includes=/usr/local/include --with-pcap-lib=/usr/local/lib (pmacct-0.10.0rc1.tar.gz libpcap-current.tar.gz) Traffic to monitor: 220 - 300 Mbits currently. pmacctd is logging into MySQL-Database. (sql_refresh_time: 60) Error: ipacc:~# dmesg .. snip .. Feb 2 19:26:21 ipacc kernel: device eth0 entered promiscuous mode Feb 2 19:26:35 ipacc syslog-ng[8186]: STATS: dropped 0 (~60 sec. nothing [sql_refresh_time: 60 ?]) Feb 2 19:27:22 ipacc kernel: pmacctd[15169]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:27:23 ipacc kernel: pmacctd[15170]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:27:24 ipacc kernel: pmacctd[15171]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:27:24 ipacc kernel: pmacctd[15172]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 (~60 sec. nothing [sql_refresh_time: 60 ?]) Feb 2 19:28:20 ipacc kernel: pmacctd[15182]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:28:23 ipacc kernel: pmacctd[15183]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:28:25 ipacc kernel: pmacctd[15184]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:28:27 ipacc kernel: pmacctd[15185]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 (~60 sec. nothing [sql_refresh_time: 60 ?]) Feb 2 19:29:14 ipacc kernel: pmacctd[15192]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:29:15 ipacc kernel: pmacctd[15193]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:29:16 ipacc kernel: pmacctd[15194]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 Feb 2 19:29:17 ipacc kernel: pmacctd[15195]: segfault at 02cd rip 0041922a rsp 7ffb9d70 error 6 (~60 sec. nothing) .. /snip .. -- Cheers, Daniel
Re: [pmacct-discussion] ERROR on AMD64 - x86_64 [Resend]
Hello, Hello Daniel, On Sun, Jun 12, 2005 at 11:52:49PM +0200, Daniel Streicher wrote: Can I ignore this messages? The segfault is symptom of something that is not going the right way. It requires to discover where the process dies but the problem is that i've actually no access to any similar box (so, if you may give access to the box to troubleshoot the issue it would be fine). Two questions for you: i see the PID changing frequently, are you getting your network data correctly inserted/updated into the DB ? Are you using any source tarball or one of the .deb packages made available by our Debian mantainer ? Cheers, Paolo I am using source tarball, should I try to use the .deb package? For access to this box, I must first ask my boss. ;) -- Cheers, Daniel
Re: [pmacct-discussion] ERROR on AMD64 - x86_64 [Resend]
Hey Daniel, On Mon, Jun 13, 2005 at 12:25:43AM +0200, Daniel Streicher wrote: I am using source tarball, should I try to use the .deb package? I don't think things could change. However, about the access to the box. Let me know the answer. I should be able to have access to a Fedora 3 Opteron box in a couple of days (i've just sent an email :)). Cheers, Paolo
Re: [pmacct-discussion] ERROR on AMD64 - x86_64 [Resend]
Hello Daniel, On Mon, Jun 13, 2005 at 05:38:50PM +0200, Daniel Streicher wrote: Ok there seems to be one small error in nfacctd: nfacctd logging MAC Addresses always as SRC MACDST MAC 00:00:00:00:00:00 00:00:00:00:00:00. pmacctd logging MAC Addresses always as SRC MACDST MAC 00:e0:52:e8:bb:33 00:0b:6a:2c:95:f7 I think that the problem is on softflowd side; in the sense that (up to version 0.9.7 which seems to my eyes to be the latest available) it is not capable of generating MAC addresses for NetFlow v9 packets. Cheers, Paolo