Problem with SFTP endpoint in FSW 6.0

Solution Verified - Updated -

Issue

We are using Switchyard from where we are trying to connect to a sftp server using camel's sftp endpoint. The sftp host name used is: sftp.myftpserver.com

The writing of the file fails with the following trace:

03-09-2015 08:18:46,047 WARN  (org.apache.camel.processor.DefaultErrorHandler) [Camel (camel-157) thread #296 - file:///integrations/in/pending] Failed delivery for (MessageId: ...). On delivery attempt: 1 caught: org.switchyard.HandlerException: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[sftp://ftpuser:******@sftp.myftpserver.com:22/Test/?autoCreate=false&binary=true&bufferSize=131072&connectTimeout=10000&consumer.bridgeErrorHandler=true&disconnect=true&fileExist=Fail&fileName=%24%7Bheaders.outFileName%7D&passiveMode=false&recursive=false&stepwise=false&tempFileName=%24%7Bfile%3Aname%7D.tmp&throwExceptionOnConnectFailed=true]. Reason: java.lang.IllegalArgumentException: host must be specified and not empty

Is the sftp host name sftp.myftpserver.com not a valid name?

Further research revealed that the root cause of the issue is the usage of special characters in the password of the ftp user. Let's say the password/username contains the "@" symbol, this causes the connection string created by switchyard to omit the hostname and thus we are getting the error as we shared.

How we can escape the "@" symbols in username/password to make this work.

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content