SEPURI-SAI-KRISHNA opened a new issue, #13263:
URL: https://github.com/apache/seatunnel/issues/13263

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Bug%22)
 and found no similar issues. No open PR changes `TiDBTestBase`.
   
   ### What happened
   
   `TiDBCDCIT` fails in CI before any job runs, in `startUp`, about 0.6 s after 
testcontainers reports the TiDB container as started:
   
   ```log
   INFO  tc.pingcap/tidb:v6.1.0 - Container pingcap/tidb:v6.1.0 started in 
PT20.85452818S
   INFO  org.apache.seatunnel.e2e.connector.tidb.TiDBTestBase - Containers are 
started.
   [ERROR] TiDBCDCIT.startUp:94->TiDBTestBase.initializeTidbTable:213 ยป Runtime 
com.mysql...
   com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link 
failure
   
   The last packet sent successfully to the server was 0 milliseconds ago. The 
driver has not received any packets from the server.
   Caused by: java.io.EOFException: Can not read response from server. Expected 
to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
   ```
   
   Seen three times on 2026-11-12, in two unrelated PRs, always within a second 
of "started" (20.85 to 21.37 s):
   - #13250, `updated-modules-integration-test-part-6 (17)`, attempt 1: 
https://github.com/SEPURI-SAI-KRISHNA/seatunnel/actions/runs/43174791361/job/131038614418
   - #13092, `updated-modules-integration-test-part-6 (11)`: 
https://github.com/SEPURI-SAI-KRISHNA/seatunnel/actions/runs/43196145394/job/131119670329
   - #13250, `updated-modules-integration-test-part-6 (17)`, attempt 2: 
https://github.com/SEPURI-SAI-KRISHNA/seatunnel/actions/runs/43174791361/job/131168303100
   
   `TiDBTestBase` connects as soon as the default port wait of the TiDB 
container ends, and that wait does not prove that TiDB serves connections. Both 
of these give exactly the error above, and the CI log cannot tell them apart, 
since `tidb.toml` logs errors only:
   
   1. The wait ends before TiDB listens on 4000. This can happen, as I checked 
with testcontainers 1.21.4 and the same images and config:
      - the outside check connects to the mapped port, and Docker accepts at 
once, before TiDB listens (`External port check passed for [4000] ... in 
PT0.008568532S`);
      - `HostPortWaitStrategy` does not fail when its check inside the 
container fails: it logs `Internal port check failed` at debug level and treats 
the container as started. When TiDB stopped during bootstrap locally, it logged 
`Internal port check failed for [4000] in PT1M24.232223648S` and reported the 
container as started;
      - a connection made before TiDB listens fails with exactly the error 
above.
   2. TiDB listens but closes a new connection before its greeting. TiDB v6.1.0 
does this in a few cases, such as `reject connection due to lost connection to 
PD` or a session that cannot be opened yet, and logs them at warn level.
   
   Either way the open port is not enough, and the test should wait until a 
query works before it creates the tables.
   
   ### SeaTunnel Version
   
   dev (`9283344113`)
   
   ### SeaTunnel Config
   
   ```conf
   Not a config issue: the failure is in `TiDBTestBase.startContainers` / 
`initializeTidbTable`, before a job is submitted.
   ```
   
   ### Running Command
   
   ```shell
   ./mvnw -B verify -DskipUT=true -DskipIT=false "-Dit.test=TiDBCDCIT" -pl 
:connector-cdc-tidb-e2e -am -Pci
   ```
   
   ### Error Exception
   
   ```log
   com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link 
failure
   Caused by: java.io.EOFException: Can not read response from server. Expected 
to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
        at 
org.apache.seatunnel.e2e.connector.tidb.TiDBCDCIT.startUp(TiDBCDCIT.java:94)
   ```
   
   ### Zeta or Flink or Spark Version
   
   All engines: the failure is in the `@BeforeAll` container setup.
   
   ### Java or Scala Version
   
   JDK 11 and 17 (both seen).
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to