microsoft / sqldev

Source code for SQL Server and Azure SQL DB developer getting started tutorials: https://www.microsoft.com/en-us/sql-server/developer-get-started/
91 stars 53 forks source link

mssql-conf setup freezes and never finishes #41

Closed diegoquintanav closed 5 years ago

diegoquintanav commented 6 years ago

So I'm following the instructions for python and ubuntu, and my installation freezes at some point

diego@envy:~$ sudo /opt/mssql/bin/mssql-conf setup
Choose an edition of SQL Server:
  1) Evaluation (free, no production use rights, 180-day limit)
  2) Developer (free, no production use rights)
  3) Express (free)
  4) Web (PAID)
  5) Standard (PAID)
  6) Enterprise (PAID)
  7) Enterprise Core (PAID)
  8) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-8): 3
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

Enter the SQL Server system administrator password: 
Confirm the SQL Server system administrator password: 
Configuring SQL Server...

I can't tell what is the script waiting for, and if I do ctrl+c to cancel it, I get

^CTraceback (most recent call last):
  File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 277, in <module>
    main()
  File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 273, in main
    processCommands()
  File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 197, in processCommands
    COMMAND_TABLE[args.which]()
  File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 54, in handleSetup
    exit(mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt))
  File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 833, in setupSqlServer
    ret = configureSqlservrWithArguments("--setup --reset-sa-password", MSSQL_SA_PASSWORD=encodedPassword, MSSQL_PID=pid)
  File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 737, in configureSqlservrWithArguments
    return subprocess.call(args, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt\

so in def configureSqlservrWithArguments(*args, **kwargs): at line 721 of mssqlconfhelper.py there is a subprocess call to invokesqlservr.sh which is probably the source of the problem. From inspection I can see that it runs sqlservr and passes --setup and --reset-sa-password, I suppose.

#!/bin/bash
cd /var/opt/mssql

CMDLINE="/opt/mssql/bin/sqlservr $@"

echo ""

# If running as mssql then execute the command. Else sudo -u to mssql
if [ "$(id -u -n)" == "mssql" ]; then
    /bin/bash -c "$CMDLINE"
    retcode=$?
else
    sudo -EH -u mssql /bin/bash -c "$CMDLINE"
    retcode=$?
fi

exit $retcode

If I run sqlservr directly, execution stalls at

2018-05-21 19:43:45.74 spid6s      Ending provisioning of CEIPLoginName.       
2018-05-21 19:43:45.75 spid6s      ------------------------------------------------------
2018-05-21 19:43:45.79 spid6s      SQL Server is now ready for client connections. This is an informational message; no user action is required.
2018-05-21 19:43:45.79 spid6s      Recovery is complete. This is an informational message only. No user action is required.
2018-05-21 19:43:51.44 spid66      Using 'dbghelp.dll' version '4.0.5'
2018-05-21 19:44:12.07 spid66      Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
2018-05-21 19:44:12.20 spid66      Using 'xplog70.dll' version '2017.140.3025' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.

How can I fix this? Is here the place to ask for this kind of stuff?

also

diego@envy:~$ uname --a
Linux envy 4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Thanks!

David-Engel commented 5 years ago

This GitHub repository isn't meant for providing help with SQL Server issues. There are lots of better options listed in SQL Server docs that will get you in contact with the appropriate experts: https://docs.microsoft.com/en-us/sql/sql-server/sql-server-get-help?view=sql-server-2017#i-want-to-ask-the-community-for-help Specifically, this one looks relevant to Setup and upgrade help: https://social.msdn.microsoft.com/Forums/en-US/home?forum=sqlsetupandupgrade&filter=alltypes&sort=lastpostdesc

Regards, David