Skip to content

Commit 1e64fe1

Browse files
authored
Merge pull request #9605 from MicrosoftDocs/rpc-srv-setup-jopilov-082625
AB#7317: Create setup article with rpc server unavailable when provisioning accts
2 parents ef29bba + 44d8729 commit 1e64fe1

2 files changed

Lines changed: 243 additions & 0 deletions

File tree

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
---
2+
title: SQL Server Setup Fails With The RPC server is unavailable When Provisioning Service Accounts
3+
description: This article provides troubleshooting guidance for the "RPC server is unavailable" error when provisioning service accounts during SQL Server Setup.
4+
ms.date: 08/26/2025
5+
ms.custom: sap:Installation, Patching, Upgrade, Uninstall
6+
ms.author: jopilov
7+
ms.topic: troubleshooting-problem-resolution
8+
9+
#customer intent: As a developer or IT administrator, I want to resolve the "RPC server is unavailable" error so that I can successfully set up SQL Server.
10+
---
11+
12+
# "RPC server is unavailable" error when provisioning service accounts during SQL Server Setup
13+
14+
This article helps you troubleshoot an "RPC server is unavailable" error when you set up Microsoft SQL Server instances. This error can occur during the service account provisioning phase of SQL Server Setup.
15+
16+
## Symptoms
17+
18+
During the service account provisioning phase of a SQL Server installation, the installation fails and generates an "RPC Server is unavailable" error message.
19+
20+
The following example log entry shows a failure that occurs during a service account provisioning. In this example, the service account is a domain account named `CONTOSO\SQLSvcAcct`.
21+
22+
```output
23+
(05) 2024-01-19 15:00:42 Slp: Sco.User.LookupADEntry - Attempting to find user account CONTOSO\SQLSvcAcct
24+
(05) 2024-01-19 15:00:42 Slp: Sco: Attempting to check if container 'WinNT://CONTOSO of user account exists
25+
(05) 2024-01-19 15:01:03 Slp: Prompting user if they want to retry this action due to the following failure:
26+
(05) 2024-01-19 15:01:03 Slp: ----------------------------------------
27+
(05) 2024-01-19 15:01:03 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
28+
(05) 2024-01-19 15:01:03 Slp: Inner exceptions are being indented
29+
(05) 2024-01-19 15:01:03 Slp:
30+
(05) 2024-01-19 15:01:03 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
31+
(05) 2024-01-19 15:01:03 Slp:     Message:
32+
(05) 2024-01-19 15:01:03 Slp:         The RPC server is unavailable.
33+
(05) 2024-01-19 15:01:03 Slp:        
34+
(05) 2024-01-19 15:01:03 Slp:     HResult : 0x84bb0001
35+
(05) 2024-01-19 15:01:03 Slp:         FacilityCode : 1211 (4bb)
36+
(05) 2024-01-19 15:01:03 Slp:         ErrorCode : 1 (0001)
37+
(05) 2024-01-19 15:01:03 Slp:     Data:
38+
(05) 2024-01-19 15:01:03 Slp:       WatsonData = Domain
39+
(05) 2024-01-19 15:01:03 Slp:       DisableRetry = true
40+
(05) 2024-01-19 15:01:03 Slp:     Inner exception type: System.Runtime.InteropServices.COMException
41+
(05) 2024-01-19 15:01:03 Slp:         Message:
42+
(05) 2024-01-19 15:01:03 Slp:                 The RPC server is unavailable.
43+
(05) 2024-01-19 15:01:03 Slp:                
44+
(05) 2024-01-19 15:01:03 Slp:         HResult : 0x800706ba
45+
(05) 2024-01-19 15:01:03 Slp:         Stack:
46+
(05) 2024-01-19 15:01:03 Slp:                 at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
47+
(05) 2024-01-19 15:01:03 Slp:                 at Microsoft.SqlServer.Configuration.Sco.User.LookupADEntry()
48+
(05) 2024-01-19 15:01:03 Slp: ----------------------------------------
49+
```
50+
51+
This log entry shows that the [System.DirectoryServices.DirectoryEntries.Find()](/dotnet/api/system.directoryservices.directoryentries.find) method fails and returns the error message, `The RPC server is unavailable`.
52+
53+
You can look up the "HResult" error, `0x800706ba`, by using the Certutil.exe command line tool:
54+
55+
```cmd
56+
certutil /error 0x800706ba
57+
```
58+
59+
You should receive the following output:
60+
61+
```output
62+
0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE) -- 2147944122 (-2147023174)
63+
Error message text: The RPC server is unavailable.
64+
CertUtil: -error command completed successfully.
65+
```
66+
67+
## Cause
68+
69+
The cause of this error is typically an underlying Windows issue, such as:
70+
71+
- The Remote Registry service isn't running.
72+
- DNS settings are incorrect.
73+
- Time and Time zone settings are incorrect.
74+
- The TCP/IP NetBIOS Helper service isn't running.
75+
76+
For more information, see [The system can't log you on with the following error: The RPC server is unavailable](~/windows-server/user-profiles-and-logon/not-log-on-error-rpc-server-unavailable.md#cause).
77+
78+
## Solution
79+
80+
### Eliminate the SQL Server setup process as the issue
81+
82+
To determine whether the SQL Server setup process itself is the cause of failure, use the following steps to build and run a test application that reproduces the `RPC Server is unavailable` error.
83+
84+
#### Step 1: Build the ADLookup application
85+
86+
1. Open a Command Prompt window or a PowerShell terminal.
87+
88+
1. Make sure that the [.NET SDK](https://dotnet.microsoft.com/en-us/download) is installed on your computer:
89+
90+
```bash
91+
dotnet --version
92+
```
93+
94+
If the .NET SDK is installed correctly, this command should output the SDK's version number.
95+
96+
1. Create a project folder:
97+
98+
```bash
99+
md ADLookup
100+
cd ADLookup
101+
```
102+
103+
1. Initialize a console project:
104+
105+
```bash
106+
dotnet new console -n ADLookup
107+
cd ADLookup
108+
```
109+
110+
> [!NOTE]
111+
> This step creates a basic console app structure.
112+
113+
1. Use a text editor to replace the contents of `Program.cs` with the following code:
114+
115+
```csharp
116+
using System;
117+
using System.Collections.Generic;
118+
using System.Linq;
119+
using System.Text;
120+
using System.DirectoryServices;
121+
using System.Runtime.InteropServices;
122+
123+
namespace ADLookup
124+
{
125+
public class Program
126+
{
127+
static void Main(string[] args)
128+
{
129+
if (args.Count() < 2)
130+
{
131+
Console.WriteLine("Specify at least 2 parameters. Closing App");
132+
Console.ReadLine();
133+
}
134+
else
135+
{
136+
string param1 = args[0];
137+
string param2 = args[1];
138+
string myADPath = "WinNT://" + param1 + ", " + param2;
139+
140+
// Examples
141+
// user "john" in the "contoso" domain
142+
// string myADPath = "WinNT://contoso/john, user";
143+
// Domain "contoso""
144+
// string myADPath = "WinNT://contoso, domain";
145+
bool adRes = false;
146+
147+
Console.WriteLine("Checking {0} for type {1}", param1, param2);
148+
149+
try
150+
{
151+
Console.WriteLine("The string ADPath is : {0}", myADPath);
152+
adRes = DirectoryEntry.Exists(myADPath);
153+
System.Console.WriteLine(Marshal.GetLastWin32Error());
154+
}
155+
catch (COMException e)
156+
{
157+
Console.WriteLine("Error Encountered: {0}", e.ErrorCode);
158+
}
159+
160+
if (!adRes)
161+
{
162+
Console.WriteLine("The path is invalid");
163+
Console.WriteLine("Press any key to quit");
164+
}
165+
else
166+
{
167+
Console.WriteLine("The path is valid");
168+
Console.WriteLine("Press any key to quit");
169+
}
170+
Console.ReadLine();
171+
}
172+
}
173+
}
174+
}
175+
```
176+
177+
1. Add required references to the project:
178+
179+
```bash
180+
dotnet add package System.DirectoryServices
181+
```
182+
183+
1. Build the project:
184+
185+
```bash
186+
dotnet build --configuration Release
187+
```
188+
189+
> [!NOTE]
190+
> This step compiles the code and generates an `ADLookup.exe` in the `bin\Release\net<VersionNumber>\` folder.
191+
192+
#### Step 2: Run the ADLookup application
193+
194+
1. Navigate to the directory in which the executable is built:
195+
196+
```bash
197+
cd bin\Release\net<VersionNumber>\
198+
```
199+
200+
1. Run `ADLookup.exe` by using the **domain** parameter to look up the domain name first:
201+
202+
```bash
203+
adlookup CONTOSO domain
204+
```
205+
206+
The output should resemble the following example:
207+
208+
```output
209+
Checking CONTOSO for type domain
210+
The string ADPath is : WinNT://CONTOSO, domain
211+
1150
212+
The path is valid
213+
Press any key to quit
214+
```
215+
216+
1. Look up the account name using the **user** parameter:
217+
218+
```bash
219+
adlookup CONTOSO/SQLSvcAcct user
220+
```
221+
222+
You must use a forward slash, not a backslash, to separate the domain and account name.
223+
224+
For a service account that's experiencing RPC server issues, the output should resemble the following example:
225+
226+
```output
227+
Checking CONTOSO/SQLSvcAcct for type user
228+
The string ADPath is : WinNT:// CONTOSO\SQLSvcAcct, user
229+
Error Encountered: -2147023174
230+
The path is invalid
231+
Press any key to quit
232+
```
233+
234+
### Resolve underlying Windows issues
235+
236+
To troubleshoot underlying Windows issues that cause SQL Server Setup to fail, see [The system can't log you on with the following error: The RPC server is unavailable](~/windows-server/user-profiles-and-logon/not-log-on-error-rpc-server-unavailable.md#resolution).
237+
238+
## Related content
239+
240+
- [SQL Server installation errors](/troubleshoot/sql/database-engine/install/windows/error-install-sql-server)
241+
- [Remove a partial installation of SQL Server](/troubleshoot/sql/database-engine/install/windows/remove-partial-installation)

support/sql/database-engine/install/windows/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ items:
1111
href: description-update-cache-folder.md
1212
- name: Errors when installing SQL Server
1313
href: error-install-sql-server.md
14+
- name: RPC server is unavailable error during setup
15+
href: error-rpc-server-unavailable-provisioning-account.md
1416
- name: Issues when upgrading to SQL Server 2022
1517
href: issues-upgrading-sql-server-2022.md
1618
- name: Driver installation check

0 commit comments

Comments
 (0)