Increase log verbosity


Is-it possible to increase log verbosity to troubleshoot LDAP authentication ?

Currently the LDAP is working when Graylog is connected directly to the LDAP server.
But if Graylog is connected to the HAPROXY which has LDAP servers in their backends it does not work.


Are you refering to something like this?

  1. Go to web interface System - Logging and change log level from info to debug, in desired sections:
  • Graylog
  • Sockets
  • Indexer
  • Authentication (in case of LDAP)
  1. Then check normal graylog logs file:
    sudo tail -f /var/log/graylog-server/server.log

  2. Revert back if not needed anymore.

I changed the authentication verbosity to TRACE. However when I check my LDAP connection with the button “Test server connection”, I don’t see anything in TRACE level in the log file.

The only thing I have is:

2021-05-06T12:16:57.728+02:00 ERROR [LdapNetworkConnection] Bind failed : timeout occurred
2021-05-06T12:16:57.731+02:00 ERROR [LdapNetworkConnection] The response queue has been emptied, no response was found. TimeOut occurred
at [graylog.jar:?]
at [graylog.jar:?]
at [graylog.jar:?]
at [graylog.jar:?]
at [graylog.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke( [graylog.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$ [graylog.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke( [graylog.jar:?]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch( [graylog.jar:?]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch( [graylog.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke( [graylog.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( [graylog.jar:?]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( [graylog.jar:?]
at org.glassfish.jersey.server.ServerRuntime$ [graylog.jar:?]
at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope( [graylog.jar:?]
at org.glassfish.jersey.server.ServerRuntime.process( [graylog.jar:?]
at org.glassfish.jersey.server.ApplicationHandler.handle( [graylog.jar:?]
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service( [graylog.jar:?]
at org.glassfish.grizzly.http.server.HttpHandler$ [graylog.jar:?]
at com.codahale.metrics.InstrumentedExecutorService$ [graylog.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$ Source) [?:?]
at Source) [?:?]

Probably LDAP server connection is not working, due to timeout. How did you configure graylog LDAP settings and haproxy?

Test telnet on port 636 from the graylog server: OK

Config LDAP in Graylog:

Server Type: LDAP
Server Address ldaps://directory.xxxxxx.xx 636
Options: SSL + Allow self-signed certificates
System Username cm=xxx,ou=xxx,dc=xxx,dc=com

Config haproxy:

frontend front-ldap
bind ssl crt /etc/ssl/private/xxxxxx.pem no-sslv3
mode tcp
maxconn 1000
log global
timeout client 3000s
option tcplog
option dontlognull
default_backend bck-ldap

backend bck-ldap
server xxx xx.xx.xx.xx:636 check inter 30s rise 2 fall 3 fastinter 1s ssl ca-file /etc/ssl/certs/xxxxxx.crt
server xxx xx.xx.xx.xx:636 check inter 30s rise 2 fall 3 fastinter 1s ssl ca-file /etc/ssl/certs/xxxxxx.crt
balance static-rr
mode tcp
fullconn 100
option ldap-check
timeout server 50s
timeout connect 10s

Which graylog version do you use?

I am using the version 3.3.12-1.

Try to use ldapsearch if it works from graylog box:

LDAPTLS_REQCERT=never ldapsearch -H "ldaps://" -x -W -D "" -b "dc=example,dc=com" "(&(objectCategory=person)(objectClass=user))"
# extended LDIF
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (&(objectCategory=person)(objectClass=user))
# requesting: ALL

# search result
search: 2
result: 0 Success

# numResponses: 1

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.