Hi @Ricardo Meza
Thank you for reaching out about the ORA-50000 "Connection request timed out" error when connecting your Azure App Service to Oracle Autonomous Database (ADB). This error is often related to network configuration or wallet setup differences between your local environment and the cloud. Please note, if you are using a Free or Shared App Service plan, consider upgrading to at least the Basic tier for full outbound TLS support by using the Scale up option in the portal.
Key Steps for Resolution:
- Activate User Profile Loading In the Azure Portal, navigate to App Service, then select Configuration and go to Application Settings. Add the following setting:
This step allows the Oracle wallet to access user profile directories within App Service. Please save your changes and restart the application.WEBSITE_LOAD_USER_PROFILE = 1
- Deploy Wallet Files and Configure TNS
- Extract the wallet files to a directory within /home/site/wwwroot, such as /home/site/wwwroot/tns for better organization. Using the root directory is also acceptable, as recommended by Oracle.
- Configure an App Setting.
TNS_ADMIN = /home/site/wwwroot/tns
- Network Access Guidelines
- If you're using the ADB public endpoint, make sure to whitelist your App Service egress IP (found in Properties) in the ADB Access Control Lists (ACLs).
- To ensure consistent egress, activate Regional VNet Integration and connect a NAT Gateway with a static public IP.
- For ADB private endpoint usage, set up Azure ExpressRoute and Oracle FastConnect for private connectivity. Tip: Enable ICMP Type 3 Code 4 to support MTU discovery and prevent path issues.
- Connection Timeout Adjustment
- Increase the Connection Timeout value to 180 or higher in your connection string to better manage cloud latency.
- For .NET applications, set Validate Connection to true in Oracle.ManagedDataAccess.Core. For TNS, add (CONNECT_TIMEOUT=90)(TRANSPORT_CONNECT_TIMEOUT=180) as an example.
- Validate Connectivity
- Run a basic query (SELECT 1 FROM DUAL) to test connectivity and verify DNS resolution and port reachability, such as using the Kudu console with tnsping your_tns_alias. For more information, review the logs in Monitoring → Log stream.
Reference :
https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration
https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable
https://learn.microsoft.com/en-us/azure/app-service/overview-inbound-outbound-ips?tabs=azure-portal
https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet
https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal
https://learn.microsoft.com/en-us/azure/load-balancer/troubleshoot-outbound-connection