使用filezilla访问通过节点ftpd设置并部署在docker容器上的ftp服务器时出现以下错误:
从filezilla方面我得到:
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
Response: 150 Here comes the directory listing
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
从容器中我得到:
livedatawriter_1 | <::ffff:172.18.0.1> >> 230 User logged in, proceed.
livedatawriter_1 | <::ffff:172.18.0.1> << OPTS UTF8 ON
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: OPTS UTF8 ON
livedatawriter_1 | <::ffff:172.18.0.1> >> 200 OK
livedatawriter_1 | <::ffff:172.18.0.1> << PBSZ 0
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: PBSZ 0
livedatawriter_1 | <::ffff:172.18.0.1> >> 200 OK
livedatawriter_1 | <::ffff:172.18.0.1> << PROT P
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: PROT P
livedatawriter_1 | <::ffff:172.18.0.1> >> 200 OK
livedatawriter_1 | <::ffff:172.18.0.1> << PWD
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: PWD
livedatawriter_1 | <::ffff:172.18.0.1> >> 257 "/" is current directory
livedatawriter_1 | <::ffff:172.18.0.1> << TYPE I
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: TYPE I
livedatawriter_1 | <::ffff:172.18.0.1> >> 200 OK
livedatawriter_1 | <::ffff:172.18.0.1> << PASV
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: PASV
livedatawriter_1 | <::ffff:172.18.0.1> Setting up listener for passive connections
livedatawriter_1 | <::ffff:172.18.0.1> Passive data connection beginning to listen
livedatawriter_1 | <::ffff:172.18.0.1> Passive data connection listening on port 1025
livedatawriter_1 | <::ffff:172.18.0.1> >> 227 Entering Passive Mode (172,18,0,6,4,1)
livedatawriter_1 | <::ffff:172.18.0.1> << LIST
livedatawriter_1 | <::ffff:172.18.0.1> FTP command: LIST
livedatawriter_1 | <::ffff:172.18.0.1> Directory has 2 files
livedatawriter_1 | <::ffff:172.18.0.1> >> 150 Here comes the directory listing
livedatawriter_1 | <::ffff:172.18.0.1> Currently no data connection; expecting client to connect to pasv server shortly...
所有端口都已打开,我没有运行任何防火墙。想知道这是否是内部docker网络地址返回的请求有问题,而不是localhost,因为我从本地主机发出请求,但响应来自内部地址。奇怪的是,当使用DCOS部署在服务器上时,这是有效的。
撰写部分如下所示:
livedatawriter:
extends:
file: docker-compose-aws.yml
service: aws
build: ../LiveDataWriter
ports:
- "9004:9004"
- "7002:7002"
- "1025-1050:1025-1050"
- "51343:51343"
entrypoint: ["npm", "run", "debug"]
links:
- postgres
- auth
- redis
- kafka
depends_on:
- auth
environment:
HOST: "auth"
POSTGRES_HOST: "postgres"
REDIS_HOST: "redis"
KAFKA_BROKER_IPS: "kafka:9092"
FTP_HOST: "172.18.0.6"
FTP_PORT: 7002
FTP_BASEFOLDER: "/temp"
FTP_LOGLEVEL: 4
DATA_SERVICE_HTTPS: "false"
DATA_SERVICE_URL: "proxy:8081"