Ok, got the loggin working. setting the level to debug produced a rediculous amount of text, so we'll try with the INFO level log first:
INFO [puretls] 8 nov 2005 16:26:42.281 : PureTLS debug level=0
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:26:42.312 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:26:42.312 : Production licence
INFO [com.enterprisedt.net.ftp.ssh.SSHFTPClient] 8 nov 2005 16:26:42.328 : SSHFTPClient settings validated.
INFO [cryptix] 8 nov 2005 16:26:42.359 : GLOBAL_TRACE=false
INFO [cryptix] 8 nov 2005 16:26:42.359 : GLOBAL_DEBUG=false
INFO [cryptix] 8 nov 2005 16:26:42.359 : GLOBAL_DEBUG_SLOW=false
[05/11/08 16:26:53] ID=SuretiesFromGwbToCrs_FTP (info) Connection to endpoint 'E_SEKFtpTest' (re)established
[2005-11-08 16:27:01] ExchangeRatesFromMxgToCrs_FTP: class com.enterprisedt.net.ftp.ssh.SSHFTPException: The SFTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
[2005-11-08 16:27:01] ExchangeRatesFromMxgToCrs_FTP: IOException: The connection did not complete, errorcount: 1 -> retry
[05/11/08 16:27:03] ID=TreasuryFromGwbToCrs_FTP (info) Connection to endpoint 'E_SEKFtpTest' (re)established
[05/11/08 16:27:11] ID=RiskoFromGwbToCrs_FTP (info) Connection to endpoint 'E_SEKFtpTest' (re)established
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:14.984 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:14.984 : Production licence
INFO [com.enterprisedt.net.ftp.ssh.SSHFTPClient] 8 nov 2005 16:27:14.984 : SSHFTPClient settings validated.
ERROR [com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon] 8 nov 2005 16:27:15.31 : The Transport Protocol thread failed : null
java.lang.ClassCastException
at com.enterprisedt.net.j2ssh.transport.kex.DhGroup1Sha1.performClientExchange(DhGroup1Sha1.java:158)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.performKeyExchange(TransportProtocolClient.java:392)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(TransportProtocolCommon.java:681)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.onMsgKexInit(TransportProtocolCommon.java:1229)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(TransportProtocolCommon.java:986)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(TransportProtocolCommon.java:373)
at java.lang.Thread.run(Unknown Source)
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:26.671 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:26.671 : Production licence
INFO [com.enterprisedt.net.ftp.ssh.SSHFTPClient] 8 nov 2005 16:27:26.671 : SSHFTPClient settings validated.
[2005-11-08 16:27:45] ExchangeRatesFromMxgToCrs_FTP: class com.enterprisedt.net.ftp.ssh.SSHFTPException: The SFTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
[2005-11-08 16:27:45] ExchangeRatesFromMxgToCrs_FTP: IOException: The connection did not complete, errorcount: 2 -> retry
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:57.296 : Licence expiry date: 31 dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 8 nov 2005 16:27:57.296 : Production licence
INFO [com.enterprisedt.net.ftp.ssh.SSHFTPClient] 8 nov 2005 16:27:57.296 : SSHFTPClient settings validated.
ERROR [com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon] 8 nov 2005 16:27:57.328 : The Transport Protocol thread failed : null
java.lang.ClassCastException
at com.enterprisedt.net.j2ssh.transport.kex.DhGroup1Sha1.performClientExchange(DhGroup1Sha1.java:158)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.performKeyExchange(TransportProtocolClient.java:392)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(TransportProtocolCommon.java:681)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.onMsgKexInit(TransportProtocolCommon.java:1229)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(TransportProtocolCommon.java:986)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(TransportProtocolCommon.java:373)
at java.lang.Thread.run(Unknown Source)
If you find it hard to read, I don't blame you... The above is a snippet of the log produced. The server is trying to initialize 6 connections to the ssh server during startup. 5 of the 6 connections succeded, while the 6:th failed, throwing a ClassCastException as shown in the snippet above.
My code then tries to reconnect again, but ClassCastException is thrown once again...
This is how I make the initial connection:
client = new SSHFTPClient();
client.getValidator().setHostValidationEnabled(false);
client.setRemoteHost(m_ftpHost);
client.setRemotePort(m_ftpPort);
client.setTimeout(m_timeout);
client.setAuthentication(m_ftpUser, m_ftpPassword);
// connect to the server
client.connect();
To reconnect I do the following and then the above:
try {
client.quit();
client = null;
} catch (Exception qe) {
if (m_log_actions) SEKLogger.log(m_esbComponentName+": "+qe.getClass()+": "+qe.getMessage());
client = null;
}
Any suggestions as to how I move on?? I have been using this technique for remote file polling for 1