1

I have a Mule 4 application [App1] created on CloudHub. I tried to deploy the application's jar file onto CloudHub. This application has a Static IP [eg. 100.101.102.103] assigned to it in Runtime Manager. This IP address is whitelisted by customer to allow communication with their SFTP sites and APIs. My Mule application has APIs and some SFTP flows. When I try to deploy my mule application [App1], the deployment fails with below error:

Connectivity test failed for config 'SFTP_Config'. Application deployment will continue. Error was: Could not establish SFTP connection with host: 'sftp.hostname' at port: '22' - Error during login to 'sftpuser@sftp.hostname'.

The SFTP Config is:

    <sftp:config name="SFTP_Config" doc:name="SFTP Config" doc:id="5d626288-5181-41d5-807d-2786ea4292d8" >
    <sftp:connection host="${sftp.host}" port="${sftp.port}" username="${secure::sftp.username}" password="${secure::sftp.password}" connectionTimeoutUnit="MINUTES" connectionTimeout="2" responseTimeoutUnit="MINUTES" responseTimeout="2" workingDir="${sftp.peoplePosition.directory}">
        <reconnection failsDeployment="false" >
            <reconnect frequency="${sftp.retryInterval}" count="${sftp.retryAttempts}" />
        </reconnection>
    </sftp:connection>
</sftp:config>

I also tried using failsDeployment="false" in the SFTP configuration as recommended in this KB article but it didn't work either.

The log shows:

[2023-02-16 05:59:00.754] ERROR   
org.mule.extension.sftp.internal.connection.SftpConnectionProvider 
[qtp1351434790-36]: Auth fail
com.jcraft.jsch.JSchException: Auth fail

[2023-02-16 05:59:00.824] WARN 
org.mule.runtime.core.internal.connection.
PoolingConnectionManagementStrategy 
[qtp1351434790-36]: Failed to create a connection while 
applying the pool initialization policy.
org.mule.runtime.api.connection.ConnectionException: 
Could not establish SFTP connection with host: 'sftphost' at port: '22' 
- Error during login to sftpuser@sftphost
at 
 org.mule.runtime.core.internal.connection.ErrorTypeHandler
ConnectionProviderWrapper.lambda$connect$0(ErrorTypeHandler
ConnectionProviderWrapper.java:70)
at java.util.Optional.map(Optional.java:215)

I have verified the SFTP credentials, they are working fine with Winscp.

Is there any way a CloudHub worker can complete the deployment successfully or validate the SFTP configuration using Static IP instead of it's own IP address?

Abjt G
  • 39
  • 7
  • Can you share a snippet of the code you're using? Which SFTP module version are you using? – Adrian Kamycki Feb 16 '23 at 08:25
  • Sorry, I didn't understand what you mean by the 'snippet of the code', it is the exported jar file that I am trying to deploy. The error is not related to any code segment. The SFTP module version is 1.6.1 – Abjt G Feb 16 '23 at 10:23
  • Please share the configuration of the SFTP connector as text XML and the snippets of the log that show errors or may be relevant. Some SFTP operation in flows may be relevant depenion the error. That would be the equivalent of code for Mule applications. Your question should include enough details so others can try to replicate the results or understand it more deeply. – aled Feb 16 '23 at 11:24
  • Log & SFTP added to the query – Abjt G Feb 16 '23 at 22:51
  • 1) What is the version of the SFTP connector? 2) the log doesn't contain the log message from the beginning of the question. Is the application already deployed? Do you see IPs assignments in the logs? – aled Feb 17 '23 at 13:04

1 Answers1

1

After adding following to Runtime properties of the application, the application was getting deployed successfully:

doTestConnectivity=False
Abjt G
  • 39
  • 7
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 26 '23 at 07:03