Skip to content

FTPS - Cannot connect; can connect with LFTP #404

@nothing2obvi

Description

@nothing2obvi

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I saw #260 but there was no solution and I don't know if it's the same issue.

I'm trying to connect via FTPS to my server.

I was getting: Cannot connect to server: Non-anonymous sessions must use encryption.

So I set tls to true.

Then I was getting: Cannot connect to server: tls: first record does not look like a TLS handshake.

So I set insecureSkipVerify to true.

However, I have the same problem.

The server section is like this:

server:
  ftp:
    host: <ip>
    port: 21
    username: <user>
    password: <pass>
    sources:
      - /source
    timeout: 30s
    disableUTF8: false
    disableEPSV: false
    disableMLSD: false
    escapeRegexpMeta: false
    tls: true
    insecureSkipVerify: true
    logTrace: true

However, I can connect to the server using FTPS with LFTP. Here's a working example of a command:

lftp -e "set ssl:verify-certificate no; open ftp://<user>:<pass>@<ip>; mirror --continue  ----scan-all-first --depth-first --only-newer --verbose --no-empty-dirs /source /target;"

What am I doing wrong? Thanks!

Expected behaviour

Connect to server via FTPS.

Actual behaviour

Cannot connect to server: tls: first record does not look like a TLS handshake

Steps to reproduce

  1. Set up FTPS in config file
  2. Can't connect

FTPGrab version

v7.10.0

Docker info

Client:
 Version:    27.4.1
 Context:    orbstack
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
	Version:  v0.18.0
	Path:     /Users/username/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
	Version:  v2.32.4
	Path:     /Users/username/.docker/cli-plugins/docker-compose

Server:
 Containers: 49
  Running: 48
  Paused: 0
  Stopped: 1
 Images: 58
 Server Version: 27.4.1
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: c507a0257ea6462fbd6f5ba4f5c74facb04021f4
 runc version: 6c52b3fc541fb26fe8c374d5f58112a0a5dbda66
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.10-orbstack-00297-gf8f6e015b993
 Operating System: OrbStack
 OSType: linux
 Architecture: aarch64
 CPUs: 8
 Total Memory: 7.81GiB
 Name: orbstack
 ID: f7fb417e-15cd-4761-ae55-672a87ba2696
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 192.168.97.0/24, Size: 24
   Base: 192.168.107.0/24, Size: 24
   Base: 192.168.117.0/24, Size: 24
   Base: 192.168.147.0/24, Size: 24
   Base: 192.168.148.0/24, Size: 24
   Base: 192.168.155.0/24, Size: 24
   Base: 192.168.156.0/24, Size: 24
   Base: 192.168.158.0/24, Size: 24
   Base: 192.168.163.0/24, Size: 24
   Base: 192.168.164.0/24, Size: 24
   Base: 192.168.165.0/24, Size: 24
   Base: 192.168.166.0/24, Size: 24
   Base: 192.168.167.0/24, Size: 24
   Base: 192.168.171.0/24, Size: 24
   Base: 192.168.172.0/24, Size: 24
   Base: 192.168.181.0/24, Size: 24
   Base: 192.168.183.0/24, Size: 24
   Base: 192.168.186.0/24, Size: 24
   Base: 192.168.207.0/24, Size: 24
   Base: 192.168.214.0/24, Size: 24
   Base: 192.168.215.0/24, Size: 24
   Base: 192.168.216.0/24, Size: 24
   Base: 192.168.223.0/24, Size: 24
   Base: 192.168.227.0/24, Size: 24
   Base: 192.168.228.0/24, Size: 24
   Base: 192.168.229.0/24, Size: 24
   Base: 192.168.237.0/24, Size: 24
   Base: 192.168.239.0/24, Size: 24
   Base: 192.168.242.0/24, Size: 24
   Base: 192.168.247.0/24, Size: 24

Docker Compose config

Logs

Fri, 24 Jan 2025 01:33:10 UTC INF Starting FTPGrab version=v7.10.0
Fri, 24 Jan 2025 01:33:10 UTC INF Configuration loaded from file: /ftpgrab.yml
Fri, 24 Jan 2025 01:33:10 UTC INF Configuration loaded from 2 environment variables
Fri, 24 Jan 2025 01:33:10 UTC WRN No notifier available
Fri, 24 Jan 2025 01:33:10 UTC FTL Cannot create grabber error="Cannot connect to server: tls: first record does not look like a TLS handshake"

Additional info

Sorry, couldn't find how to set global logs to debug.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions