Comments (3)
I'm not aware of any issues like this with the LDAP SDK's in-memory directory server. Could you please provide more context? For example:
- Can you consistently reproduce the problem, or is it only sporadic? If it is sporadic, do you see a bunch of problems all at once and then none for a while, or do they consistently occur throughout your testing?
- Do you see the same problem if you send the requests from the same system rather than from another system? Or if you can't test with requests on the same system, could you test with the in-memory directory server running on a different system than it is now?
- Do you see the problem without the interceptor in place?
- Could you provide a very simple example that demonstrates the problem, or at least describe in more detail what your interceptor does and what kinds of requests you're sending?
You could also try to collect more information about the problem yourself by configuring logging in the in-memory directory server, and also using the LDAP SDK's debugging framework. See https://github.com/pingidentity/ldapsdk/blob/master/src/com/unboundid/ldap/listener/InMemoryDirectoryServerTool.java#L902 for an example of enabling logging in the in-memory directory server, and see https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/util/Debug.html and https://docs.ldap.com/ldap-sdk/docs/getting-started/debug.html for information about the LDAP SDK's debug framework. Maybe something in there (especially the debug information) will provide a clue as to what might be going on. For example, if some unexpected error is happening within the LDAP SDK code, then the debug framework should capture it.
from ldapsdk.
Thanks for your suggestion.
Let me describe the problem in details along with the answer of your questions:
We have developed an automation framework. Where there are continuous requests are coming through ldapclient. If we send only one request then there is no problem. but after receiving 20 or more request the problem occurred.
-
Yes we can reproduce it consistently.
-
Since the data coming from a real component and we actually receive the request, simulate and send response. We didn't test it from the same system.
-
We need to use the interceptor to catch the request and simulate the response.
-
The overridden code is :
@Override
public void processSearchRequest(InMemoryInterceptedSearchRequest request) throws LDAPException {
LOGGER.info("Message received in LDAP Server[" + instanceName + "]:SearchRequest, Message " + request);
LdapCacheKey key = new LdapCacheKey();
key.setAction(LDAPActionType.SEARCH);
key.setConnectionAddress(request.getConnectedAddress());
key.setInterfaceName(instanceName);
key.setConnectionID(request.getConnectionID());
key.setMessageID(request.getMessageID());
key.setDN(request.getRequest().getBaseDN());
key.setFilterString(request.getRequest().getFilter().toNormalizedString());
.
.
.
We failed to find the message for provided in the LOGGER.info.
Let me attach the pcap and the log that can demonstrate the console log that will help you the identify the problem.
Pcap :
Console Log: console.zip
In pcap we can find that there is 3 ldap search request but in log we can find that only the last request is received.
from ldapsdk.
I spent some time looking into this. After a lot of testing, the only way that I could find to reproduce something like what you're seeing was to have an in-memory operation interceptor throw a java.lang.Error (that is, a Throwable that is not an Exception). In that case, the thread responsible for handling communication with the client would exit without either returning an error result back to the client or closing the connection. I just committed a change that ensures it will do both.
If that isn't the problem that you're encountering, then it's probably the case that the only way we'll be able to troubleshoot it is if you provide either a simple program that I can use to reproduce the behavior on my own, or if you can provide some LDAP SDK debugging content from a time when the problem occurs. You should be able to enable debugging with the following code:
com.unboundid.util.Debug.setEnabled(true);
final Logger logger = Logger.getLogger(
com.unboundid.util.Debug.LOGGER_NAME);
logger.setLevel(Level.INFO);
logger.addHandler(new FileHandler("ldap-sdk-debug"));
After you reproduce the problem, the ldap-sdk-debug file will hopefully have some useful information about the nature of the problem.
from ldapsdk.
Related Issues (20)
- Unable to add entries to LDAP server HOT 1
- Is there way to use objectGuid instead of dn in API ? HOT 1
- What is the best option to remove object by objectGuid ? HOT 2
- Is there way to add user to multiple groups using single ldap request ? HOT 5
- How to get group by primaryGroupId ? How to convert primaryGroupId to groupDn? HOT 8
- How to search entry by operational attribute (PrimaryGroupToken)? HOT 2
- search with ALL_OPERATIONAL_ATTRIBUTES doesn't return any operational attributes HOT 2
- Filter.createSubstringFilter with "subInitial" or "subFinal" set to an empty string HOT 1
- Unable to login with AdditionalBindCredentials when certain OperationTypes are part of AuthenticationRequiredOperationTypes (Supressing Anonymous Connections) HOT 3
- Metric to show potentially available connections HOT 3
- Memory 'leak' in GSSAPIBindRequest HOT 5
- transactions support in unboundid ldap HOT 3
- Is there way to encrypt LDAP password ? (at least Base 64) HOT 1
- Is there way to get page number N during pagination request without iterating over previous pages ? HOT 13
- IdleTimeout parameter for pooled connections HOT 6
- KeyStoreKeyManager doesn't expose alternative KeyStore loading mechanisms. HOT 4
- InMemoryDirectoryServer is single threaded and blocks for searches HOT 1
- Simple bind fails if password contains latin character HOT 2
- multihomed ldap server HOT 3
- Unable to read or decode an LDAP message: Invalid value length of 0 for an ASN.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldapsdk.