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

SQL Server connectivity issue - 'TCP Provider: Error code 0x68' #917

Open
Paul-Eccleston-i2 opened this issue Jan 24, 2025 · 0 comments
Open

Comments

@Paul-Eccleston-i2
Copy link

I am seeing a repeatable but slightly random error of TCP Provider: Error code 0x68 when running two MS SQL Server Docker containers in the same Docker bridge network.

The first docker container (server) is running as follows:-

  docker run \
    "-d" \
    "--rm" \
    "--platform=linux/amd64" \
    "--network-alias=server.test" \
    "--name=server" \
    "--network=test" \
    "--env=ACCEPT_EULA=Y" \
    "--env=SA_PASSWORD=StrongPassword" \
    "--env=MSSQL_PID=Developer" \
    "--env=MSSQL_AGENT_ENABLED=true" \
    "mcr.microsoft.com/mssql/rhel/server:2022-latest"

The second docker container (client) is running as follows:-

  docker run \
    "--rm" \
    "--platform=linux/amd64" \
    "--network=test" \
    "--name=client" \
    -v "<host path to scripts>:<container path to scripts>" \
    "mcr.microsoft.com/mssql/rhel/server:2022-latest" \
    bash -c "set -e; ${test_command}"

The following is the test command executed:-

test_command="${1:-"/opt/mssql-tools/bin/sqlcmd -S server.test -U sa -P StrongPassword -N -C -i '<sql scripts to run>'"}"

Things I have tried:-

  • Verified RAM usage is acceptable on the host (32GB total, around 22GB in use)
  • Tried different Microsoft SQL images
  • Ensured no packages are being updated in the base OS (seemed to fix the issue my preventing certain packages from installing, but this no longer works)
  • Tried ruling out scripts, but at this point it does not seem to be a single script causing the issue.
  • Looked at the SQL Server container logs - nothing of interest is shown, no errors are logged.

So I am at a loss as to the cause of the issue at this point, it seems to me to be network connectivity related, but I see nothing obviously wrong with the above, does anybody have any suggestions on how I can try and debug this further, if you need any further information then please let me know.

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

No branches or pull requests

1 participant