Hi,
I have install Microsoft SQL Server 2019 (RTM-CU17) (KB5016394) - 15.0.4249.2 (X64) Developer Edition (64-bit) on Linux (Ubuntu 18.04.6 LTS) ec2 instance . I have enabled sql agent using following command:
"sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true" and have restarted the mssql service.
I have enabled cdc on database as well as table level using the commands provide by microsoft documentation. Along with it have enabled also the snapshot isolation.
Still sql server agent shows following error in the logs:
2022-08-19 05:12:51 - ? [101] SQLServerAgent service successfully started
2022-08-19 05:12:51 - ? [350] Waiting for SQL Server to start...
2022-08-19 05:12:52 - ? [000] Event Global\sqlserverRecComplete opened
2022-08-19 05:12:52 - ? [500] Waiting for SQL Server to recover all databases...
2022-08-19 05:12:54 - ? [100] Microsoft SQLServerAgent version 15.0.4249.2 (X64 unicode retail build) : Process ID 328
2022-08-19 05:12:54 - ? [495] The SQL Server Agent startup service account is ip-172-31-30-24\ip-172-31-30-24$.
2022-08-19 05:12:54 - ? [151] Running SQL Server Agent cross-platform
2022-08-19 05:13:25 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:13:58 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:14:30 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:15:02 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:15:34 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:16:06 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:16:38 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:17:11 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:17:43 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:18:15 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:18:47 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:19:19 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:19:51 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:20:24 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:20:56 - ! [150] SQL Server does not accept the connection (error: 258). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
2022-08-19 05:20:56 - ! [000] Unable to connect to server '(local),1433'; SQLServerAgent cannot start
2022-08-19 05:20:56 - ! [103] SQLServerAgent could not be started (reason: Unable to connect to server '(local),1433'; SQLServerAgent cannot start)
2022-08-19 05:21:01 - ! [298] SQLServer Error: 258, TCP Provider: The wait operation timed out. [SQLSTATE 08001]
2022-08-19 05:21:01 - ! [165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]
2022-08-19 05:21:01 - ! [298] SQLServer Error: 258, A network-related or instance-specific error has occurred while establishing a connection to SQL Server. 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. [SQLSTATE 08001]
2022-08-19 05:21:01 - ! [382] Logon to server '(local),1433' failed (DisableAgentXPs)
2022-08-19 05:21:01 - ? [102] SQLServerAgent service successfully stopped
2022-08-19 05:21:01 - ? [098] SQLServerAgent terminated (normally)
FYI,
- I have added hostname in my /etc/hosts in following manner:
0.0.0.0 <hostname>
- I have change the server name to mssql-host (as it was more than 15 letters)
- I have make sure that tcp is running at 1433 using following cmd:
" sudo /opt/mssql/bin/mssql-conf set network.tcpport 1433"
- I have allowed remote connections using following cmd:
"EXEC sp_configure 'remote access', 1;
GO
RECONFIGURE;
GO"
Can anyone help to find what the problem , as of now have tried the following solution found from internet but still it does not work
Then restart the SQL Server agent, error 258 is a connect issue, more serious, reinstall it
hi @YufeiShao-msft , even after restarting SQL server agent it is not working. And for mssql 2019, server agent comes with DB engine, Can you suggest how I can separately re-install it. I already have reinstalled mssql DB as a whole multiple times. But still its no working
You can see this doc:https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/determine-whether-the-database-engine-is-installed-and-started?view=sql-server-ver16
DB engine can install by running Setup
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-sql-agent?view=sql-server-ver16
Sign in to comment