You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Wiktor Kubicki (Jira)" <ji...@apache.org> on 2020/12/09 17:04:00 UTC

[jira] [Comment Edited] (NIFI-7835) SFTP processors (maybe other too) proxy doesn't use credentials

    [ https://issues.apache.org/jira/browse/NIFI-7835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246670#comment-17246670 ] 

Wiktor Kubicki edited comment on NIFI-7835 at 12/9/20, 5:03 PM:
----------------------------------------------------------------

Hi,
this nor second jira is not resolve yet.. I use sshfs and getfile as workaround and this works suprising well. But the fuse-ssh is not well documented, i used this one-time command :

{code:java}
sshfs -o ProxyCommand="nc --proxy-type socks5 --proxy-auth proxy_user:proxy_pass --proxy proxy_url:8080 %h %p",reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ssh_user@sh_url:/ext_directory /local_mount_directory/ -C -p 22
{code}

I have extra cron script too, to monitor and reconnect, but never was fired:
{code:java}
mountpoint -q /local_mount_directory/ || { echo 'ssh_user@ssh_url:/ext_directory not mounted, mounting...'; sshfs -o ProxyCommand="nc --proxy-type socks5 --proxy-auth proxy_user:proxy_pass --proxy proxy_url:8080 %h %p",reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ssh_user@ssh_url:/ext_directory /local_mount_directory/ -C -p 22; }
{code}

I had absolutely no issue with using that solution (for about ten flows), but of course it is extra, hard-management step.

*EDIT*: this solution *does not* need root for mounting sshfs!




was (Author: kirhold):
Hi,
this nor second jira is not resolve yet.. I use sshfs and getfile as workaround and this works suprising well. But the fuse-ssh is not well documented, i used this one-time command :

{code:java}
sshfs -o ProxyCommand="nc --proxy-type socks5 --proxy-auth proxy_user:proxy_pass --proxy proxy_url:8080 %h %p",reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ssh_user@sh_url:/ext_directory /local_mount_directory/ -C -p 22
{code}

I have extra cron script too, to monitor and reconnect, but never was fired:
{code:java}
mountpoint -q /local_mount_directory/ || { echo 'ssh_user@ssh_url:/ext_directory not mounted, mounting...'; sshfs -o ProxyCommand="nc --proxy-type socks5 --proxy-auth proxy_user:proxy_pass --proxy proxy_url:8080 %h %p",reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 ssh_user@ssh_url:/ext_directory /local_mount_directory/ -C -p 22; }
{code}

I had absolutely no issue with using that solution (for about ten flows), but of course it is extra, hard-management step.



> SFTP processors (maybe other too) proxy doesn't use credentials
> ---------------------------------------------------------------
>
>                 Key: NIFI-7835
>                 URL: https://issues.apache.org/jira/browse/NIFI-7835
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.12.0, 1.11.4
>         Environment: CentOS 7, Java 8 and 11, standalone Nifi
>            Reporter: Wiktor Kubicki
>            Priority: Major
>
> Hello,
> we tried use socks proxy configuration (with authorization) for listSFTP/fetchSFTP/getSFTP using processor configuration or Proxy Configuration Service. Each time we has got Getting java.net.SocketException: Malformed. 
> We did tcp dump and saw, that the user/password is not provided - user is same as system user rather than this one from configuration.
> I've easly recreated issue on clean CentOS with java 8 and 11. Same problem was on NiFi 1.11.4 and 1.12.0.
> I think the problem is due of using sshj, but can be wrong. Very similar issue is https://issues.apache.org/jira/browse/NIFI-7749 - probably with the same cause.
>  
> My workaround for sftp is using fuse-sftp and mount remote server as local share.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)