[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: debugging OpenLDAP client



On Tue, 18 Nov 2014, Igor Shmukler wrote:

Well, the question is what log level will print out ASNs?

I don't know what you're looking to "print out." OpenLDAP doesn't include an ASN.1 debugging / network analysis / etc. suite; it's not like you're going to see BNF in your syslogs. You will get hex dumps and more than a few hints.

So start big, try -d -1, see if it's what you're looking for or not...

On Tuesday, November 18, 2014, Aaron Richton <richton@nbcs.rutgers.edu> wrote:
      On Tue, 18 Nov 2014, Igor Shmukler wrote:

            Dieter,

            I understand that if strace(1) is available, it can be used. I want to learn how to lift the relevant debug information from the OpenLDAP server. Specially, I would love to see
            decoded requests and responses. It can be quite helpful in realizing whether the client author messed up the request, or the unexpected response is due to its' decoding error.


      Compile with --enable-debug (if this default was overridden) and set an appropriate olcLogLevel to get the messages. This is often accomplished in practice using the -d command line argument,
      rather than a permanent config change. If your server is under live load, trying this from the client (e.g. ldapsearch(1)) may be a wise approach.

      See Table 6.1 in the OpenLDAP 2.4 Administrator's Guide for the available levels (please note that some levels are only relevant in slapd(8) context).

            Sincerely,

            Igor Shmukler


            On Tue, Nov 18, 2014 at 2:01 PM, Dieter Kl?nter <dieter@dkluenter.de> wrote:
                  Am Tue, 18 Nov 2014 12:39:42 +0200
                  schrieb Igor Shmukler <igor.shmukler@gmail.com>:

                        Hello,

                        I wrote a client to make RFC 2696 (paged results) requests. My client
                        gets results fine, yet size and cookie values are always 0, "" - this
                        should not be the case. I tried with ldapsearch(1) and it does paging
                        fine. Hence, it makes sense to assume that the server is OK and
                        opaque/cookie must not be empty. At the same time, format of my ASN
                        object is fine.
                        I need to understand where exactly, I messed up.

                  [...]

                  depending on your programming language, you may run your client with
                  strace or similar tools.

                  -Dieter

                  --
                  Dieter Kl?nter | Systemberatung
                  http://sys4.de
                  GPG Key ID: E9ED159B
                  53?37'09,95"N
                  10?08'02,42"E