Loading

Disable connectivity test performed at deployment to suppress the initial test connectivity error

Publiseringsdato: Aug 5, 2025
Løsning

SYMPTOM

During the app deployment, the initial test connection for different connectors might be failing due to some connectivity issues.
You see an exception that is similar to the following one on application logs. This error is just an example of a database connector. 
Based on the different connector, different stack trace can be generated, however, the idea of disabling test connection for deployment
is applicable for connectors such as SFTP/FTP/Database/Bitronix connectors.
 
09:21:19.902     04/14/2021     Worker-0     [MuleRuntime].uber.02: [demo-snowflake-db].uber@org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance.testConnectivity:179 @44f8e1ac     INFO
Connectivity test failed for config 'Database_Config'. Application deployment will continue. Error was: Could not obtain connection from data source
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
	at org.mule.runtime.core.internal.connection.ErrorTypeHandlerConnectionProviderWrapper.lambda$connect$0(ErrorTypeHandlerConnectionProviderWrapper.java:70)
	at java.util.Optional.map(Optional.java:215)
	at org.mule.runtime.core.internal.connection.ErrorTypeHandlerConnectionProviderWrapper.connect(ErrorTypeHandlerConnectionProviderWrapper.java:68)
	at org.mule.runtime.core.internal.connection.ConnectionUtils.connect(ConnectionUtils.java:49)
	at org.mule.runtime.core.internal.connection.AbstractConnectionProviderWrapper.connect(AbstractConnectionProviderWrapper.java:64)
	at org.mule.runtime.core.internal.connection.DefaultConnectionProviderWrapper.connect(DefaultConnectionProviderWrapper.java:52)
	at org.mule.runtime.core.internal.connection.NullConnectionManagementStrategy.getConnectionHandler(NullConnectionManagementStrategy.java:40)
	at org.mule.runtime.core.internal.connection.DefaultConnectionManager.getConnection(DefaultConnectionManager.java:241)
	at org.mule.runtime.core.internal.connection.DefaultConnectionManager.lambda$testConnectivity$1(DefaultConnectionManager.java:160)
	at org.mule.runtime.core.internal.connection.DefaultConnectionManager.doTestConnectivity(DefaultConnectionManager.java:176)
	at org.mule.runtime.core.internal.connection.DefaultConnectionManager.testConnectivity(DefaultConnectionManager.java:152)
	at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter$EagerConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:176)
	at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:98)
	at org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance$1.doWork(LifecycleAwareConfigurationInstance.java:194)
	at org.mule.runtime.core.api.retry.policy.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:62)
 

CAUSE

The initial test connection failure for the deployment can be caused by different reasons. One of the scenarios for the test connection to fail is that if whitelisting is configured only
for static IP in CloudHub, it is expected the test connection failure as the static IP is not being assigned when the initial test connection is triggered. 

SOLUTION

The connectivity test at deployment can be disabled by setting the system property 'doTestConnectivity' to False from Properties for Applications on CloudHub.
Be note that after applying the changes, the application will be restarted.

User-added image
Knowledge-artikkelnummer

001121497

 
Laster
Salesforce Help | Article