Re: [Dev] [Architecture] VFS and SFTP

2016-01-13 Thread Vijitha Ekanayake
Hi John,

Can you try this by providing IP address of the SFTP server instead of SFTP
server’s hostname in parameters.

In your proxy we specified the VFS endpoint by giving the host name
(instead of the IP address). Then, you might come across the exception (Could
not connect to SFTP ) as you mentioned in your mail.

Apache Commons-VFS [2] uses JSCH [5] for its underlying SSH layer. JSCH
uses the location $HOME/.ssh for the known_hosts file by default.
Eg. location is $HOMEPATH/.ssh

Therefore, since the host that you are trying to connect with is not in the
known_hosts file, Synapse has no idea whether the SFTP hosts can be
trusted. Therefore, we need to add the host to the known_hosts file.

Solution has been suggested in article[1] to overcome this issue.

[1]. http://wso2.com/library/tutorials/2011/01/sftp-file-transfer-wso2-esb/

Thanks,
Vijitha.

On Thu, Jan 14, 2016 at 11:17 AM, John Q  wrote:

> Hello,
> I have a proxy service, I have configured transport VFS and it works fine
> reading files from local filesystem, but know I'm trying with a sftp and
> nothing happens, I mean the service doesn't pick up the file from the esb
> it remains just as the file would have never been copied into the sftp. my
> esb version is 4.9.0, after a long time, this msg is shown in the console,
> Could not connect to SFTP server at ...
>
> this is my configuration...
>
> 
>
> 
> transports="vfs" xmlns="http://ws.apache.org/ns/synapse;>
>
> 
>
> 
>
> 
> type="STRING" value="true" />
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 5
>
> vfs:sftp://user:password@
> sftp.mycomp.com/incoming
>
> 
>
> application/xml
>
> MOVE
>
> vfs:sftp://user:password@
> sftp.mycomp.com/incoming
>
> 
>
> MOVE
>
> MOVE
>
> .*.xml
>
> vfs:sftp://user:password@
> sftp.mycomp.com/incoming
>
> 
>
> 
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Vijitha Ekanayake
Software Engineer*, *WSO2, Inc.; http://wso2.com/
Mobile : +94 777 24 73 39 | +94 718 74 44 08
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] VFS and SFTP

2016-01-13 Thread Malaka Silva
Hi John,

You can also try the File Inbound [1] which is a new feature released with
ESB 4.9.0.

[1] https://docs.wso2.com/display/ESB490/File+Inbound+Protocol

On Thu, Jan 14, 2016 at 6:13 AM, Vijitha Ekanayake 
wrote:

> Hi John,
>
> Can you try this by providing IP address of the SFTP server instead of
> SFTP server’s hostname in parameters.
>
> In your proxy we specified the VFS endpoint by giving the host name
> (instead of the IP address). Then, you might come across the exception (Could
> not connect to SFTP ) as you mentioned in your mail.
>
> Apache Commons-VFS [2] uses JSCH [5] for its underlying SSH layer. JSCH
> uses the location $HOME/.ssh for the known_hosts file by default.
> Eg. location is $HOMEPATH/.ssh
>
> Therefore, since the host that you are trying to connect with is not in
> the known_hosts file, Synapse has no idea whether the SFTP hosts can be
> trusted. Therefore, we need to add the host to the known_hosts file.
>
> Solution has been suggested in article[1] to overcome this issue.
>
> [1].
> http://wso2.com/library/tutorials/2011/01/sftp-file-transfer-wso2-esb/
>
> Thanks,
> Vijitha.
>
> On Thu, Jan 14, 2016 at 11:17 AM, John Q  wrote:
>
>> Hello,
>> I have a proxy service, I have configured transport VFS and it works fine
>> reading files from local filesystem, but know I'm trying with a sftp and
>> nothing happens, I mean the service doesn't pick up the file from the esb
>> it remains just as the file would have never been copied into the sftp. my
>> esb version is 4.9.0, after a long time, this msg is shown in the console,
>> Could not connect to SFTP server at ...
>>
>> this is my configuration...
>>
>> 
>>
>> >
>> transports="vfs" xmlns="http://ws.apache.org/ns/synapse;>
>>
>> 
>>
>> 
>>
>> >
>> type="STRING" value="true" />
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 5
>>
>> vfs:sftp://user:password@
>> sftp.mycomp.com/incoming
>>
>> 
>>
>> application/xml
>>
>> MOVE
>>
>> vfs:sftp://user:password
>> @sftp.mycomp.com/incoming
>>
>> 
>>
>> MOVE
>>
>> MOVE
>>
>> .*.xml
>>
>> vfs:sftp://user:password
>> @sftp.mycomp.com/incoming
>>
>> 
>>
>> 
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Vijitha Ekanayake
> Software Engineer*, *WSO2, Inc.; http://wso2.com/
> Mobile : +94 777 24 73 39 | +94 718 74 44 08
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/

https://store.wso2.com/store/

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev