Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ PI Server Installation and Configuration (PI Server 2024 R2)

Cannot connect to PI AF server

  • Last UpdatedNov 21, 2025
  • 2 minute read

Check the following:

  • Verify the domain and account name have been entered in the correct format. For example: DomainName\AccountName.

  • 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:

  • 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 <appsettings> section and looks similar to the following:

    <add key="connectString" value="Persist Security Info=False;Integrated Security=SSPI;Data Source=.\SQLEXPRESS;Initial Catalog=PIFD;Application Name=AF Application Server;" />

    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: MySQLServer\SQLEXPRESS.

  • In the <services> 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:

    <endpoint address="net.tcp://localhost:5457/AFServer/service" binding="netTcpBinding" bindingConfiguration="AFTcp" contract="OSIsoft.AF.Service.IAFServer">

  • 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.

TitleResults for “How to create a CRG?”Also Available in