slingdata-io / sling-cli

Sling is a CLI tool that extracts data from a source storage/database and loads it in a target storage/database.
https://docs.slingdata.io
GNU General Public License v3.0
444 stars 34 forks source link

Unable to discover FTPS streams #398

Open guaripete-github opened 1 month ago

guaripete-github commented 1 month ago

Issue Description

  URL__FTPS:
    url: "ftps://<username>:<password>@<host>"
sling conns test URL__FTPS
10:34AM INF success!

sling conns discover URL__FTPS
fatal:
~ could not discover URL__FTPS (See https://docs.slingdata.io/sling-cli/environment)
Unhandled connection type: ftps

tried:

  URL__FTPS:
    url: "ftps://<username>:<password>@<host>"
    ftps: true

with same result.

And also tried:

  URL__FTPS:
    url: "ftp://<username>:<password>@<host>"
    ftps: true
sling conns test URL__FTPS   
fatal:
~ unable to connect to ftp server
EOF
flarco commented 1 month ago

This is the proper way to input:

URL__FTPS:
    url: "ftp://<username>:<password>@<host>"
    ftps: true

Can you run with env var DEBUG=TRUE?

guaripete-github commented 1 month ago

Got:

sling conns test URL__FTPS
DBG opened "ftp" connection (conn-ftp-GDN)
fatal:
~ unable to connect to ftp server
dial tcp <ip>:21: i/o timeout

I believe the server uses implicit FTPS (port 990) and not explicit FTPS (port 21)

Tried:

URL__FTPS:
    url: "ftp://<username>:<password>@<host>:990"
    ftps: true
DBG opened "ftp" connection (conn-ftp-X2j)
fatal:
~ unable to connect to ftp server
EOF
flarco commented 1 month ago

Don't think it will make a difference, but just to try... can you specify type=ftp host, user, password, port keys instead of url? see https://docs.slingdata.io/connections/file-connections/ftp

guaripete-github commented 1 month ago

Indeed, no difference:

  URL__FTPS:
    type: ftp
    host: <host>
    user: <user>
    port: 990
    password: <password>
    ftps: true
DBG opened "ftp" connection (conn-ftp-GRx)
fatal:
~ unable to connect to ftp server
EOF