Cannot connect to on-premise database via hcm
We have a Hybrid Connection Manager installed on an on-premise Windows server. The connection is well established in the App Service and the HCM also tells us that it is connected.
When using the HCM built-in test tool, the connection also works:
[INF] [TEST: hostname:1433] Connection to hostname:1433 successful
However, when trying to use the connection from the App Registration, we get:
*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=7; handshake=29992
*
We have also succesfully validated the connection to the SQL server from the machine that is running the HCM.
What can be wrong? Thank you in advance.