Rclone serve FTP failing

Been trying to use the Rclone FTP serve command (rclone serve ftp) with a Java application I use.

Command I’m using:

rclone serve --user=$USERNAME --pass=$PASSWORD --addr=$HOSTNAME:$PORT ftp -v gcrypt:/other/backups/

Log from -v option.

2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: Connection Established
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: < 220 Welcome on Rclone FTP Server
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: > USER admin
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: < 331 User name ok, password required
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: > PASS ****
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: < 230 Password ok, continue
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: > CWD .
2018/12/21 18:37:31 INFO  : 1a26be245556d8838285: < 250 Directory changed to /
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: > TYPE I
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: < 200 Type set to binary
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: > PORT 172,18,0,2,131,148
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: Opening active data connection to 172.18.0.2:33684
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: dial tcp 172.18.0.2:33684: connect: connection refused
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: < 425 Data connection failed
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: > SYST
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: < 215 UNIX Type: L8
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: > PORT 172,18,0,2,132,102
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: Opening active data connection to 172.18.0.2:33894
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: dial tcp 172.18.0.2:33894: connect: connection refused
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: < 425 Data connection failed
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: > QUIT
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: < 221 Goodbye
2018/12/21 18:37:32 INFO  : 1a26be245556d8838285: Connection Terminated

The application connects, “uploads” the backup, and considers it a success even though it failed. Any ideas what I’m doing wrong?

sounds like you’re using the PORT when you should be using PASV in the client java application. Is there a NAT or firewall between the FTP and the java app?

dial tcp 172.18.0.2:33894: connect: connection refused

Probably yeah. I’ll look more into it. :confused:

you should be able to specify the transfer type in the application to PASV which will connect through the NAT/FIREWALL.

Problem is it’s a Minecraft Java plugin and I don’t feel like changing the source lol. Don’t worry about it.