Discussion:
ADSI error 8007203A. The server is not operational.
(too old to reply)
stepkurt
2005-11-23 17:56:05 UTC
Permalink
Hi,

We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)

We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).

Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.

Does anyone have any idea what might be causing this behavior? It's very
frustrating.
Jeremie Legault
2005-11-23 21:37:09 UTC
Permalink
Could be a number of issues:
1. the systems are not replicating fast enough (if they are all acting as
domain controllers)
2. The script may be configure to obtain information from only one server(
and the others aren't even getting used)
3. Directory might be corrupt on that one system. - If you can live without
it see how well the others do on there own (perhaps rebuild and re-add to the
system later)

What are specific error messages?

If you are in Ottaaw send me and email I might be able to help you out
Post by stepkurt
Hi,
We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)
We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).
Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.
Does anyone have any idea what might be causing this behavior? It's very
frustrating.
stepkurt
2005-11-24 14:56:01 UTC
Permalink
Jeremie,

I am from Ottawa.

Funny, I know a Jeremie Legault. I've gone snowbaording with him at Jay
Peak...

Anyway, I posted some of the errors in response to the other reply I got
from my original post. No point in double posting so have look there if you
want. I'll contasct you by e-mail with more details.
Post by Jeremie Legault
1. the systems are not replicating fast enough (if they are all acting as
domain controllers)
2. The script may be configure to obtain information from only one server(
and the others aren't even getting used)
3. Directory might be corrupt on that one system. - If you can live without
it see how well the others do on there own (perhaps rebuild and re-add to the
system later)
What are specific error messages?
If you are in Ottaaw send me and email I might be able to help you out
Post by stepkurt
Hi,
We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)
We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).
Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.
Does anyone have any idea what might be causing this behavior? It's very
frustrating.
Rich Raffenetti
2005-11-24 04:52:49 UTC
Permalink
I have been getting the same error for awhile from calls to GetObject
against our Active Directory..

I do ADSI from Visual Basic 6 to do Active Directory maintenance operations.
I synchronize information with an Oracle HR database, for example. Many of
my programs just do Active Directory without reference to Oracle.

We are upgrading the automation server (where these programs run) to a much
faster server (not one of our four domain controllers) and just moving the
program to the new server from an existing, but older Windows Server 2003
system caused it to start failing. I installed VB on the server so I could
run the program in interactive mode and I found the error you are seeing.
In debug mode I just hit continue and the program would retry the GetObject
call and it would return with a correct result.

My current conclusion is that rapid calls to GetObject cause the failure. I
do not specify the server name in the GetObject argument.

What I did to allow me to continue was to create a wrapper subroutine that
would retry the GetObject call if the failure is detected. It retries up to
10 times with a "sleep" call in between retries. In test mode I found out
that out of 16,000 calls to GetObject only a retries were invoked for only a
few (<10) of the 16,000 accounts. Only a few of the calls did more than one
retry and I never exceeded the 10 retries.

I don't think having a wrapper routine for system calls is a good solution.
If the arguments are correct, the system should return good information and
NOT say it's not operational!

The biggest surprise to me is that the failures occur and that doing retries
solves the problem. This has to be the effect of some timing bug in the OS!
Likely a race condition that the programmer has not recognized.

I will post the wrapper routine if you would like the example.
Post by stepkurt
Hi,
We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)
We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).
Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.
Does anyone have any idea what might be causing this behavior? It's very
frustrating.
stepkurt
2005-11-24 14:51:07 UTC
Permalink
Probably the most frequent error we receive is in this sub routine where we
add users to a group...

Error Message:
Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an
object.
at iCase.icADSI.icAddUserToGroup(IADsUser uUser, IADsGroup gGroup) in
c:\inetpub\wwwroot\dev\Classes\icADSI.vb:line 257


Sometimes the application is hanging in this function...

Private Function icFindUserADSPath(ByVal sUserName As String) As String
Dim sSQL, adsPath As String

Dim oCon As New OleDb.OleDbConnection("Provider=ADsDSOObject")
Dim dr As OleDb.OleDbDataReader

sSQL =
"<LDAP://DC=JUSTICE,DC=gc,DC=ca>;(&(objectClass=user)(sAMAccountname=" &
sUserName & "));ADsPath,;subtree"

Dim oComm As New Data.OleDb.OleDbCommand(sSQL, oCon)

Try

oCon.Open()

oComm.CommandType = CommandType.Text

dr = oComm.ExecuteReader(CommandBehavior.CloseConnection)

While dr.Read
adsPath = dr.Item(0)
Exit While
End While
dr.Close()

Return adsPath

Catch ex As Exception
Throw New Exception(ex.ToString)
Finally
If Not oCon Is Nothing Then oCon.Close()
If Not oComm.Connection Is Nothing Then oComm.Connection.Close()
oCon.Dispose() : oComm.Dispose()
End Try

These erros happen at least once a day...

Sometimes when this happens the asnet_wp.exe process on the web server can
eat up almost a GB of memory.

Other times, we get these errors for a while, then all of a sudden it starts
working again.

Rich, if you wanted to post the wrapper routine, that would be great.
Post by Rich Raffenetti
I have been getting the same error for awhile from calls to GetObject
against our Active Directory..
I do ADSI from Visual Basic 6 to do Active Directory maintenance operations.
I synchronize information with an Oracle HR database, for example. Many of
my programs just do Active Directory without reference to Oracle.
We are upgrading the automation server (where these programs run) to a much
faster server (not one of our four domain controllers) and just moving the
program to the new server from an existing, but older Windows Server 2003
system caused it to start failing. I installed VB on the server so I could
run the program in interactive mode and I found the error you are seeing.
In debug mode I just hit continue and the program would retry the GetObject
call and it would return with a correct result.
My current conclusion is that rapid calls to GetObject cause the failure. I
do not specify the server name in the GetObject argument.
What I did to allow me to continue was to create a wrapper subroutine that
would retry the GetObject call if the failure is detected. It retries up to
10 times with a "sleep" call in between retries. In test mode I found out
that out of 16,000 calls to GetObject only a retries were invoked for only a
few (<10) of the 16,000 accounts. Only a few of the calls did more than one
retry and I never exceeded the 10 retries.
I don't think having a wrapper routine for system calls is a good solution.
If the arguments are correct, the system should return good information and
NOT say it's not operational!
The biggest surprise to me is that the failures occur and that doing retries
solves the problem. This has to be the effect of some timing bug in the OS!
Likely a race condition that the programmer has not recognized.
I will post the wrapper routine if you would like the example.
Post by stepkurt
Hi,
We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)
We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).
Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.
Does anyone have any idea what might be causing this behavior? It's very
frustrating.
Rich Raffenetti
2005-11-25 14:24:07 UTC
Permalink
I should have mentioned that I run my query jobs on a new member server
(dual 3 GHz CPU). The domain controllers are older machines (dual 1 GHz
CPU). All are Intel machines.

I have attached two routines below that make up my ADSIOps module. One is
my production wrapper routine called myGetObject and the second is a version
I use when testing/developing called devGetObject. You invoke it wherever
you would invoke GetObject, for example

dim user as IADSuser
set user = myGetObject(pathName)

I really hate having to use such a routine but it seems to be an effective
workaround for GetObject system calls that I find unreliable.

I hope this is useful for you.

-----------------------------------------------------------------------------------------
Option Explicit

Public Function myGetObject(pathName As String) As Object
' This program is a wrapper for GetObject. The purpose of this program is
to
' do retries up to maxFailures times until the GetObject succeeds.
Const maxFailures = 10 ' Maximum number of allowed failures
before quitting
Const sleepTime = 500 ' Initial milliseconds to sleep
Dim failureCount As Long
Dim sleepFactor As Long
failureCount = 0
sleepFactor = 1
reTry: ' keep this before the on error statement
On Error Resume Next
Set myGetObject = GetObject(pathName)
If Err.Number = -2147016646 Then
failureCount = failureCount + 1
If failureCount < maxFailures Then
Sleep sleepTime * sleepFactor ' Value is in milliseconds
sleepFactor = sleepFactor + sleepFactor
GoTo reTry
Else
Set myGetObject = Nothing ' is this needed??
End If
End If
End Function

Public Function devGetObject(logFileNo As Integer, pathName As String) As
Object
' This program is a wrapper for GetObject. The purpose of this program is
to
' do retries until the GetObject succeeds.
Const maxFailures = 10 ' Maximum number of allowed failures
before quitting
Const sleepTime = 500 ' Initial milliseconds to sleep
Dim failureCount As Long
Dim sleepFactor As Long
failureCount = 0
sleepFactor = 1
reTry: ' keep this before the on error statement
On Error Resume Next
Set devGetObject = GetObject(pathName)
'' If Err.Number = -2147016646 Then
If Err.Number <> 0 Then
failureCount = failureCount + 1
If failureCount = 1 Then
Print #logFileNo, " devGetObject: " & pathName
End If
Print #logFileNo, "failure count: " & CStr(failureCount) _
& " Error number: " & Err.Number _
& " Error source: " & Err.Source _
& " Error description: " & Err.description
If failureCount < maxFailures Then
Sleep sleepTime * sleepFactor ' Value is in milliseconds
sleepFactor = sleepFactor + sleepFactor
GoTo reTry
Else
Print #logFileNo, "Exceeded max failures " & maxFailures
Set devGetObject = Nothing ' is this needed??
End If
End If
End Function
Post by stepkurt
Probably the most frequent error we receive is in this sub routine where we
add users to a group...
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an
object.
at iCase.icADSI.icAddUserToGroup(IADsUser uUser, IADsGroup gGroup) in
c:\inetpub\wwwroot\dev\Classes\icADSI.vb:line 257
Sometimes the application is hanging in this function...
Private Function icFindUserADSPath(ByVal sUserName As String) As String
Dim sSQL, adsPath As String
Dim oCon As New OleDb.OleDbConnection("Provider=ADsDSOObject")
Dim dr As OleDb.OleDbDataReader
sSQL =
"<LDAP://DC=JUSTICE,DC=gc,DC=ca>;(&(objectClass=user)(sAMAccountname=" &
sUserName & "));ADsPath,;subtree"
Dim oComm As New Data.OleDb.OleDbCommand(sSQL, oCon)
Try
oCon.Open()
oComm.CommandType = CommandType.Text
dr = oComm.ExecuteReader(CommandBehavior.CloseConnection)
While dr.Read
adsPath = dr.Item(0)
Exit While
End While
dr.Close()
Return adsPath
Catch ex As Exception
Throw New Exception(ex.ToString)
Finally
If Not oCon Is Nothing Then oCon.Close()
If Not oComm.Connection Is Nothing Then
oComm.Connection.Close()
oCon.Dispose() : oComm.Dispose()
End Try
These erros happen at least once a day...
Sometimes when this happens the asnet_wp.exe process on the web server can
eat up almost a GB of memory.
Other times, we get these errors for a while, then all of a sudden it starts
working again.
Rich, if you wanted to post the wrapper routine, that would be great.
Post by Rich Raffenetti
I have been getting the same error for awhile from calls to GetObject
against our Active Directory..
I do ADSI from Visual Basic 6 to do Active Directory maintenance operations.
I synchronize information with an Oracle HR database, for example. Many of
my programs just do Active Directory without reference to Oracle.
We are upgrading the automation server (where these programs run) to a much
faster server (not one of our four domain controllers) and just moving the
program to the new server from an existing, but older Windows Server 2003
system caused it to start failing. I installed VB on the server so I could
run the program in interactive mode and I found the error you are seeing.
In debug mode I just hit continue and the program would retry the GetObject
call and it would return with a correct result.
My current conclusion is that rapid calls to GetObject cause the failure.
I
do not specify the server name in the GetObject argument.
What I did to allow me to continue was to create a wrapper subroutine that
would retry the GetObject call if the failure is detected. It retries up to
10 times with a "sleep" call in between retries. In test mode I found out
that out of 16,000 calls to GetObject only a retries were invoked for only a
few (<10) of the 16,000 accounts. Only a few of the calls did more than one
retry and I never exceeded the 10 retries.
I don't think having a wrapper routine for system calls is a good solution.
If the arguments are correct, the system should return good information and
NOT say it's not operational!
The biggest surprise to me is that the failures occur and that doing retries
solves the problem. This has to be the effect of some timing bug in the OS!
Likely a race condition that the programmer has not recognized.
I will post the wrapper routine if you would like the example.
Post by stepkurt
Hi,
We have a .NET web application that uses ADSI for adding / removing users
to shares and to get at Exchange info (ex. Server names, e-mail addresses)
We have 4 web servers that we think are identically configued. One of the
severs is giving us fits. On occasion it seems like ADSI stops working. I
don't see any cause for it but all of a sudden we are flooded with errors
like 8007203A (The server is not operational).
Re-starting IIS or re-booting the server always fixes the problem but it's
not the solution we want.
Does anyone have any idea what might be causing this behavior? It's very
frustrating.
Loading...