Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround sqlserver 2022-latest latest image failing #383

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

radical
Copy link
Member

@radical radical commented Jul 24, 2024

.. because the path /opt/mssql-tools/bin/sqlcmd
changed to /opt/mssql-tools18/bin/sqlcmd. And this is being used in
samples/DatabaseContainers/DatabaseContainers.AppHost/sqlserverconfig/configure-db.sh.

microsoft/mssql-docker#892

Also, adds -C to trust the server certificate (see https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-utility?view=sql-server-ver16&tabs=go%2Cwindows&pivots=cs1-bash#-c).

.. because the path `/opt/mssql-tools/bin/sqlcmd`
changed to `/opt/mssql-tools18/bin/sqlcmd`. And this is being used in
`samples/DatabaseContainers/DatabaseContainers.AppHost/sqlserverconfig/configure-db.sh`.

testcontainers/testcontainers-dotnet#1220
microsoft/mssql-docker#892
Fixes:
```
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SSL Provider: [error:0A000086:SSL routines::certificate verify failed:self-signed certificate].
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to 2d77e8a3691a. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Client unable to establish connection. For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2226722.
```
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eerhardt eerhardt merged commit 08c14cd into dotnet:main Jul 24, 2024
4 checks passed
@radical radical deleted the fix-mssql-script branch July 24, 2024 22:35
meneasysoft added a commit to meneasysoft/aspire-samples that referenced this pull request Jul 25, 2024
Workaround sqlserver 2022-latest latest image failing (dotnet#383)
meneasysoft pushed a commit to meneasysoft/aspire-samples that referenced this pull request Jul 25, 2024
* Workaround sqlserver 2022-latest latest image failing

.. because the path `/opt/mssql-tools/bin/sqlcmd`
changed to `/opt/mssql-tools18/bin/sqlcmd`. And this is being used in
`samples/DatabaseContainers/DatabaseContainers.AppHost/sqlserverconfig/configure-db.sh`.

testcontainers/testcontainers-dotnet#1220
microsoft/mssql-docker#892

* Fix sqlcmd invocation to trust the server certificate

Fixes:
```
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SSL Provider: [error:0A000086:SSL routines::certificate verify failed:self-signed certificate].
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to 2d77e8a3691a. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Client unable to establish connection. For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2226722.
```
meneasysoft added a commit to meneasysoft/aspire-samples that referenced this pull request Jul 25, 2024
Workaround sqlserver 2022-latest latest image failing (dotnet#383)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants