2

I am facing SFTP Kerberos username and prompt for first time run of service. The subsequent run of service is running fine. Kerberos is not prompt when the SFTP location is within a network. If it is a different network it asks for Kerberos username and password.

Starting Bean: org.mule.runtime.module.extension.internal.runtime.config.ConfigurationProviderToolingAdapter-Database_Config INFO 2020-07-29 14:21:42,151 [WrapperListener_start_runner] [processor: ; event: ] org.mule.runtime.core.privileged.lifecycle.AbstractLifecycleManager: Starting Bean: org.mule.runtime.module.extension.internal.runtime.config.ConfigurationProviderToolingAdapter-SFTP_Config Kerberos username [nmarathe]:

Kerberos password for nmarathe:

INFO 2020-07-29 14:21:55,531 [WrapperListener_start_runner] [processor: ; event: ] org.mule.runtime.core.privileged.lifecycle.AbstractLifecycleManager: Starting Bean: org.mule.runtime.module.extension.internal.runtime.config.ConfigurationProviderToolingAdapter-Java_Config

Key Tips: preferredAuthenticationMethods="publickey,password,keyboard-interactive" this is failing to deploy app.

<sftp:config name="SFTP_Config" doc:name="SFTP Config"
    doc:id="b5762201-a868-4a1a-ab96-9b7669451708">
    <sftp:connection
        workingDir="${sftp.path}"
        host="${sftp.host}" username="${sftp.user}"
        password="${sftp.password}" port="${sftp.port}" connectionTimeout="120" preferredAuthenticationMethods="publickey,password,keyboard-interactive">
        <reconnection>
            <reconnect frequency="30000" count="20" />
        </reconnection>
    </sftp:connection>
    <expiration-policy maxIdleTime="2" timeUnit="MINUTES" />
</sftp:config>

Error: Element 'publickey,password,keyboard-interactive' is not defined in the Mule Registry

naren
  • 105
  • 2
  • 13
  • Please copy the complete error message, with all details, into the text of the question. – aled Jul 30 '20 at 01:51
  • Thanks man, you saved my day. I worked with 4 other sftp projects and this issue did not show up previously. Perhaps the difference is that this site where I had this issue is using protocol: sftp-6 (according to WinSCP 5.17.5). The others were using protocol: sftp-3. If you deployed (like me) this app (with the problem) to your on-prem runtime, you face a nightmare to undeploy the app and replace it with a working solution. I had a Win server to work with and I used: killing wrapper and java from task manager, deleting the app from apps folder/deleting the .mule/app folder, using maven to und – ittamoipat Aug 10 '20 at 16:27

1 Answers1

2

After a lot of dig into the issue. I found a solution from documentation only. Refer: https://docs.mulesoft.com/sftp-connector/1.3/sftp-documentation#parameters-2

I just added below code in the SFTP connection. preferredAuthenticationMethods="#[['PUBLIC_KEY','KEYBOARD_INTERACTIVE','PASSWORD']]"

PFB the detail code which resolved my issue.

<sftp:config name="SFTP_Config" doc:name="SFTP Config">
    <sftp:connection
        workingDir="${sftp.path}"
        host="${sftp.host}" username="${sftp.user}"
        password="${sftp.wms.password}" port="${sftp.port}" connectionTimeout="120" preferredAuthenticationMethods="#[['PUBLIC_KEY','KEYBOARD_INTERACTIVE','PASSWORD']]">
        <reconnection>
            <reconnect frequency="30000" count="20" />
        </reconnection>
    </sftp:connection>
    <expiration-policy maxIdleTime="2" timeUnit="MINUTES" />
</sftp:config>
naren
  • 105
  • 2
  • 13