Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-33251

SQL Client query execution aborts after a few seconds: ConnectTimeoutException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.18.0, 1.17.1
    • None
    • Table SQL / Client
    • None

    Description

      If I run a streaming query from an unbounded connector from the SQL Client, it bombs out after ~15 seconds.

      [ERROR] Could not execute SQL statement. Reason:
      org.apache.flink.shaded.netty4.io.netty.channel.ConnectTimeoutException: connection timed out: localhost/127.0.0.1:52596
      

      This doesn't happen on 1.16.2. It does happen on 1.17.1 and 1.18 that I have just built locally (git repo hash `9b837727b6d`).

      The corresponding task's status in the Web UI shows as `CANCELED`.

      To reproduce

      Launch local cluster and SQL client

      ➜  flink-1.18-SNAPSHOT ./bin/start-cluster.sh 
      Starting cluster.
      Starting standalonesession daemon on host asgard08.
      Starting taskexecutor daemon on host asgard08.
      ➜  flink-1.18-SNAPSHOT ./bin/sql-client.sh
      […]
      Flink SQL>
      

      Set streaming mode and result mode

      Flink SQL> SET 'execution.runtime-mode' = 'STREAMING';
      [INFO] Execute statement succeed.
      
      Flink SQL> SET 'sql-client.execution.result-mode' = 'changelog';
      [INFO] Execute statement succeed.
      

      Define a table to read data from CSV files in a folder

      CREATE TABLE firewall (
        event_time STRING,
        source_ip  STRING,
        dest_ip    STRING,
        source_prt INT,
        dest_prt   INT
      ) WITH (
        'connector' = 'filesystem',
        'path' = 'file:///tmp/firewall/',
        'format' = 'csv',
        'source.monitor-interval' = '1' -- unclear from the docs what the unit is here
      );
      

      Create a CSV file to read in

      $ mkdir /tmp/firewall
      
      $ cat > /tmp/firewall/data.csv <<EOF
      2018-05-11 00:19:34,151.35.34.162,125.26.20.222,2014,68
      2018-05-11 22:20:43,114.24.126.190,21.68.21.69,379,1619
      EOF
      

      Run a streaming query

      SELECT * FROM firewall;
      

      You will get results showing (and if you add another data file it will show up) - but after ~30 seconds the query aborts and throws an error back to the user at the SQL Client prompt

      [ERROR] Could not execute SQL statement. Reason:
      org.apache.flink.shaded.netty4.io.netty.channel.ConnectTimeoutException: connection timed out: localhost/127.0.0.1:58470
      
      Flink SQL>
      

      Attachments

        1. log.zip
          34 kB
          Robin Moffatt

        Activity

          People

            Unassigned Unassigned
            rmoff Robin Moffatt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: