SQL Configuration step issue in Ubuntu Instance

Pratik Narottam Panchal 0 Reputation points
2025-12-04T05:16:29.8166667+00:00

While configuring SQL Server for the first time on Ubuntu_22.04-x86_64-SQL_2022_Standard-2025.08.28, I encountered an error that occurs frequently. I need to retry the setup 2–3 times before it works properly. Any Solution to fix this part?

++ bash -c '/opt/mssql/bin/mssql-conf -n setup'

Broadcast message from root@ip-172-****(Thu 2025-12-04 05:03:42 UTC):

The system is going down for reboot at Thu 2025-12-04 05:04:42 UTC!

Broadcast message from root@ip-172-* (Thu 2025-12-04 05:04:43 UTC):

The system is going down for reboot NOW!

Session terminated, killing shell... Filename: /usr/lib/python3.10/subprocess.py

Function: _try_wait

Line number: 1917

Filename: /usr/lib/python3.10/subprocess.py

Function: _wait

Line number: 1959

  Filename: /usr/lib/python3.10/subprocess.py

  Function: wait

  Line number: 1209
``` ...killed.

Terminated

Failed to start mssql-server.service: Transaction for mssql-server.service/start is destructive (sysinit.target has 'stop' job queued, but 'start' is included in transaction).

SQL Server Database Engine
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shruti Dhruv 405 Reputation points Microsoft External Staff Moderator
    2025-12-05T05:12:50.74+00:00

    Hi Pratik ,

    Welcome to Microsoft Q&A Forum!

    You can follow below troubleshooting steps-
    1.Check if SQL Server Installed Correctly-
    dpkg -l | grep mssql-server

    2.Check Service Status
    systemctl status mssql-server
    If its not running :
    sudo systemctl start mssql-server
    sudo systemctl enable mssql-server

    3.Connect to SQL Server
    Install the SQL command-line tools:
    sudo apt install -y mssql-tools unixodbc-dev

    Then connect:
    /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourPassword'
    If the configuration step fails repeatedly, you can reset and re-run:
    sudo systemctl stop mssql-server sudo rm -rf /var/opt/mssql/* sudo /opt/mssql/bin/mssql-conf setup.

    You can also refer troubleshooting guides-
    https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-troubleshooting-guide?view=sql-server-ver17#connection
    https://www.sqlshack.com/sql-server-installation-troubleshooting-on-ubuntu/

    I hope this helps!
    Let me know how did that go for you.
    Thank You

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.