Cannot connect to PI AF server
- Last UpdatedNov 21, 2025
- 2 minute read
- PI System
- PI Server 2024 R2
- PI Server
Check the following:
-
Verify the domain and account name have been entered in the correct format. For example: .
-
Ensure that the system domain account (typically NT AUTHORITY \NetworkService in PI AF 2014 R2 and earlier versions, and NT SERVICE\AFService in PI AF server 2015 and later versions) under which the PI AF Application Service runs, has been added to the appropriate groups to provide the PI AF Application Service permissions to connect to the SQL Server. Refer to:
-
Standard installation: Create AFServers and AFQueryEngines groups
-
Failover cluster installation: Configure domain group for the PI AF Application Service
-
Mirrored SQL Server installation: Configure domain group for the PI AF Application Service
-
-
Are the firewall settings correct? See Considerations for firewalls and ports for PI AF.
-
In the Event Viewer, review the PI AF log for more information on the error.
-
Check the connection string in %PIHOME64%\AF\AFService.exe.config or %PIHOME%\AF\AFService.exe.config. The connection string is located in the section and looks similar to the following:
Make sure that the server and database specified in the configuration file are correct. If the SQL Server is not local, the hostname must be specified as follows: .
-
In the section of the same file, check the PI AF SDK endpoint and make sure PI AF Application Service is listening on port 5457. The PI AF SDK endpoint looks similar to the following:
-
Check with your network administrator to see if there are DNS errors on your network.
-
If the PI AF Application Service is running under a domain account, check to see if a Service Principal Name (SPN) has not been generated for the PI AF Application Service's domain account.
If the service is running under the NetworkService account, check to see if a Service Principal Name has not been generated for the machine on which the PI AF Server service is running, although the latter is an unlikely scenario because the NetworkService account, by default, has the required permissions to generate an SPN for the machine. For more information, refer to Manage SPNs for the PI AF application service.