Menu

#54 FreeBSD v5.2 via ports - error

open
Alejo S
5
2004-02-06
2004-02-06
No

hello

I have been trying to get msyslog up and running for 2
days now, but no success.

I installed via ports

MySQL was setup with ports and is version 4.x.x -
during the make install -D WITH_MYSQL for msyslog the
make failed because msyslog was looking for mysql
client 10 from MySQL version 3.x.x. I modified the
Makefile to use mysql client 14 and version 4.x.x

also the default logger for BSD is /var/run/log not
/dev/log

if I run just /usr/local/sbin/syslogd nothing happens
but if I run

/usr/local/sbin/syslogd -d 250 -f
/usr/local/etc/msyslog.conf -i bsd -i unix -i 'udp -a'

om_mysql_init: Error resolving api symbols, Undefined
symbol "_mysql_ping"
Error initializing dynamic output module mysql [%mysql]
cfline: error initializing modules!
syslogd: WARNING NO OUTPUT MODULES ACTIVE, GIVING UP!

This error is seems to indicate that msyslog is
creating a output module dynamically. hence i believe
it would create the file
/usr/local/lib/alat/libmsyslog_om_mysql.so

Seems to be some issue with mysql_ping - which is used
to open a connection to a db.

http://www.mysql.com/doc/en/mysql_ping.html

I have searched for the error string in the
share/examples/msyslog/om_mymodule.c

but it was not found.

I did find the string under the ports src files in
modules - but I am not a programmer. I suspect that
maybe my msyslog.conf has the -S Hostname, but I have
no proof. I have used localhost in this section as well
as my hostname, but the examples are not real clear as
to what is supposed to be there.

/usr/ports/sysutils/msyslog/work/msyslog-v1.08f/src/modules

if ( !(ctx->mysql_ping = (int(*)(void *)) dlsym(ctx->lib,
SYMBOL_PREFIX "mysql_ping")) || !(ctx->mysql_init =
(void * (*)(void*)) dlsym(ctx->lib, SYMBOL_PREFIX
"mysql_init"))
|| !(ctx->mysql_real_connect = (void *(*)(void *, char
*, char *,
char *, char *, int, void *, int)) dlsym(ctx->lib,
SYMBOL_PREFIX
"mysql_real_connect"))
|| !(ctx->mysql_query = (int (*)(void *, char *))
dlsym(ctx->lib,
SYMBOL_PREFIX "mysql_query"))
|| !(ctx->mysql_close = (void (*)(void *)) dlsym(ctx->lib,
SYMBOL_PREFIX "mysql_close")) ) {
dprintf(MSYSLOG_SERIOUS, "om_mysql_init: Error resolving"
" api symbols, %s\n", dlerror());
free(ctx);
return (-1);
}

Any help would be greatly appreciated.

thanks
Andrew

Discussion

  • Andrew MacTaggart

    Library info & complete Debug

     
  • Andrew MacTaggart

    Logged In: YES
    user_id=969080

    I would like to add more info so you can see what is going on.

     
  • Nobody/Anonymous

    Logged In: NO

    Replace the line

    SYMBOL_PREFIX "_"

    in /usr/ports/sysutils/msyslog/files/patch-configure

    with

    SYMBOL_PREFIX ""

    afterwards it worked on my FreeBSD 5.2.1p9 and 5.3 Box with
    the mysql41 client.

    rgds,
    Wolfram A. Kraushaar

     

Log in to post a comment.