apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.95k stars 979 forks source link

Drill build is failing because of MSSQL Docker container issues #2947

Open pjfanning opened 1 month ago

pjfanning commented 1 month ago

Blocking all CI builds.

https://github.com/apache/drill/actions/runs/11197667892/job/31127951060#step:5:26707

[INFO] Running org.apache.drill.exec.store.jdbc.TestJdbcPluginWithMSSQL
Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 254.0 s <<< FAILURE! -- in org.apache.drill.exec.store.jdbc.TestJdbcPluginWithMSSQL
Error:  org.apache.drill.exec.store.jdbc.TestJdbcPluginWithMSSQL -- Time elapsed: 254.0 s <<< ERROR!
org.testcontainers.containers.ContainerLaunchException: Container startup failed for image mcr.microsoft.com/mssql/server:2017-CU12
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
    at org.apache.drill.exec.store.jdbc.TestJdbcPluginWithMSSQL.initMSSQL(TestJdbcPluginWithMSSQL.java:68)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
    ... 2 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:553)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
    ... 3 more
Caused by: java.lang.IllegalStateException: Wait strategy failed. Container exited with code 1
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
    ... 5 more
Caused by: java.lang.IllegalStateException: Container is started, but cannot be accessed by (JDBC URL: jdbc:sqlserver://localhost:32781;encrypt=false;trustServerCertificate=true), please check container logs
    at org.testcontainers.containers.JdbcDatabaseContainer.waitUntilContainerStarted(JdbcDatabaseContainer.java:176)
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:490)
    ... 5 more
Caused by: java.sql.SQLException: Could not create new connection
    at org.testcontainers.containers.JdbcDatabaseContainer.createConnection(JdbcDatabaseContainer.java:262)
    at org.testcontainers.containers.JdbcDatabaseContainer.createConnection(JdbcDatabaseContainer.java:218)
    at org.testcontainers.containers.JdbcDatabaseContainer.waitUntilContainerStarted(JdbcDatabaseContainer.java:158)
    ... 6 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 32781 has failed. Error: "Connection refused (Connection refused). Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
    at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:285)
    at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2466)
    at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:672)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2747)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:881)
    at org.testcontainers.containers.JdbcDatabaseContainer.createConnection(JdbcDatabaseContainer.java:253)
    ... 8 more
cgivre commented 1 month ago

@pjfanning We could run these tests manually.

pjfanning commented 1 month ago

I get the same problem if I run this test on my laptop.

Would it be possible to disable the test until someone with experience of setting up MS-SQL (specifically containerised versions of it) has a chance to look into it?

cgivre commented 1 month ago

I get the same problem if I run this test on my laptop.

Would it be possible to disable the test until someone with experience of setting up MS-SQL (specifically containerised versions of it) has a chance to look into it?

I'm remembering this... I only have ARM systems and there isn't a MSSQL docker container for that. I'm fine with disabling the MSSQL tests. @jnturton what do you think?

jnturton commented 1 month ago

It looks like this is the underlying problem. I could resolve that by upgrading the MSSQL container but that brought two smaller, unrelated issues of its own so I also had to disable two MSSQL tests. Patch attached. PR #2948 opened.