Closed mrerichoffman closed 8 years ago
I found a similar issue here - http://stackoverflow.com/questions/28580178/getting-i-wont-open-a-connection-to-when-connecting-to-ftp-server-from-google
Changing the ftp connection to passive did not work for my example.
I did an apt-get install ftp directly on my lucee container and found out a directory listing will only work in passive mode via command line. So this leads me to believe passive = "true" option does not work for CFFTP? Can anyone else reproduce this issue?
This is likely to be a networking issue rather than a lucee issue. Docker by design restricts all a containers network interfaces. Off the top of my head, I'd suggest that you are able to talk from lucee container to your external FTP server but its unable to communicate back. I'm not an FTP expert but you may be able to publish the ports on which your FTP client needs to communicate and solve the problem. What ports have you currently got published in your docker container?
UPDATE: Scrap that. Looks like you do need passive mode: http://mozartanalytics.com/500-illegal-port-command-in-docker-container/
containers using any kind of Debian or Ubuntu distribution as base image, will reserve port 21 and will not let custom clients use it
Lucee docker image is based on Debian.
Definitely need to make sure CFFTP is properly activating passive mode.
The documentation for using passive mode in CFFTP is scant. The behaviour reported suggests that it is still using active mode for directory operations even though the connection is in passive mode. Try adding passive="true" to all the CFFTP operations to force them into passive mode. If that works, then there is either an implementation bug or documentation bug for CFFTP passive mode in Lucee.
Thanks boomfish! I added passive="true" to all CFFTP operations and that fixed it. I was under the assumption that the passive setting was only valid on the connection open operation. I can see others running into the same issue as me who run in docker containers. Hopefully this gets addressed with the Lucee team.
Thanks again for the workaround!
Might want to raise an issue within the lucee issue database: https://luceeserver.atlassian.net/projects/LDEV
EDIT - I did an apt-get install ftp directly on my lucee container and found out a directory listing will only work in passive mode via command line. So this leads me to believe passive = "true" option does not work for CFFTP? Can anyone else reproduce this issue?
I have not been able to complete simple ftp operations within lucee-nginx 4.5 docker container tag -
4.5.3-t8.0.36
. I even tried rolling back to the first docker image4.5.1.024
with no luck. After troubleshooting multiple external and internal ftp connections, I believe the core issue to be at the docker container both from a docker virtual machine and running docker on linux. I have been able to getcfftp
to work as expected running on my windows box using the express installer for 4.5. The error messages make me think it has something to do with networking from docker. I receive an ftp security deny response from the remote ftp server when doing file transfers or directory list actions (connection open/close and create directory work fine). Here are some of the error messages I get for a directory list action:I partially masked my external IP
24.252.XX.XXX
- so that last error looks as if the Lucee sent my local ip instead of my external ip address when running inside docker. I would not be surprised if all versions docker images for Lucee is affected by this CFFTP issue. Please let me know if there is any config change I can make to solve this or if this is a bigger issue. For me this is a show stopping bug to avoid using lucee docker images, ftp is a must have. Thanks for looking into this.Here is sample code to reproduce the issue: