Невозможно запустить контейнер сервера ms sql - PullRequest
0 голосов
/ 04 августа 2020

Я пытаюсь запустить контейнер mssqlserver с помощью testcontainers- scala. Вот шаги, которые я предпринял для решения проблемы:

  • Добавить зависимости:
"com.dimafeng" %% "testcontainers-scala-scalatest" % "0.38.1" % Test,
"com.dimafeng" %% "testcontainers-scala-mssqlserver" % "0.38.1" % Test
  • Добавить container-license-acceptance.txt в test/resources с содержимым: mcr.microsoft.com/mssql/server:2017-CU12
  • В моем * Spe c файле я вызываю:
class SomethingSpec extends AnyFunSpec with Matchers with TestContainerForAll {
  override val containerDef = MSSQLServerContainer.Def()
  containerDef.start()
  ...
}

Когда я пытаюсь начать свой тест как таковой, я получаю:

Aug 03, 2020 2:10:13 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: 85f11327-0a03-4cbe-8ac5-5664362b9db9 Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:85f11327-0a03-4cbe-8ac5-5664362b9db9
Aug 03, 2020 2:10:13 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: b999c483-3500-4508-abc6-8574410e5eba Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:b999c483-3500-4508-abc6-8574410e5eba
Aug 03, 2020 2:10:13 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: a06a9cee-0088-4704-b398-e7133775eeb0 Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:a06a9cee-0088-4704-b398-e7133775eeb0
Aug 03, 2020 2:10:13 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: 9f91a0e5-7101-42db-9a0f-d82dfcd20758 Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:9f91a0e5-7101-42db-9a0f-d82dfcd20758
Aug 03, 2020 2:10:14 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: 14cd2820-4247-45a4-8be1-129ab0c07c48 Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:14cd2820-4247-45a4-8be1-129ab0c07c48
Aug 03, 2020 2:10:15 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:1 ClientConnectionId: 08a2ca6b-bc5c-49e5-bd75-e425f062fbcf Prelogin error: host localhost port 32778 Error reading prelogin response: Connection reset ClientConnectionId:08a2ca6b-bc5c-49e5-bd75-e425f062fbcf
Aug 03, 2020 2:10:16 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: b773915d-df4b-4861-84b4-2c0742156064 Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:b773915d-df4b-4861-84b4-2c0742156064
Aug 03, 2020 2:10:17 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: 6d2c910b-2c70-4210-a8f0-71c5a499acfd Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:6d2c910b-2c70-4210-a8f0-71c5a499acfd
Aug 03, 2020 2:10:17 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: 6fe79fad-78d6-4c67-9ed5-548e5e30eb0b Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:6fe79fad-78d6-4c67-9ed5-548e5e30eb0b
Aug 03, 2020 2:10:17 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: 4924309f-0ce4-4621-80bf-b22509a229c9 Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:4924309f-0ce4-4621-80bf-b22509a229c9
Aug 03, 2020 2:10:18 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: 33fd7b85-a988-4430-8713-6985b0c28935 Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:33fd7b85-a988-4430-8713-6985b0c28935
Aug 03, 2020 2:10:19 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
WARNING: ConnectionID:2 ClientConnectionId: 39951898-4676-40e9-bf33-bd2957918ec6 Prelogin error: host localhost port 32779 Error reading prelogin response: Connection reset ClientConnectionId:39951898-4676-40e9-bf33-bd2957918ec6
The TCP/IP connection to the host localhost, port 1433 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.".
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 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)
...