Trying to upgrade to 5.4.3.2 (from 5.3.10.97) and ...
# lucee
c
Trying to upgrade to 5.4.3.2 (from 5.3.10.97) and we've hit an issue with cfftp. It's not the deprecated algorithm issue others have mentioned (not yet anyway). Opening a connection results in a hung request. (Stack trace is in the thread) The only recourse is to restart Lucee. Anyone else run into this?
Copy code
<cfftp
	action="open"
	connection="testconnection"
	server="172.31.25.27"
	username="foo"
	password="bar"
	secure="true"
	passive="false"
	port="22"
	timeout="5"
	stopOnError="Yes">
Untitled
Same problem connecting to two different hosts
Interesting...I do see the connection accepted by the FTP server
Logs from the FTP server indicate a successful connection. This same sequence is what I see for successful connections from other FTP clients
z
what's the ssh server version on the other end?
try setting the env var lucee_debug_jsch=true and restarting which will spit out the jsch debug logging to the catalina.log
c
what's the ssh server version on the other end?
This is what WinSCP shows when I connect through it:
Copy code
File transfer protocol = SFTP-6
Cryptographic protocol = SSH-2
SSH implementation = 8.49 FlowSsh: Bitvise SSH Server (WinSSHD) 8.49
Encryption algorithm = AES-256 SDCTR (AES-NI accelerated)
Compression = No
try setting the env var lucee_debug_jsch=true and restarting
thanks, i'll try the debug logging
I added the env var
lucee_debug_jsch,
set the value to
true
, restarted Lucee, and re-ran the cfftp code. I'm not seeing anything in {lucee}\tomcat\logs\catalina.2023-09-07.log Am I looking in the right place? I do see the env var if i dump server.system.environment
Update: the locking problem seems tied to this particular FTP server, Bitvise. I've tried against two different servers running Bitvise with the same result. We are able to make connections to various other FTP servers. Any ideas on a workaround?
Ah, I just found the solution. I found some custom code we were using in place of cfftp to work around this problem even on Lucee 5.3.10.97 - apparently it's not new... For whatever reason, this approach works fine (no locking issues)
Copy code
var jsch = CreateObject("java", "com.jcraft.jsch.JSch").init();
var jschConfig = CreateObject("java", "java.util.Properties").init();
jschConfig.put("StrictHostKeyChecking", "no");
jschConfig.put("PreferredAuthentications", "password");

variables.jschSession = jsch.getSession("{user}", "{host}", "{port}");
variables.jschSession.setConfig(jschConfig);
variables.jschSession.setPassword("{password}");
variables.jschSession.setTimeout(10 * 1000); 

variables.jschSession.connect();

variables.jschChannel = variables.jschSession.openChannel("sftp");
variables.jschChannel.connect();
z
so there's no issue reported about this in jira yet?
c
I don't see anything. Maybe because it's only a problem trying to do secure connections with a specific FTP server? (Bitvise)