Failed to ftp: failed to parse host:port

What is the problem you are having with rclone?

I cannot seem to get rclone serve ftp to work. No matter if I'm trying to create an FTP server from a remote or a local directory, rclone always fails with the error message Failed to ftp: failed to parse host:port.

Additional information:

  1. rclone serve sftp works fine for me.
  2. The following information is generated from a Windows PC. I also tested it on a Ubuntu VPS, with the same result.

Run the command 'rclone version' and share the full output of the command.

rclone v1.68.0-beta.8116.31fabb340
- os/version: Microsoft Windows 11 Enterprise 24H2 (64 bit)
- os/kernel: 10.0.26244.5000 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.23rc2
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

It fails on me for whatever storage system I have. I've tried a local directory, GoogleDrive, and OneDrive. None of them work. For simplicity, in the example below I'm trying to create an FTP server from a local directory E:/temp.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone serve ftp E:/temp

The rclone config contents with secrets removed.

For testing purpose, I use an empty/0-byte rclone.conf file. Consider it vanilla.

A log from the command with the -vv flag

2024/07/20 19:18:22 DEBUG : rclone: Version "v1.68.0-beta.8116.31fabb340" starting with parameters ["rclone" "serve" "ftp" "E:/temp" "-vv"]
2024/07/20 19:18:22 DEBUG : Creating backend with remote "E:/temp"
2024/07/20 19:18:22 DEBUG : Using config file from "E:\\temp\\test\\rclone.conf"
2024/07/20 19:18:22 DEBUG : fs cache: renaming cache item "E:/temp" to be canonical "//?/E:/temp"
2024/07/20 19:18:22 DEBUG : 2 go routines active
2024/07/20 19:18:22 Failed to ftp: failed to parse host:port

Fun of beta testing:) If you could git bisect to find offending commit it would be perfect - but if not then create bug report on github.

Something is broken in the latest beta. The same works fine with rclone v1.67:

$ rclone serve ftp ~/Temp -vv
2024/07/21 06:40:46 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "serve" "ftp" "/Users/kptsky/Temp" "-vv"]
2024/07/21 06:40:46 DEBUG : Creating backend with remote "/Users/kptsky/Temp"
2024/07/21 06:40:46 DEBUG : Using config file from "/Users/kptsky/.config/rclone/rclone.conf"
2024/07/21 06:40:46 INFO  : Local file system at /Users/kptsky/Temp: poll-interval is not supported by this remote
2024/07/21 06:40:46 NOTICE: Local file system at /Users/kptsky/Temp: Serving FTP on localhost:2121
2024/07/21 06:40:46 INFO  : : Rclone FTP Server listening on 2121

$ rclone-beta serve ftp ~/Temp -vv
2024/07/21 06:41:29 DEBUG : rclone: Version "v1.68.0-beta.8116.31fabb340" starting with parameters ["rclone-beta" "serve" "ftp" "/Users/kptsky/Temp" "-vv"]
2024/07/21 06:41:29 DEBUG : Creating backend with remote "/Users/kptsky/Temp"
2024/07/21 06:41:29 DEBUG : Using config file from "/Users/kptsky/.config/rclone/rclone.conf"
2024/07/21 06:41:29 DEBUG : 5 go routines active
2024/07/21 06:41:29 Failed to ftp: failed to parse host:port

Thank you for confirming the issue. I did a quick bisect over the binaries on https://beta.rclone.org:

The last version that works: v1.68.0-beta.8055.6e853c82d
The first version that breaks: v1.68.0-beta.8085.d9bd6f35f

So something in between breaks.

1 Like

This is almost certainly fallout from the recent config re-organization.

It is easy to fix though, try this

v1.68.0-beta.8117.87cd0d221.fix-ftp-config on branch fix-ftp-config (uploaded in 15-30 mins)

1 Like

Yes, the fix works for me. Thank you for the quick fix!

Thank you for testing.

I've merged this to master now which means it will be in the latest beta in 15-30 minutes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.