Troubleshooting
Problem
This technote explains how to resolve an error: "ACTUAL=425 Can't build data connection: Connection refused" during an FTP recording session, that can occur when using IBM® Rational® TestManager (TM).
Symptom
During an FTP recording session, the client has to prepare a port to receive data from the server. The assignment of the port is dynamic. The following error message appears:
ACTUAL=425 Can't build data connection: Connection refused.\r\n
Cause
The command is incorrect. It does not reflect the dynamic assigning of the data exchange port, and is likely to be refused by the server.
Resolving The Problem
The solution to this problem is to replace the command:
sock_send
"PORT h1,h2,h3,h4,p1,p2\r\n"
"PORT 192,168,145,141,6,78\r\n";
with
port = sock_create();
port_msb = itoa((port&65280)>>8);
port_lsb = itoa(port&255);
sock_send
"PORT 192,168,145,141,"+port_msb+","+port_lsb+"\r\n";
Explanation
The PORT command tells the ftp server the ip address and the port number on which to respond. The first 4 number are the ip address. the last 2 are the port numbers, which is rebuilt on the server by 'glueing' them together:
port_msb*256 + port_lsb
Historical Number
13683
Was this topic helpful?
Document Information
More support for:
Rational TestManager
Software version:
2003.06.00, 2003.06.10, 2003.06.12, 2003.06.13, 2003.06.14, 2003.06.15, 2003.06.16, 7.0, 7.0.0.1, 7.0.0.2, 7.0.0.3, 7.0.1, 7.0.1.1, 7.0.0.4, 7.0.1.3, 7.0.2
Operating system(s):
AIX, HP-UX, Solaris, Windows, Linux
Document number:
325947
Modified date:
16 June 2018
UID
swg21127403