cancel
Showing results for 
Search instead for 
Did you mean: 

External FTP Server via WAN Proxy Server

Former Member
0 Kudos

I need to access an external FTP server via our WAN proxy server.

I do not believe that xMII is properly attempting to access the Proxy Server, as I require. It must go via this proxy, or it cannot go at all, since the target FTP site it outside our WAN.

Note 1: I can connect successfully to the remote FTP server using Internet Explorer (ie: not within xMII).

Note 2: I can connect successfully to the remote FTP server using the program CuteFTP (ie; not within IE). However, I cannot connect from a simple transaction using, say, the FTP GetFileList action block.

I cannot do it successfully from an xMII transaction. The only error I see, after a small timeout, is "FTP error: Could not connect server".

I have set the Proxy Server connection criteria (ProxyHost, ProxyPort, ProxyUsername, ProxyUserPassword) in the xMII Admin menu, and have unchecked the ProxyBypassLocal check box.

However, polling via a netstat command whilst the transaction is executing, it appears that xMII is attempting to access the ftp server directly (as I specified within the transaction), and NOT via the proxy server I have specified.

Are there any tricks here?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Some further info;

The proxy server handles both http and ftp, but not socks unfortunately. There is not a socks server available.

Kevin.

Former Member
0 Kudos

I think the FTP library xMII uses (Apache commons-net) uses Socks internally.

A few options:

1. If you simply need to download a file, you can try the URL-based approach with HTMLLoader (for a text file) or ImageLoader (for a binary file) - the URL format you can find by Googling, but an example is:

ftp://user01:pass1234@ftp.foo.com/README.txt;type=i

Note: I've never tried it, and you'll need to set the following properties to point to your proxy server (xMII will automatically do it for the http ones):

ftp.proxyHost (default: <none>)

ftp.proxyPort (default: 80 if ftp.proxyHost specified)

ftp.nonProxyHosts (default: <none>)

2. You could try using something like the Hummingbird SOCKS server on the xMII server to "socks-ify" your existing TCP/IP stack.

- Rick

URLConnection urlc = url.openConnection();

InputStream is = urlc.getInputStream(); // To download

OutputStream os = urlc.getOutputStream(); // To upload

Former Member
0 Kudos

Rick:

Tried those. Actually xMII doesn't start when I have them in there!

I notice there are similar properties available for http / https / ftp. So, in xMII System Administration, what is the scope for the Proxy settings? Do they apply for http and https and ftp?

When I use CuteFTP, then run netstat, I see an entry there

<proxy address>:ftp ESTABLISHED

So this indicates that CuteFTP has been directed via the proxy server.

However, when I use xMII (run the transaction), then run netstat, I see an entry there

<ftp.myExternalFTPSite.com.au>:ftp SYN_SENT

So this indicates that xMII is trying to connect directly to the ftp site that I specified within the transaction, and NOT via the proxy server at all.

Note that in CuteFTP, I set global properties, telling it what proxy server / port etc, as I did also in xMII System Administration.

Former Member
0 Kudos

Hi Rick,

I don't believe so, but I can find out. The thing is that FTP comms are fine using something like CuteFTP, and using the exact proxy settings that I have in xMII. The issue appears to be that xMII is not redirecting any traffic to the proxy server at all, and netstat seems to confirm this.

Regards

Former Member
0 Kudos

Kevin:

After some googling, possibly you're going to need to get the following system properties set:

socksProxyPort 1080

socksProxyHost yourproxhostaddressproxy.host.address

I don't know what values you need - you'll need to check with your IT folks.

You can put these in:

Lighthammer\WEB-INF\classes\system.properties

- Rick

Former Member
0 Kudos

Hi, Kevin.

Do you have to use different proxy settings (e.g. server, port) for FTP than HTTP?

- Rick