Hello Rakesh,

For point 2:
Have you tried "ldapsearch -x -h server-ip -p server-port" command using command prompt?
If it is not working that means server is not reachable from your client host.
If ping to server is working, then check whether  slapd server is running on the server host.
If first few requests are really reaching to server, then you could try with starting the slapd using -d option and check what error it displays.

Thanks,
Digambar

On Mon, Jun 2, 2008 at 6:36 PM, Rakesh Yadav <rkyadav@cdac.in> wrote:
Hi,

I m using openldap-2.3.38 over linux platform.

I have written a library using LDAP client API's according to my requirement.
I m having RPC clients and a RPC server. This RPC server is multithreaded and uses the library which is written using LDAP client api.

The problem is :
1. I have open a single connection with LDAP server and passed the global LDAP * ptr to all my library calls,
    And i sended a search request from rpc client in a loop,  it works and gives the result but as i run second request for
    reading data from rpc server then i get error from LDAP server "Broken pipe".

2. Then i have decided i will use seprate connection with LDAP for each thread and use a local LDAP *ptr for thread.
     This time multiple requests from rpc client works for 2-3 minutes after that it also gives error.
     "ldap_bind :Can't contact LDAP server"
     In this case i opened and closed a connection with LDAP server for each thread.

Please suggest me some solution for handling multiple threads with LDAP client API.
In case of Solaris i got a sample for handling multiple threads with LDAP client api's.

But this solution doesn't work over Linux.

Please give me some solution.

Thanks