Re: logging all incoming requests
On Thu, Feb 18, 2016 at 1:40 PM, Timothy Keith <timothy.g.ke...@gmail.com> wrote: > On Mon, Feb 15, 2016 at 4:36 PM, Timothy Keith > <timothy.g.ke...@gmail.com> wrote: >> On Mon, Feb 15, 2016 at 1:37 PM, Emmanuel Lécharny <elecha...@gmail.com> >> wrote: >>> Le 15/02/16 18:55, Timothy Keith a écrit : >>>> I am attempting to do pass-through authentication from an OpenLDAP >>>> server. I would to have debugging logs for all incoming requests. >>>> >>>> Tim >>> What kind of log do you want exactly ? >>> >>> If you want to have some logs about every received message, you can >>> modify the log4j.properties to set the >>> org.apache.directory.server.ldap.handlers.request package to DEBUG. >>> >>> >>> You'll receive logs like : >>> >>> LOG.debug( "Received: {}", bindRequest ); >>> LOG.debug( "Handling request: {}", req ); >>> LOG.debug( "Handling compare request while ignoring referrals: >>> {}", req ); >>> LOG.debug( "Handling request: {}", req ); >>> LOG.debug( "Handling modify dn request while ignoring referrals: >>> {}", req ); >>> LOG.debug( "Handling request : {}", req ); >>> LOG.debug( "Handling single reply request: {}", req ); >>> LOG.debug( "Received: {}", unbindRequest ); >>> >>> Four problems here : >>> - not all the messages get logged (Abandon) >>> - not all extended operations are logged, and they use a different logger >>> - overall, the messages are not consistent >>> - you'll be flooded by logs you do'nt want. >>> >>> A better option would be to set a logger on >>> org.apache.directory.api.ldap.codec.api.LdapDecoder. You will then get >>> the fully decoded LDAP message like : >>> >>> LOG.debug( "Decoded LdapMessage : " + container ); >>> >>> >> >> It would first help me to know how to configure the location for the >> wrapper.log on Microsoft Windows, and any other log files. In >> wrapper.conf see a reference to "wrapper.log" file, but the single >> occurrence of that file was only written to during the install of >> Apache DS. >> >> Tim > > Sometimes the search logs stop showing any result of ldapsearch > requests. This Apache Directory Studio 2.0.0 on a a Windows 7 > system. > > Tim Is it generally recommended to run Apache DS on Linux vs Windows? Tim
Re: logging all incoming requests
On Mon, Feb 15, 2016 at 4:36 PM, Timothy Keith <timothy.g.ke...@gmail.com> wrote: > On Mon, Feb 15, 2016 at 1:37 PM, Emmanuel Lécharny <elecha...@gmail.com> > wrote: >> Le 15/02/16 18:55, Timothy Keith a écrit : >>> I am attempting to do pass-through authentication from an OpenLDAP >>> server. I would to have debugging logs for all incoming requests. >>> >>> Tim >> What kind of log do you want exactly ? >> >> If you want to have some logs about every received message, you can >> modify the log4j.properties to set the >> org.apache.directory.server.ldap.handlers.request package to DEBUG. >> >> >> You'll receive logs like : >> >> LOG.debug( "Received: {}", bindRequest ); >> LOG.debug( "Handling request: {}", req ); >> LOG.debug( "Handling compare request while ignoring referrals: >> {}", req ); >> LOG.debug( "Handling request: {}", req ); >> LOG.debug( "Handling modify dn request while ignoring referrals: >> {}", req ); >> LOG.debug( "Handling request : {}", req ); >> LOG.debug( "Handling single reply request: {}", req ); >> LOG.debug( "Received: {}", unbindRequest ); >> >> Four problems here : >> - not all the messages get logged (Abandon) >> - not all extended operations are logged, and they use a different logger >> - overall, the messages are not consistent >> - you'll be flooded by logs you do'nt want. >> >> A better option would be to set a logger on >> org.apache.directory.api.ldap.codec.api.LdapDecoder. You will then get >> the fully decoded LDAP message like : >> >> LOG.debug( "Decoded LdapMessage : " + container ); >> >> > > It would first help me to know how to configure the location for the > wrapper.log on Microsoft Windows, and any other log files. In > wrapper.conf see a reference to "wrapper.log" file, but the single > occurrence of that file was only written to during the install of > Apache DS. > > Tim Sometimes the search logs stop showing any result of ldapsearch requests. This Apache Directory Studio 2.0.0 on a a Windows 7 system. Tim
Re: connection refused on Windows 7
On Tue, Feb 16, 2016 at 11:27 AM, Emmanuel Lécharny <elecha...@gmail.com> wrote: > Le 16/02/16 17:30, Timothy Keith a écrit : >> The Apache Directory Studio and the server are on the same Windows 7 >> computer. >> The only recent changes were the log4.properties file - attempting to >> use DEBUG settings > > Check that you are connecting on the right port with the correct DN and > password. > Thanks, the ports were incorrect. I changed the ports with this LDIF via Studio but when I restarted the sever it couldn't connect. So, I reset them back to 10389 and 10636. Why didn't the AS server read the configuration change made through DS Studio ? # change the default port dn: ads-transportId=ldap,ou=transports,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config changetype: modify replace: ads-systemport ads-systemport: 389 # change the default secure port dn: ads-transportId=ldaps,ou=transports,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config changetype: modify replace: ads-systemport: 10636 ads-systemport: 636 Tim
connection refused on Windows 7
The Apache Directory Studio and the server are on the same Windows 7 computer. The only recent changes were the log4.properties file - attempting to use DEBUG settings Tim eclipse.buildId=unknown java.version=1.8.0_73 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: /studio-rcp/resources/icons/linux/studio.xpm Command-line arguments: -os win32 -ws win32 -arch x86_64 /studio-rcp/resources/icons/linux/studio.xpm org.apache.directory.studio.common.core Error Tue Feb 16 10:00:06 CST 2016 org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect to the server: Connection refused: no further information at org.apache.directory.ldap.client.api.LdapNetworkConnection.connect(LdapNetworkConnection.java:671) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper$1.run(DirectoryApiConnectionWrapper.java:230) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1171) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.doConnect(DirectoryApiConnectionWrapper.java:259) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.connect(DirectoryApiConnectionWrapper.java:170) at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:111) at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:221) at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:47) at org.apache.mina.core.polling.AbstractPollingIoConnector.processConnections(AbstractPollingIoConnector.java:490) at org.apache.mina.core.polling.AbstractPollingIoConnector.access$700(AbstractPollingIoConnector.java:65) at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.run(AbstractPollingIoConnector.java:559) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect to the server: Connection refused: no further information at org.apache.directory.ldap.client.api.LdapNetworkConnection.connect(LdapNetworkConnection.java:671) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper$1.run(DirectoryApiConnectionWrapper.java:230) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1171) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.doConnect(DirectoryApiConnectionWrapper.java:259) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.connect(DirectoryApiConnectionWrapper.java:170) at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:111) at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:221) at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:47) at org.apache.mina.core.polling.AbstractPollingIoConnector.processConnections(AbstractPollingIoConnector.java:490) at org.apache.mina.core.polling.AbstractPollingIoConnector.access$700(AbstractPollingIoConnector.java:65) at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.run(AbstractPollingIoConnector.java:559) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Re: logging all incoming requests
On Mon, Feb 15, 2016 at 1:37 PM, Emmanuel Lécharny <elecha...@gmail.com> wrote: > Le 15/02/16 18:55, Timothy Keith a écrit : >> I am attempting to do pass-through authentication from an OpenLDAP >> server. I would to have debugging logs for all incoming requests. >> >> Tim > What kind of log do you want exactly ? > > If you want to have some logs about every received message, you can > modify the log4j.properties to set the > org.apache.directory.server.ldap.handlers.request package to DEBUG. > > > You'll receive logs like : > > LOG.debug( "Received: {}", bindRequest ); > LOG.debug( "Handling request: {}", req ); > LOG.debug( "Handling compare request while ignoring referrals: > {}", req ); > LOG.debug( "Handling request: {}", req ); > LOG.debug( "Handling modify dn request while ignoring referrals: > {}", req ); > LOG.debug( "Handling request : {}", req ); > LOG.debug( "Handling single reply request: {}", req ); > LOG.debug( "Received: {}", unbindRequest ); > > Four problems here : > - not all the messages get logged (Abandon) > - not all extended operations are logged, and they use a different logger > - overall, the messages are not consistent > - you'll be flooded by logs you do'nt want. > > A better option would be to set a logger on > org.apache.directory.api.ldap.codec.api.LdapDecoder. You will then get > the fully decoded LDAP message like : > > LOG.debug( "Decoded LdapMessage : " + container ); > > It would first help me to know how to configure the location for the wrapper.log on Microsoft Windows, and any other log files. In wrapper.conf see a reference to "wrapper.log" file, but the single occurrence of that file was only written to during the install of Apache DS. Tim
add new attribute via LDIF file
How can I add a new attribute through an LDIF file ? For this DN I would like to add a new attribute "telephoneNumber" with a value. DN: uid=tkeith,ou=users,ou=system Tim
Re: add new attribute via LDIF file
I was wanting to use the Studio. On Sat, Feb 6, 2016 at 6:02 PM, Emmanuel Lécharny <elecha...@gmail.com> wrote: > Le 06/02/16 23:34, Timothy Keith a écrit : >> How can I add a new attribute through an LDIF file ? >> >> For this DN I would like to add a new attribute "telephoneNumber" with a >> value. >> >> DN: uid=tkeith,ou=users,ou=system >> >> >> Tim > Use ldapmodify (http://www.tldp.org/HOWTO/LDAP-HOWTO/utilities.html)