unstable LDAP. GetObject() intermittently fails

unstable LDAP. GetObject() intermittently fails

Post by Shan McArthu » Fri, 05 Apr 2002 02:58:54



Hello,

I have discovered that from every non-domain-controller machine, the
following ASP page will intermittently fail:


<% var oLDAP = GetObject ("LDAP://localhost/DC=appdepot,DC=com") %>
<!-- Page OK -->

I have written a small script that continuously retrieves this page on a web
server and reports when the Page OK marker is not found.  I can usually get
through about 100-200 queries before the first failure.  After the first
failure, it fails 1 in about 25 queries on average.

The page does not fail if the web server is a domain controller.  I sniffed
the network, and it looks like the LDAP query that fails in ASP actually
succeeds in LDAP.  My servers are up to the latest service packs and
critical patches.  All the servers are Windows 2000.

How can I diagnose my Active Directory installation and ensure that every
LDAP query run on a web server is successful?

To test in your own environment, here is the script that I use to generate
the load and check the result:  it takes 2 parameters:  a url, and a count

<job id="checkpage">
<script language="JScript">
var iMaxErrors = 1;
 var Args = WScript.Arguments;
 if (Args.length < 2)
 {
  WScript.Echo ("format:  checkpage.wsf url count");
 }
 else
 {
  var oHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
  var fso = new ActiveXObject("Scripting.FileSystemObject");
  var forAppend = 8;
  var iErrorCount = 0;
  var logFile = fso.OpenTextFile("C:\\temp\\checkpage.log", forAppend,
true);

  for (i=0;i<Args.item(1) && iErrorCount<iMaxErrors;i++)
  {
   oHTTP.Open ("GET", "http://"+Args.item(0), false);
   oHTTP.Send();
   if (oHTTP.responseText.indexOf("<!-- Page OK -->") < 0)
   {
    logFile.WriteLine(i +" failed");
    logFile.WriteLine(oHTTP.responseText);
    logFile.WriteLine("");
    iErrorCount++;
   }
   else
   {
    logFile.WriteLine(i + " OK");
   }
  }
  WScript.Echo ("There were " + iErrorCount + " errors in " + i + "
queries");
 }
</Script>
</job>

 
 
 

unstable LDAP. GetObject() intermittently fails

Post by Joe Richards [MVP » Mon, 08 Apr 2002 02:04:54


If the localhost is not a domain controller why are you directing the LDAP
queries at it? It should always fail if you point it at a machine that isn't
an LDAP server.

Quote:>("LDAP://localhost/DC=appdepot,DC=com")

--
Joe Richards
www.joeware.net
---


> Hello,

> I have discovered that from every non-domain-controller machine, the
> following ASP page will intermittently fail:


> <% var oLDAP = GetObject ("LDAP://localhost/DC=appdepot,DC=com") %>
> <!-- Page OK -->

> I have written a small script that continuously retrieves this page on a
web
> server and reports when the Page OK marker is not found.  I can usually
get
> through about 100-200 queries before the first failure.  After the first
> failure, it fails 1 in about 25 queries on average.

> The page does not fail if the web server is a domain controller.  I
sniffed
> the network, and it looks like the LDAP query that fails in ASP actually
> succeeds in LDAP.  My servers are up to the latest service packs and
> critical patches.  All the servers are Windows 2000.

> How can I diagnose my Active Directory installation and ensure that every
> LDAP query run on a web server is successful?

> To test in your own environment, here is the script that I use to generate
> the load and check the result:  it takes 2 parameters:  a url, and a count

> <job id="checkpage">
> <script language="JScript">
> var iMaxErrors = 1;
>  var Args = WScript.Arguments;
>  if (Args.length < 2)
>  {
>   WScript.Echo ("format:  checkpage.wsf url count");
>  }
>  else
>  {
>   var oHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
>   var fso = new ActiveXObject("Scripting.FileSystemObject");
>   var forAppend = 8;
>   var iErrorCount = 0;
>   var logFile = fso.OpenTextFile("C:\\temp\\checkpage.log", forAppend,
> true);

>   for (i=0;i<Args.item(1) && iErrorCount<iMaxErrors;i++)
>   {
>    oHTTP.Open ("GET", "http://"+Args.item(0), false);
>    oHTTP.Send();
>    if (oHTTP.responseText.indexOf("<!-- Page OK -->") < 0)
>    {
>     logFile.WriteLine(i +" failed");
>     logFile.WriteLine(oHTTP.responseText);
>     logFile.WriteLine("");
>     iErrorCount++;
>    }
>    else
>    {
>     logFile.WriteLine(i + " OK");
>    }
>   }
>   WScript.Echo ("There were " + iErrorCount + " errors in " + i + "
> queries");
>  }
> </Script>
> </job>


 
 
 

unstable LDAP. GetObject() intermittently fails

Post by Shan McArthu » Thu, 11 Apr 2002 05:12:20


My mistake in typing the post.  I had replaced my server name with
localhost.  At any rate, even if I place a dedicated DC in the connection,
the connection will eventually fail.  If I do it serverless, then there is
never a failure.

Shan



> If the localhost is not a domain controller why are you directing the LDAP
> queries at it? It should always fail if you point it at a machine that
isn't
> an LDAP server.

> >("LDAP://localhost/DC=appdepot,DC=com")

> --
> Joe Richards
> www.joeware.net
> ---



> > Hello,

> > I have discovered that from every non-domain-controller machine, the
> > following ASP page will intermittently fail:


> > <% var oLDAP = GetObject ("LDAP://localhost/DC=appdepot,DC=com") %>
> > <!-- Page OK -->

> > I have written a small script that continuously retrieves this page on a
> web
> > server and reports when the Page OK marker is not found.  I can usually
> get
> > through about 100-200 queries before the first failure.  After the first
> > failure, it fails 1 in about 25 queries on average.

> > The page does not fail if the web server is a domain controller.  I
> sniffed
> > the network, and it looks like the LDAP query that fails in ASP actually
> > succeeds in LDAP.  My servers are up to the latest service packs and
> > critical patches.  All the servers are Windows 2000.

> > How can I diagnose my Active Directory installation and ensure that
every
> > LDAP query run on a web server is successful?

> > To test in your own environment, here is the script that I use to
generate
> > the load and check the result:  it takes 2 parameters:  a url, and a
count

> > <job id="checkpage">
> > <script language="JScript">
> > var iMaxErrors = 1;
> >  var Args = WScript.Arguments;
> >  if (Args.length < 2)
> >  {
> >   WScript.Echo ("format:  checkpage.wsf url count");
> >  }
> >  else
> >  {
> >   var oHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
> >   var fso = new ActiveXObject("Scripting.FileSystemObject");
> >   var forAppend = 8;
> >   var iErrorCount = 0;
> >   var logFile = fso.OpenTextFile("C:\\temp\\checkpage.log", forAppend,
> > true);

> >   for (i=0;i<Args.item(1) && iErrorCount<iMaxErrors;i++)
> >   {
> >    oHTTP.Open ("GET", "http://"+Args.item(0), false);
> >    oHTTP.Send();
> >    if (oHTTP.responseText.indexOf("<!-- Page OK -->") < 0)
> >    {
> >     logFile.WriteLine(i +" failed");
> >     logFile.WriteLine(oHTTP.responseText);
> >     logFile.WriteLine("");
> >     iErrorCount++;
> >    }
> >    else
> >    {
> >     logFile.WriteLine(i + " OK");
> >    }
> >   }
> >   WScript.Echo ("There were " + iErrorCount + " errors in " + i + "
> > queries");
> >  }
> > </Script>
> > </job>

 
 
 

1. adsi - error using getobject (ldap:...)

Hello,
I've installed the sample app from Tom Rizzo's
book - Programming Outlook & Exchange. I want to
use the currently logged-on user credentials
instead of the log in page.I need to replace the
"OpenDSObject" line with (to connect to the
recipients container):
Set objCont = GetObject
("LDAP://EX01TS299A/cn=Recipients,ou=HOTEST,o=ICBC
TEST")

But I get error 80005000 with this, while this
line works: (connecting to user mailbox)
Set objCont = GetObject
("LDAP://EX01TS299A/cn=JAMER,cn=Recipients,ou=HOTE
ST,o=ICBCTEST")

I've tried different formats for this line. Is
there any other way to connect to the recipients
container in Exchange?

Thanks!
Deb

Sent via Deja.com http://www.deja.com/
Before you buy.

2. logon

3. Adsi - error using getobject(LDAP: etc.)

4. qnx problem

5. Error '8007001f' for code GetObject"LDAP://rootDSE")

6. SNA Server 3.0 - No CA folders

7. GetObject, VB, LDAP and automation error...

8. EMC Storage and Cluster

9. GetObject and LDAP:// with Objuser & ObjMailbox

10. Newbie LDAP GetObject question - PLEASE HELP

11. GetObject(<LDAP path>) very slow!

12. GetObject (WinNT://Mydomain/MyGroup) failed !!

13. GetObject fails when accessig webpage from remote computer