Why does Orchestrator installation fail with Connection Timeout Expired?
Issue Description: 2021 switched the implementation of the SQL Client from System.Data.SqlClient, to a platform independent Microsoft.Data.SqlClient for Orchestrator/ Identity/ Action Center etc. which seems to be less compatible when it comes to SQL Certificates that are not trusted by the Orchestrator machine.
System.Exception: Migration failed: Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21001; handshake=1; Microsoft.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21001; handshake=1; ---> System.ComponentModel.Win32Exception (258): The wait operation timed out
Resolution: Our documentation includes Command Line Parameters for clean install of Orchestrator using connection strings to connect to all five available databases.
UiPathOrchestrator.msi ADDLOCAL=TestAutomationFeature,InsightsFeature ` DB_CONNECTION_STRING="Data Source=.\sqlexpress;Initial Catalog=UiPath;User Id=sa;Password=1qazXSW@;MultiSubnetFailover=True" ` IS_DB_CONNECTION_STRING="Data Source=.\sqlexpress;Initial Catalog=UiPathIdentity;User Id=sa;Password=1qazXSW@;MultiSubnetFailover=True" ` DB_INSIGHTS_CONNECTION_STRING="Data Source=.\sqlexpress;Initial Catalog=UiPathInsights;User Id=sa;Password=1qazXSW@;MultiSubnetFailover=True" ` TA_DB_CONNECTION_STRING="Data Source=.\sqlexpress;Initial Catalog=UiPathTestAutomation;User Id=sa;Password=1qazXSW@;MultiSubnetFailover=True" ` UPDSVR_DB_CONNECTION_STRING="Data Source=.\sqlexpress;Initial Catalog=UiPathUpdateServer;User Id=sa;Password=1qazXSW@;MultiSubnetFailover=True" ` APPPOOL_USER_NAME=.\Test APPPOOL_PASSWORD=1qazXSW@ PUBLIC_URL=https://mymachine ` CERTIFICATE_SUBJECT=mycert IS_CERTIFICATE_SUBJECT=mycert HOSTADMIN_PASSWORD=1234qwer DEFAULTTENANTADMIN_PASSWORD=1234qwer ` /q
Update it to suit your environment and add ;TrustServerCertificate=True to the end of each connection string and retry.
Sample script:
UiPathOrchestrator.msi WEBSITE_PORT_DO_VALIDATE=0 APPPOOL_IDENTITY_TYPE=APPPOOLIDENTITY WEBSITE_HOST=<hostname for accessing the orch eg- uipathorch.com> DB_CONNECTION_STRING="Data Source=database.windows.net,1433;Initial Catalog=UiPathorchmncmd;User ID=user;Password=Password;TrustServerCertificate=True" IS_DB_CONNECTION_STRING="Data Source=database.windows.net,1433;Initial Catalog=UiPathorchmncmd;User ID=user;Password=Password;TrustServerCertificate=True" UPDSVR_DB_CONNECTION_STRING="Data Source=database.windows.net,1433;Initial Catalog=UiPathorchmncmd;User ID=user;Password=Password;TrustServerCertificate=True" PUBLIC_URL=<orchestrator URL e.g- https://uipathorch.com> CERTIFICATE_SUBJECT=afd82ff480582c8d48560214b3a61f14799 IS_CERTIFICATE_SUBJECT=afd82ff480582c8d4e8560db13a61f14799 HOSTADMIN_PASSWORD=1234qwer DEFAULTTENANTADMIN_PASSWORD=1234qwer /l*vx log.txt /q