I have been able to connect to this container for over a month without any issues until today at work, I didn’t configure anything, closed my laptop last Friday, had not opened it since this morning. I was unable to connect to it with Azure Data Studio like I used to. I have tried opening a new container but still cannot connect to it.
This is what the error showed
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=14999;
But I was able to run this command without any issues.
docker exec -it <containerID> /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <MyPassword>
Any help would be appreciated. Thanks.
Edit: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash This was the guide I followed building my container.