[
https://issues.apache.org/jira/browse/VFS-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482603#comment-13482603
]
Gary Gregory commented on VFS-440:
----------------------------------
Hi Benjamin,
Thank you, the new patch is easier to look at.
When I test the build with "mvn test", it hangs, and I see the following on the
console:
{noformat}
Running org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase
Sftp server started on port 63772
true
created threads still running:
#1: main NioProcessor-17 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#2: main pool-11-thread-1 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#3: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#4: main Thread-24 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#5: main NioProcessor-13 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#6: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#7: main Thread-26 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#8: main NioProcessor-14 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#9: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#10: main Thread-28 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#11: main NioProcessor-15 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#12: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#13: main Thread-30 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#14: main Thread-33 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#15: main Thread-49 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#16: main Thread-50 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#17: main Thread-51 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
created threads still running:
#1: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#2: main NioProcessor-17 not_a_daemon class
java.util.concurrent.ThreadPoolExecutor$Worker
#3: main from nc daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$7
#4: main to nc daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$7
#5: main Connect thread localhost session daemon class
com.jcraft.jsch.Session
#6: main Thread-55 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
#7: main Thread-57 not_a_daemon class
org.apache.commons.vfs2.provider.sftp.test.SftpProviderTestCase$MySftpSubsystem
{noformat}
But... I am on Windows. My set up is:
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\Java\apache-maven-3.0.4\bin\..
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_35\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Is the new test platform independent?
If not, it should be skipped for Windows and if run, it should return an error.
Is the issue that the embedded SFTP server is trying to run the nc command (and
there is nc.exe on Windows)?
> [SFTP] Stream (e.g. netcat) proxy for Sftp file system (aka ProxyCommand)
> -------------------------------------------------------------------------
>
> Key: VFS-440
> URL: https://issues.apache.org/jira/browse/VFS-440
> Project: Commons VFS
> Issue Type: Improvement
> Reporter: Benjamin Piwowarski
> Priority: Minor
> Labels: proxy, sftp
> Attachments: sftp-stream-proxy.diff, sftp-stream-proxy-v2.diff
>
>
> What I propose is to add the possibility to connect to a remote SSH server
> through an SSH connection stream (instead of an HTTP or SOCKS proxy). See for
> instance
> http://backdrift.org/transparent-proxy-with-ssh
> for a use case.
> This simulates a ProxyCommand where the command is run on a SSH host.
> The patch also contains a test for the new functionality.
> Example of use (with the netcat command nc -q 0 HOSTNAME PORT)
> {code:java}
> builder.setProxyType(opts, SftpFileSystemConfigBuilder.PROXY_STREAM);
> builder.setProxyCommand(opts, SftpStreamProxy.NETCAT_COMMAND);
> builder.setProxyHost(opts, "gate.way.host");
> builder.setProxyPort(opts, 22);
> builder.setProxyOptions(opts, proxyOptions);
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira