Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

Active Directory 서버의 NETLOGON 서비스가 멈췄을 때 발생하는 문제

Active Directory 서버의 NETLOGON 서비스가 시작되지 않으면, 우선 SQL 서버의 SPN 등록이 안되어 이후 SQL 서버로 접속하는 모든 서비스들이 장애를 겪게 됩니다.

우선, TFS 서버는 다음과 같은 이벤트를 남기며 서비스가 안됩니다.

Log Name:      Application
Source:        TFS Services
Date:          2016-10-21 오후 1:54:23
Event ID:      9005
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      testtfs.testad.com
Description:
TF53010: Team Foundation 구성 요소 또는 확장에서 다음 오류가 발생했습니다.:
날짜(UTC): 2016-10-21 오전 4:54:23
컴퓨터: testtfs
응용 프로그램 도메인: /LM/W3SVC/5/ROOT/tfs-1-131214991278339538
어셈블리: Microsoft.TeamFoundation.Framework.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v4.0.30319
서비스 호스트: 
프로세스 정보:
  프로세스 이름: w3wp
  프로세스 ID: 3680
  스레드 ID: 3984
  계정 이름: TESTAD\tfsadmin

세부 메시지: TF30059: 웹 서비스를 초기화하는 동안 심각한 오류가 발생했습니다.

웹 요청 정보
    URL: http://testtfs.testad.com:8083/tfs/DefaultCollection/VersionControl/v1.0/repository.asmx [메서드: POST]
    사용자 에이전트: Team Foundation (devenv.exe, 14.102.25521.0, Enterprise, SKU:37)
    헤더: 사용할 수 없음
    경로: /tfs/DefaultCollection/VersionControl/v1.0/repository.asmx
    로컬 요청: False
    호스트 주소: 192.168.0.1
    사용자: 사용할 수 없음 [인증 형식: 사용할 수 없음]

예외 메시지: TF53001: 관리자가 데이터베이스 작업을 취소했습니다.(DatabaseOperationCanceledException 형식)

Log Name:      Application
Source:        TFS Services
Date:          2016-10-21 오후 1:54:23
Event ID:      9001
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      testtfs.testad.com
Description:
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 2016-10-21 오전 4:54:23
Machine: testtfs
Application Domain: /LM/W3SVC/5/ROOT/tfs-1-131214991278339538
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v4.0.30319
Service Host: 
Process Details:
  Process Name: w3wp
  Process Id: 3680
  Thread Id: 3984
  Account name: TESTAD\tfsadmin

Detailed Message: Application Request Processing Started

Server Version = Microsoft.TeamFoundation.Framework.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Service Account = TESTAD\tfsadmin
Machine Name = testtfs


Exception Message: TF53001: The database operation was canceled by an administrator. (type DatabaseOperationCanceledException)
Exception Data Dictionary:
{421AC3F1-A306-4C9B-B3F6-5812F9121FC8} = True


Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(Exception exception)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteReader()
   at Microsoft.TeamFoundation.Framework.Server.ResourceManagementComponent.GetServiceVersion(String serviceName)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationResourceManagementService.ReadServiceVersionFromDatabase(ISqlConnectionInfo connectionInfo, Boolean handleNoResourceManagementSchema, String serviceName, Boolean& resourceManagementSchemaExists)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationResourceManagementService.GetServiceVersionRaw[TComponent](ISqlConnectionInfo connectionInfo, ServiceVersionEntry& serviceVersionEntry, IComponentCreator& componentCreator, Boolean handleNoResourceManagementSchema, Boolean throwExceptions, ComponentFactory& factory, Boolean& resourceManagementSchemaExists)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationResourceManagementService.CreateComponentRaw[TComponent](ISqlConnectionInfo connectionInfo, Int32 commandTimeout, Int32 deadlockPause, Int32 maxDeadlockRetries, Boolean handleNoResourceManagementSchema, Boolean verifyServiceVersion, Boolean throwExceptions, ITFLogger logger)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationDatabaseManagementService.GetConfigurationDatabaseBootstrap(ISqlConnectionInfo configDbConnectionInfo)
   at Microsoft.TeamFoundation.Framework.Server.DeploymentServiceHost..ctor(HostProperties hostProperties, ISqlConnectionInfo connectionInfo, Boolean failOnInvalidConfiguration)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationApplicationCore.ApplicationStart()

Inner Exception Details:

Exception Message: The target principal name is incorrect.  Cannotgenerate SSPI context. (type SqlException)
SQL Exception Class: 11
SQL Exception Number: 0
SQL Exception Procedure: GenClientContext
SQL Exception Line Number: 0
SQL Exception Server: testdb
SQL Exception State: 0
SQL Error(s):

Exception Data Dictionary:
HelpLink.ProdName = Microsoft SQL Server
HelpLink.EvtSrc = MSSQLServer
HelpLink.EvtID = 0
HelpLink.BaseHelpUrl = http://go.microsoft.com/fwlink
HelpLink.LinkId = 20476


Exception Stack Trace:    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior)


Web Request Details
    Url: http://testtfs.testad.com:8083/tfs/DefaultCollection/VersionControl/v1.0/repository.asmx [method: POST]
    User Agent: Team Foundation (devenv.exe, 14.102.25521.0, Enterprise, SKU:37)
    Headers: not available
    Path: /tfs/DefaultCollection/VersionControl/v1.0/repository.asmx
    Local Request: False
    Host Address: 192.168.0.1
    User: not available [authentication type: not available]

TFS 계정을 조회하는 명령어를 내려보면 이런 오류가 발생하는데,

C:\WINDOWS\system32>setspn -L TESTAD\tfsadmin
FindDomainForAccount: Call to DsGetDcNameWithAccountW failed with return value 0x0000054B
Could not find account tfsadmin

원래는 다음과 같은 출력 결과를 보여야 정상입니다.

D:\>setspn -L testad\tfsadmin
Registered ServicePrincipalNames for CN=tfsadmin,CN=Users,DC=testad,DC=com:

재미있는 것은 SQL 서버의 SPN을 Active Directory에서 조회해 보면 다음과 같이 잘 나옵니다.

C:\WINDOWS\system32>setspn -q MSSQLSvc/testdb.testad.com:1433
Checking domain DC=TESTAD,DC=com
CN=testdb,CN=Computers,DC=TESTAD,DC=com
        MSSQLSvc/testdb.testad.com:1433
        MSSQLSvc/testdb.testad.com
        WSMAN/testdb.testad.com
        WSMAN/testdb
        TERMSRV/testdb.testad.com
        TERMSRV/testdb
        RestrictedKrbHost/testdb
        HOST/testdb
        RestrictedKrbHost/testdb.testad.com
        HOST/testdb.testad.com

Existing SPN found!

그런데, DB 서버에서는 (AD의 NETLOGON 서비스가 멈춰 있으므로) 다음과 같은 오류가 발생합니다.

C:\WINDOWS\system32>setspn -q MSSQLSvc/testdb.testad.com:1433
Ldap Error(0x51 -- Server Down): ldap_connect
Failed to retrieve DN for domain "" : 0x00000051
Warning: No valid targets specified, reverting to current domain.
Ldap Error(0x51 -- Server Down): ldap_connect
Error occurred when searching for existing SPN: 0x00000051

Active Directory 서버에 함께 설치된 DNS의 관리 콘솔을 실행해도 오류가 발생하고,

The server TESTADSVR could not be contacted.

The error was:
The server is unavailable

"Active Directory Domain Services" 관리 콘솔을 실행해도,

Naming information cannot be located because: 
The interface is unknown.
Contact your system administrator to verify that your domain is properly configured and is currently online.

"Group Policy Management Console" 관리 콘솔을 실행해도,

The specified domain controller could not be contacted. This affects the following domain in the console.

Domain: testad.com

The error was:
The specified domain controller could not be contacted.

"Active Directory Domains and Trusts" 관리 콘솔을 실행해도 역시 오류가 발생합니다.

You cannot modify domain or trust information because a Primary Domain Controller (PDC) emulator cannot be contacted. Please verify that the PDC emulator for the current domain and the network are both online and functioning properly.

The configuration information describing this enterprise is not available.
The interface is unknown.

다행히 dcdiag를 실행하면 NETLOGON 서비스가 멈춰있다고 알려주기는 합니다.

C:\WINDOWS\system32>dcdiag /fix

Directory Server Diagnosis

Performing initial setup:
   Trying to find home server...
   Home Server = testadsvr
   * Identified AD Forest.
   Done gathering initial info.

Doing initial required tests

   Testing server: Default-First-Site-Name\testadsvr
      Starting test: Connectivity
         ......................... testadsvr passed test Connectivity

Doing primary tests

   Testing server: Default-First-Site-Name\testadsvr
      Starting test: Advertising
         Fatal Error:DsGetDcName (testadsvr) call failed, error 1355
         The Locator could not find the server.
         ......................... testadsvr failed test Advertising
      Starting test: FrsEvent
         ......................... testadsvr passed test FrsEvent
      Starting test: DFSREvent
         ......................... testadsvr passed test DFSREvent
      Starting test: SysVolCheck
         ......................... testadsvr passed test SysVolCheck
      Starting test: KccEvent
         ......................... testadsvr passed test KccEvent
      Starting test: KnowsOfRoleHolders
         ......................... testadsvr passed test KnowsOfRoleHolders
      Starting test: MachineAccount
         ......................... testadsvr passed test MachineAccount
      Starting test: NCSecDesc
         ......................... testadsvr passed test NCSecDesc
      Starting test: NetLogons
         ......................... testadsvr passed test NetLogons
      Starting test: ObjectsReplicated
         ......................... testadsvr passed test ObjectsReplicated
      Starting test: Replications
         ......................... testadsvr passed test Replications
      Starting test: RidManager
         ......................... testadsvr passed test RidManager
      Starting test: Services
            DFSR Service is stopped on [testadsvr]
            w32time Service is stopped on [testadsvr]
            Invalid service startup type: NETLOGON on testadsvr, current value DEMAND_START, expected value AUTO_START
            NETLOGON Service is stopped on [testadsvr]
         ......................... testadsvr failed test Services
      Starting test: SystemLog
         An error event occurred.  EventID: 0xC00038D4
            Time Generated: 10/21/2016   13:35:40
            Event String:
            The DFS Namespace service could not initialize the trusted domain information on this domain controller, but it will periodically retry the operation. The return code is in the record data.
         ......................... testadsvr failed test SystemLog
      Starting test: VerifyReferences
         ......................... testadsvr passed test VerifyReferences


   Running partition tests on : ForestDnsZones
      Starting test: CheckSDRefDom
         ......................... ForestDnsZones passed test CheckSDRefDom
      Starting test: CrossRefValidation
         ......................... ForestDnsZones passed test CrossRefValidation

   Running partition tests on : DomainDnsZones
      Starting test: CheckSDRefDom
         ......................... DomainDnsZones passed test CheckSDRefDom
      Starting test: CrossRefValidation
         ......................... DomainDnsZones passed test CrossRefValidation

   Running partition tests on : Schema
      Starting test: CheckSDRefDom
         ......................... Schema passed test CheckSDRefDom
      Starting test: CrossRefValidation
         ......................... Schema passed test CrossRefValidation

   Running partition tests on : Configuration
      Starting test: CheckSDRefDom
         ......................... Configuration passed test CheckSDRefDom
      Starting test: CrossRefValidation
         ......................... Configuration passed test CrossRefValidation

   Running partition tests on : TESTAD
      Starting test: CheckSDRefDom
         ......................... TESTAD passed test CheckSDRefDom
      Starting test: CrossRefValidation
         ......................... TESTAD passed test CrossRefValidation

   Running enterprise tests on : testad.com
      Starting test: LocatorCheck
         Warning: DcGetDcName(GC_SERVER_REQUIRED) call failed, error 1355
         A Global Catalog Server could not be located - All GC's are down.
         Warning: DcGetDcName(PDC_REQUIRED) call failed, error 1355
         A Primary Domain Controller could not be located.
         The server holding the PDC role is down.
         Warning: DcGetDcName(TIME_SERVER) call failed, error 1355
         A Time Server could not be located.
         The server holding the PDC role is down.
         Warning: DcGetDcName(GOOD_TIME_SERVER_PREFERRED) call failed, error 1355
         A Good Time Server could not be located.
         Warning: DcGetDcName(KDC_REQUIRED) call failed, error 1355
         A KDC could not be located - All the KDCs are down.
         ......................... testad.com failed test LocatorCheck
      Starting test: Intersite
         ......................... testad.com passed test Intersite

C:\WINDOWS\system32>




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 10/21/2016]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 31  32  33  34  35  36  37  38  39  [40]  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
12619정성태4/28/202112377.NET Framework: 1051. C# - 구조체의 크기가 16바이트가 넘어가면 힙에 할당된다? [2]파일 다운로드1
12618정성태4/27/202110947사물인터넷: 58. NodeMCU v1 ESP8266 CP2102 Module을 이용한 WiFi UDP 통신 [1]파일 다운로드1
12617정성태4/26/20218611.NET Framework: 1050. C# - ETW EventListener의 Keywords별 EventId에 따른 필터링 방법파일 다운로드1
12616정성태4/26/20218603.NET Framework: 1049. C# - ETW EventListener를 상속받았을 때 초기화 순서파일 다운로드1
12615정성태4/26/20216781오류 유형: 712. Microsoft Live 로그인 - 계정을 선택하는(Pick an account) 화면에서 진행이 안 되는 문제
12614정성태4/24/20219448개발 환경 구성: 570. C# - Azure AD 인증을 지원하는 ASP.NET Core/5+ 웹 애플리케이션 예제 구성 [4]파일 다운로드1
12613정성태4/23/20218521.NET Framework: 1048. C# - ETW 이벤트의 Keywords에 속한 EventId 구하는 방법 (2) 관리 코드파일 다운로드1
12612정성태4/23/20218602.NET Framework: 1047. C# - ETW 이벤트의 Keywords에 속한 EventId 구하는 방법 (1) PInvoke파일 다운로드1
12611정성태4/22/20217897오류 유형: 711. 닷넷 EXE 실행 오류 - Mixed mode assembly is build against version 'v2.0.50727' of the runtime
12610정성태4/22/20217716.NET Framework: 1046. C# - 컴파일 시점에 참조할 수 없는 타입을 포함한 이벤트 핸들러를 Reflection을 이용해 구독하는 방법파일 다운로드1
12609정성태4/22/20218996.NET Framework: 1045. C# - 런타임 시점에 이벤트 핸들러를 만들어 Reflection을 이용해 구독하는 방법파일 다운로드1
12608정성태4/21/202110022.NET Framework: 1044. C# - Generic Host를 이용해 .NET 5로 리눅스 daemon 프로그램 만드는 방법 [9]파일 다운로드1
12607정성태4/21/20218549.NET Framework: 1043. C# - 실행 시점에 동적으로 Delegate 타입을 만드는 방법파일 다운로드1
12606정성태4/21/202112424.NET Framework: 1042. C# - enum 값을 int로 암시적(implicit) 형변환하는 방법? [2]파일 다운로드1
12605정성태4/18/20218514.NET Framework: 1041. C# - AssemblyID, ModuleID를 관리 코드에서 구하는 방법파일 다운로드1
12604정성태4/18/20217299VS.NET IDE: 163. 비주얼 스튜디오 속성 창의 "Build(빌드)" / "Configuration(구성)"에서의 "활성" 의미
12603정성태4/16/20218134VS.NET IDE: 162. 비주얼 스튜디오 - 상속받은 컨트롤이 디자인 창에서 지원되지 않는 문제
12602정성태4/16/20219324VS.NET IDE: 161. x64 DLL 프로젝트의 컨트롤이 Visual Studio의 Designer에서 보이지 않는 문제 [1]
12601정성태4/15/20218436.NET Framework: 1040. C# - REST API 대신 github 클라이언트 라이브러리를 통해 프로그래밍으로 접근
12600정성태4/15/20218616.NET Framework: 1039. C# - Kubeconfig의 token 설정 및 인증서 구성을 자동화하는 프로그램
12599정성태4/14/20219320.NET Framework: 1038. C# - 인증서 및 키 파일로부터 pfx/p12 파일을 생성하는 방법파일 다운로드1
12598정성태4/14/20219463.NET Framework: 1037. openssl의 PEM 개인키 파일을 .NET RSACryptoServiceProvider에서 사용하는 방법 (2)파일 다운로드1
12597정성태4/13/20219478개발 환경 구성: 569. csproj의 내용을 공통 설정할 수 있는 Directory.Build.targets / Directory.Build.props 파일
12596정성태4/12/20219272개발 환경 구성: 568. Windows의 80 포트 점유를 해제하는 방법
12595정성태4/12/20218678.NET Framework: 1036. SQL 서버 - varbinary 타입에 대한 문자열의 CAST, CONVERT 변환을 C# 코드로 구현
12594정성태4/11/20218150.NET Framework: 1035. C# - kubectl 명령어 또는 REST API 대신 Kubernetes 클라이언트 라이브러리를 통해 프로그래밍으로 접근 [1]파일 다운로드1
... 31  32  33  34  35  36  37  38  39  [40]  41  42  43  44  45  ...