421 Service not available, remote server has closed connection
the1bit opened this issue · comments
Hi,
I try to use your image to create a simple FTP server on AKS (Azure Kubernetes). For the configuration I use the following documentation: http://dbaharrison.blogspot.com/2018/05/azure-aks-and-quest-for-paas-ftp-server.html
Unfortunately your image does not work there. When I try to connect to the FTP service I am facing the following issues:
- Option : Command line
- Login Command: ftp -p 21
- Result220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
- Command: dir
- Result: 421 Service not available, remote server has closed connection. Passive mode refused.
- Option: Total commander
- Message flow:
- 200 PORT command successfull
- MLSD
- PORT failde, try PASV mode!
- PASV
- Message flow:
- Option: WinSCP
- With defined root path: Can't change directory to /home/ftpusers/user: No such file or directory
- Without define root path: Timeout detected. (data connection). Could not retrieve directory listing. Error listing directory '/'.
Kubernbetes version: 1.19.9
pure-ftp.aml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ftp5-deployment
spec:
replicas: 1
selector:
matchLabels:
app: ftpuk
strategy:
type: Recreate
template:
metadata:
labels:
app: ftpuk
spec:
hostNetwork: true
containers:
- name: ftpuk
image: stilliard/pure-ftpd:latest
env:
- name: ADDED_FLAGS
value: -O w3c:/var/log/pure-ftpd/transfer.log
ports:
- containerPort: 21
volumeMounts:
- name: azuredisk
mountPath: /home/ftpusers/
volumes:
- name: azuredisk
persistentVolumeClaim:
claimName: ftp-claim
Pod status:
NAME READY STATUS RESTARTS AGE
ftp5-deployment-7bfd54c657-tqh6n 1/1 Running 0 20h
Could you please help me to use it on the right way?
Thanks in advance.
Hi @the1bit,
I don't know much about the azure docker format above but I notice you're not passing the PUBLICHOST.
Check out our docker compose as an example:
https://github.com/stilliard/docker-pure-ftpd/blob/master/docker-compose.yml
It does not help. So I solved with ATMOZ SFTP. That works fine by default.