Connection Error

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Rob N.
Posts: 14
Joined: Fri Apr 16, 2010 8:46 pm

Connection Error

Post by Rob N. » Wed Aug 24, 2011 7:31 pm

I am using the FTP Client Library for a SSH-FTP connection. On my Connect event I am getting a return code of 4, which I'm taking to mean is a timeout error. Is this while trying to connect to the FTP server? How do I increase my timeout time?

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connection Error

Post by mb » Wed Aug 24, 2011 9:21 pm

Take a look at the log first. pSSHConnection->LogFile->File

Rob N.
Posts: 14
Joined: Fri Apr 16, 2010 8:46 pm

Re: Connection Error

Post by Rob N. » Wed Aug 24, 2011 9:39 pm

Where would I look for this log file? I try setting the object.Logfile property and I get an error "Object doesn't support this property or method"

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connection Error

Post by mb » Wed Aug 24, 2011 9:52 pm

You can find the ISSHConnection properties in the help file or in one of the many samples that are provided.
Last edited by mb on Wed Aug 24, 2011 9:52 pm, edited 1 time in total.

Rob N.
Posts: 14
Joined: Fri Apr 16, 2010 8:46 pm

Re: Connection Error

Post by Rob N. » Thu Aug 25, 2011 2:02 am

This is a snippet of my code, modeled after the VB6 sample (I've looked at the samples for the other languages and the log file is set the same way):

Set obj = CreateObject("sfFTPLib.SSHConnection")

obj.Host = "elink-sshftp.bankofamerica.com"
obj.Port = 22
'TESTING
'obj.UserName = "XXXXXX"
'PRODUCTION
obj.UserName = "XXXXXX" '
obj.Password = "XXXXXX"
obj.LogFile = "PosPayFTP.log"

When I step through the program, I get the following error at the obj.LogFile line:

#438 Object doesn't support this property or method

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connection Error

Post by mb » Thu Aug 25, 2011 12:30 pm

It's obj.LogFile.File = "blbalb.log"

Rob N.
Posts: 14
Joined: Fri Apr 16, 2010 8:46 pm

Re: Connection Error

Post by Rob N. » Thu Aug 25, 2011 1:27 pm

OK, sorry bout that. This is what my log file says:

[20110825 13:16:25] SmartFTP FTP Library 2.0.137.0
[20110825 13:16:33] Resolving host name "elink-sshftp.bankofamerica.com"
[20110825 13:16:33] Connecting to 171.161.160.130 Port: 22
[20110825 13:16:34] SSH-2.0-Connect:Enterprise_UNIX_2.4.02
[20110825 13:16:34] Starting SSH session. Remote Id: "SSH-2.0-Connect:Enterprise_UNIX_2.4.02"
[20110825 13:16:34] SSH protocol version reply. Client Id: SSH-2.0-SmartFTP
[20110825 13:16:34] Key Exchange Algorithm: diffie-hellman-group-exchange-sha1
[20110825 13:16:34] Host key verification failed.
[20110825 13:16:34] Client closed the connection.
[20110825 13:16:34] 2
[20110825 13:16:34] Socket Exception. Reason=0
From the line that says Host key verification failed, does that mean my machine? The code in place was running successfully before the trial period expired. The license was purchased, and I'm getting the Timeout. The only thing that changed in the code itself was I included the logic from the samples regarding the xml and the license information and setting the log file. The trial version had been downloaded mid-June, the license purchased yesterday. Is there any program or steps that need to be taken so that the machine the license was for transmits the correct verification? The objGlobal.LoadLicenseKeyData method tells me that the key is verified.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connection Error

Post by mb » Thu Aug 25, 2011 4:02 pm

Please try it with the latest version:
https://www.smartftp.com/ftplib/download

Rob N.
Posts: 14
Joined: Fri Apr 16, 2010 8:46 pm

Re: Connection Error

Post by Rob N. » Thu Aug 25, 2011 4:32 pm

OK, will try. Do I need to uninstall the existing version or can I install right over it?

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Connection Error

Post by mb » Thu Aug 25, 2011 4:40 pm

You can install it over the existing version.

Post Reply