Re: Problem : logging wap access to access-log
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | tolj.org system architecture |
| Message-ID | <[email protected]> |
Hi Stephane, I'll try to guide. [email protected] wrote: > Hi, > > please excuse me if this is not the right place to post as it is the first time I ask for help on Kannel. > > I work for a telecom operator and we've been using Kannel as a Wap gateway for the last 12 months. > As you know, we have to archive all internet access for security reasons. > As I looked inside the Kannel source, I found that Kannel should log these access in the access-log file through the alog function. > This feature is not working properly on my installation. > > "Log begins" and "Log ends" messages appear properly in the file, but when the alog function is called in the rest of the program, it doesn't print anything. > By testing a little, I found that the file descriptor used to write to access-log is NULL (in alog function when called from return_reply in wap-appl.c), so nothing is written. > It looks like this file is closed and reopened for the "Log ends" message. > > I have made a temporary workaround by printing a debug message (trough debug function) with the client IP and the Url. This message goes to wapbox.log. > For maintenance reasons, I would prefer to work with an unmodified version of Kannel, so I'd rather have this feature working. > > I have not worked in C for quite a while, so I am a bit stuck with that problem, and I suspect this is related to my installation, rather than to the software itself. > Do I need specific libraries to make it work ? > > Please don't hesitate to ask for more testing as this question is of legal matter and I need to fix it. > > -------------------------------------------------- > > Technical infos : > > system is Fedora Core 3 fully updated with yum > Kannel has been recompiled from source > all libxml2 libs (std + devel) are installed. > > [root@WAPGW tmp]# rpm -qa | grep libxml > perl-libxml-perl-0.07-30 > libxml2-python-2.6.16-3 > libxml2-devel-2.6.16-3 > perl-libxml-enno-1.02-31 > libxml2-2.6.16-3 > [root@WAPGW tmp]# uname -a > Linux WAPGW 2.6.12-1.1381_FC3smp #1 SMP Fri Oct 21 04:03:26 EDT 2005 i686 i686 i386 GNU/Linux seems all reasonable, so nothing that may impat this... But I have 2 assumtions where the problem may come along: > Below is kannel config file > > > # > # SAMPLE CONFIGURATION FOR KANNEL PPG (PUSH OVER SMS) > # > # It is run like this: > # > # 1% gw/bearerbox gw/pushkannel.conf > # 2% gw/wapbox gw/pushkannel.conf > # > # Boys and girls: use more complex passwords when setting up real services, > # this is an *example* file ! > # > # Aarno Syvänen in August 2001, for Wiral Ltd > > # BEARERBOX SETUP, for Kannel core operations > > group = core > admin-port = 13000 > smsbox-port = 13001 > wapbox-port = 13002 > admin-password = **** > #status-password = ***** > #admin-deny-ip = "" > #admin-allow-ip = "" > wdp-interface-name = "*" > log-file = "/tmp/bearerbox.log" > log-level = 0 > box-deny-ip = "*.*.*.*" > box-allow-ip = "127.0.0.1" > #unified-prefix = "+358,00358,0;+,00" > access-log = "/tmp/access.log" > #access-log-clean = false > store-file = "/tmp/kannel.store" > #ssl-server-cert-file = "cert.pem" > #ssl-server-key-file = "key.pem" > #ssl-certkey-file = "mycertandprivkeyfile.pem" > http-proxy-host = "127.0.0.1" > http-proxy-port = 3130 1) the http-proxy-[host|port] directives. This was intentionally to generaly configure a HTTP proxy to use for any HTTP client calls, which wapbox of course does for the WAP request. Try to deactivate this in the config and re-try to see if you get entries in wapaccess.log. > # WAPBOX SETUP, for pushing and for pulling (fetching) the wap data > > group = wapbox > bearerbox-host = localhost > log-file = "/tmp/wapbox.log" > log-level = 0 > #syslog-level = debug > syslog-level = none > map-url-max = 2 > map-url-0 = "http://172.24.*.* http://0.0.0.0" > smart-errors = true 2) strange map-url-0 here. A HTTP client call to 0.0.0.0? Hmmm... Try to comment out the mapping directives and the smart-errors directive too and re-try to see if you get valiud entries in wapaccess.log. The rest of the config seems ok from the first review. Stipe ------------------------------------------------------------------- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany tolj.org system architecture Kannel Software Foundation (KSF) http://www.tolj.org/ http://www.kannel.org/ mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org -------------------------------------------------------------------