Disable Logging for omslapd?

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Sonic

Disable Logging for omslapd?

Postby Sonic » Mon May 07, 2007 6:50 am

Hello

I have a little problem with the omslapd and logging. It writes into /var/log/messages every time, an email is received and a search in the ldap-directory for the email-address is triggered (see below for the log-snippet).

I have set the loglevel for omslapd to 1 (omconflvl -a slapd 1), but the daemon still reports all queries to syslog.

How can I turn it off or only have errors reported?

current config:

OpenSuSE 10.1

omshowlvel -a |grep LDAP
LDAP Daemon 1

/var/log/messages
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14639 fd=9 connection from unknown (192.168.6.201)
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14639 op=0 SRCH base="o=scalix" scope=2 filter="(&(|(&(objectclass=scalixPerson)(omulcaps=*))(objectclass=scalixDistributionList)(sn=+bb))(mail=***emailaddress***))"
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14640 fd=11 connection from unknown (192.168.6.201)
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14639 op=0 RESULT err=0 tag=101 nentries=0
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14639 op=1 UNBIND
May 7 12:47:39 nb-v01-mail omslapd[383]: conn=14639 op=1 fd=9 closed errno=0

grubi
Posts: 55
Joined: Fri Jan 12, 2007 5:46 pm

Postby grubi » Mon May 07, 2007 8:40 am

Same problem here but no solution yet.

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Mon May 07, 2007 12:15 pm

The message you see has nothing to do with the Scalix ldap server, but with the separate ldap mapper process.

See

Code: Select all

man ldapmapper


for details.

Florian.
Florian von Kurnatowski, Die Harder!

grubi
Posts: 55
Joined: Fri Jan 12, 2007 5:46 pm

Postby grubi » Mon May 07, 2007 2:32 pm

florian wrote:The message you see has nothing to do with the Scalix ldap server, but with the separate ldap mapper process.


Sure?
ps aux shows that the pid of the messages in question belongs to
omslapd and not ldapmapper. Furthermore the manpage of
ldapmapper states that the logging facility is mail which means
that messages should appear in the logfile "mail" whereas it
appears in the logfile "messages".

I was still not able to disable that logging.

Regards
Grubi

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Mon May 07, 2007 2:37 pm

hmmm... on second thought you are right. however, we don't actively log into syslog from the core scalix processes, of which omslapd is one. ldapmapper actually does do that.

Now, the one thing that remains is that the OpenLDAP libraries we might be using underneath provide for some syslog logging. could that be?

Florian.
Florian von Kurnatowski, Die Harder!

grubi
Posts: 55
Joined: Fri Jan 12, 2007 5:46 pm

Postby grubi » Mon May 07, 2007 3:27 pm

florian wrote:Now, the one thing that remains is that the OpenLDAP libraries we might be using underneath provide for some syslog logging. could that be?


Possibly. Have no better idea so far.
As we are using the same OS as the OP (SUSE 10.1) it would be interresting to
know if you see similar things on other platforms as well.

Regards,
grubi

Psico

Disable Logging for omslapd? [SOLVED]

Postby Psico » Thu May 17, 2007 9:25 am

Hi!

I had the same issue with a scalix (version 11.0.3) installation von debian etch!

Horrible, every ldap access filles the logs, i.e.

Code: Select all

$ ldapsearch -x


I digged into it and found out that omslapd binary seams to be some derivate of (openldap)slapd because of the strings included in the binary file.

Code: Select all

$ strings /opt/scalix/bin/omslapd | grep ldap_syslog_level


Default loglevel in openldap lib is debug as I've read. I found this while googling for information about all this. So I thought about just testing the parameter loglevel as in normal slapd.conf

Code: Select all

$ omoff ldap
$ cat /var/opt/scalix/bd/s/sys/slapd.conf
...
...
loglevel 0
$ omon ldap


Result: No debug messages fom omslapd appearing anymore when ldapsearch-ing or doing other ldap related stuff!

Please let me know if this can be fixed the same way on your system.

Best regards

jch
Scalix
Scalix
Posts: 202
Joined: Thu Mar 25, 2004 10:25 am

Postby jch » Thu May 17, 2007 11:55 am

omslapd pre-dates OpenLDAP by quite a while although both come from a common heritage: the University of Michigan LDAP server.

As a result of this heritage, we have two logging mechanisms: one for the core LDAP server (which basically uses syslog) and one for the Scalix directory backend. The backend log level is controlled by "omconflvl -a ldap", the core log level is set in the slapd configuration file.

Could we fix this to all use the same logging mechanism? Well, no, we couldn't. The core slapd doesn't have a log level, it's a bit mask. For example, "level" 16 records the LBER sent between the server and its clients. I used to use 5 or 13 during development (which is a long time ago now) because that records the interaction between the core and the Scalix directory back end quite well. I use 31 when I'm looking for really difficult problems. However, I don't se the log level in the file, I run omslapd as, say, "omslapd -d31" and save the output to a file or just let it run.

Anyway, that's of little interest.

Going back to the original post, what is of interest, is how have you managed to turn logging on. It's not on by default. What doesthis show:

Code: Select all

ps -fp $(omsetsvc -p slapd)

You shouldn't see any parameters at all. Looking at the source code, the only way I can see to get any log messages out of omslapd is either to put a "loglevel" directive in slapd.conf or to pass in "-s <level>" on the command line.

Did you do one of those or did you do something else?

jch

jch
Scalix
Scalix
Posts: 202
Joined: Thu Mar 25, 2004 10:25 am

Postby jch » Thu May 17, 2007 12:28 pm

The first sign of madness is replying to your own posts.
Did you do one of those or did you do something else?

The second sign is quoting them :-)

After being prompted by Florian to put my brain in gear -- thanks Florian! -- I just tried an ldapsearch against our Debian and OpenSUSE boxes and both of them log stuff using syslog. Neither of them use either of the available mechanisms for setting the log level.

There's an interesting mystery here.

jch

grubi
Posts: 55
Joined: Fri Jan 12, 2007 5:46 pm

Postby grubi » Fri May 18, 2007 5:22 am

jch wrote:The first sign of madness is replying to your own posts.
Did you do one of those or did you do something else?

The second sign is quoting them :-)

After being prompted by Florian to put my brain in gear -- thanks Florian! -- I just tried an ldapsearch against our Debian and OpenSUSE boxes and both of them log stuff using syslog. Neither of them use either of the available mechanisms for setting the log level.

There's an interesting mystery here.

jch


Good to see that I'm not the only one beeing confused about this.

grubi.

grubi
Posts: 55
Joined: Fri Jan 12, 2007 5:46 pm

Re: Disable Logging for omslapd? [SOLVED]

Postby grubi » Sun May 20, 2007 1:13 pm

Psico wrote:Default loglevel in openldap lib is debug as I've read. I found this while googling for information about all this. So I thought about just testing the parameter loglevel as in normal slapd.conf

Code: Select all

$ omoff ldap
$ cat /var/opt/scalix/bd/s/sys/slapd.conf
...
...
loglevel 0
$ omon ldap


Result: No debug messages fom omslapd appearing anymore when ldapsearch-ing or doing other ldap related stuff!

Please let me know if this can be fixed the same way on your system.

Best regards


Loglevel is 256 by default so setting it to 0 solved the problem here.
http://www.zytrax.com/books/ldap/ch6/#loglevel

Regards,
grubi

fkienker
Posts: 79
Joined: Sat Nov 18, 2006 1:08 pm
Location: Atlanta GA USA

Postby fkienker » Sun Jan 06, 2008 6:23 pm

The same fix worked here for a Scalix 11.2 with a CentOS 4.6 system.

BTW: Scalix 11.2 with CentOS 5.1 does NOT exhibit this behavior.

Thanks SO MUCH to all who contributed to this thread!!!

Best regards,
Fred

proflan
Posts: 15
Joined: Tue Dec 18, 2007 3:27 pm

Re: Disable Logging for omslapd? [SOLVED]

Postby proflan » Wed Jan 09, 2008 10:43 pm

Psico wrote:Please let me know if this can be fixed the same way on your system.


Thanks, it works on Suse 10.2 / Scalix 11.0.3

ruth_schell
Posts: 29
Joined: Fri Nov 16, 2007 6:35 am

Re: Disable Logging for omslapd? [SOLVED]

Postby ruth_schell » Thu Feb 21, 2008 7:22 am

Psico wrote:

Code: Select all

$ omoff ldap
$ cat /var/opt/scalix/bd/s/sys/slapd.conf
...
...
loglevel 0
$ omon ldap


Please let me know if this can be fixed the same way on your system.



Fixed the log spamming for us (openSuse 10.1 / Scalix 11.1) too.

Thanks Psico!


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 2 guests

cron