Frequent transport-level SqlClient exception on Linux Rocky 9.5 Minimal ISO - A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 35 #3052
Labels
✔️ Triage Done
Issues that are triaged by dev team and are in investigation.
Describe the bug
Running a simple C# .NET 8.0 Console program on a newly installed VMware VM running Rocky9.5 Minimal ISO with prerequisites
dotnet-runtime-8.0, aspnetcore-runtime-8.0 and mssql-server-selinux x86_64 16.0.4165.4-7 all installed via a script we see frequent
occurrences of the following exception.
Exception: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 35 - An internal exception was caught)
Note that the simple console program simply attempts to provide command text of increasing length to the SqlCommand ExecuteNonQuery() method.
Since it is not the first request which fails, the basic SqlClient -> SQL Server communication appears to be configured correctly.
I have attached a log of the execution of the console program on my Rocky9.5 VM - sqlclient_test_script_log_28-11-2024-17-29-11.log
Exception message:
Exception: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 35 - An internal exception was caught
Stack trace:
To reproduce
Install a new VWware VM with Rocky9.5 Minimal ISO.
VM configuration used was VMware VM with 8 CPUs, 8 Cores per Socket, 32 GB Memory, 100GB Hard Disk Thin Provisioned, EFI Boot
As part of the Linux installation, create a user 'administrator' and select the 'Make this user administrator' option. Ensure the VM has internet access to allow subsequent install of SQL Server, .NET etc.
Use the supplied SqlTest Visual Studio Solution to produce a release build and publish as a single file, self-contained linux-x64 executable for .NET8.0
Once installation is complete, log into the new VM using the administrator user. Enter the command nmcli to determine the IP address allocated if using DHCP.
Copy the SqlTest executable built in step 2 along with the uploaded bash script sqlclient_test.sh to the home directory of the administrator user on the Rocky 9.5 VM
Run following commands from a terminal on the VM
chmod +x ./sqlclient_test.sh
./sqlclient_test.sh
This script performs the following
Installs dotnet-runtime-8.0, aspnetcore-runtime-8.0 and mssql-server-selinux x86_64 16.0.4165.4-7
Configures sa password on SQL Server installed to match that used in SqlTest executable
Opens the required firewall ports.
Runs SqlTest program in a loop.
Each execution of SqlTest creates a new DB MFB_TESTDB
Sends SQL requests of increasing length to attempt to create a table in that DB.
Deletes DB MFB_TESTDB if the program executes without error.
Results should be logged in a file in the administrator home directory sqlclient_test_script_log*.log
Attached
SqlTest.zip - Simple C# .NET8.0 Console solution using Sql Server System Administrator user to send text of increasing length to the SqlCommand ExecuteNonQuery() method
sqlclient_test.zip - Bash script to install dotnet-runtime-8.0, aspnetcore-runtime-8.0 and mssql-server-selinux x86_64 16.0.4165.4-7 and configure firewall ports
sqlclient_test_script_log_28-11-2024-17-29-11.log - Results of execution on my Rocky9.5 VM
sqlclient_test.zip
sqlclient_test_script_log_28-11-2024-17-29-11.log
SqlTest.zip
Expected behavior
Program should run without transport- error
Further technical details
Microsoft.Data.SqlClient version: (5.2.2)
.NET target: (.NET 8.0)
SQL Server version: (mssql-server-selinux x86_64 16.0.4165.4-7)
Operating system: (Rocky Linux 9.5 Minimal ISO running on VMware VM with 8 CPUs, 8 Cores per Socket, 32 GB Memory, 100GB Hard Disk Thin Provisioned, EFI Boot)
Additional context
The text was updated successfully, but these errors were encountered: