Skip to content

[Bug] [FTP] The connections of SFTP didn't release when task failed. #1210

@FlechazoW

Description

@FlechazoW

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When the task fails due to issues like 'no such file' or 'file is empty', the sftp connection didn't release.

Task mode is yarn-session.

image

What you expected to happen

Connection is released.

How to reproduce

  1. Create a task which source is 'sftp'.
  2. The file that need to be synced is empty or not exist.
{
  "job": {
    "content": [
      {
        "reader": {
          "parameter": {
            "path": "/root/tiezhu/test_two.csv",
            "protocol": "SFTP",
            "password": "Abc!@#135",
            "port": 22,
            "isFirstLineHeader": true,
            "host": "172.16.85.171",
            "column": [
              {
                "name": "id",
                "type": "int"
              },
              {
                "name": "name",
                "type": "string"
              }
            ],
            "fieldDelimiter": ",",
            "encoding": "utf-8",
            "fileType": "CSV",
            "username": "root"
          },
          "name": "ftpreader"
        },
        "writer": {
          "parameter": {
            "print": true
          },
          "name": "streamwriter"
        }
      }
    ]
  }
}

Anything else

NONE

Version

master

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions