Vscode-mssql: SqlTool Service was not installed, had to do it manually.

Created on 21 Nov 2016  路  21Comments  路  Source: microsoft/vscode-mssql

SqlTool Service was not installed, had to do it manually.

mssql: Unable to execute the command while the extension is initializing. Please try again later.
Running the contributed command:'extension.manageProfiles' failed.
Running the contributed command:'extension.disconnect' failed.

  • MSSQL Extension Version: 0.1.5
  • VSCode Version: 1.7.1
  • OS Version: Windows
  • No Admin rights

Steps to Reproduce:

  1. Try MS SQL: Manage Connection Profiles command
bug needs repro

Most helpful comment

@harvey635 you can also try downloading the service and copy it to where the extension is installed. The url for the service for Windows is this: http://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip

and you need to unzip it here %USERPROFILE%.vscode\extensions\ms-mssql.mssql-0.1.5\sqltoolsservice\0.1.2\Windows

All 21 comments

Similar issue when attempting MS SQL: Connect
mssql: Unable to execute the command while the extension is initializing. Please try again later.
Running the contributed command:'extension.connect' failed.

Same version info. on Windows 7

Possible related symptom: Open VSCode and status bar (bottom right) reads "Installing SqlTool Service" with spinner. Have let this go for 2 hours with no end. Also, this is in an environment with no internet access and no local admin rights.

Further reading has revealed a missing pre-req KB2999226. Possible cause.

no admin rights here but i have internet access

@harvey635 - I've created #392 to track your issue. The specific problem you are experiencing is that we need to download our backing service which requires an internet connection. To solve we would need to build and publish an offline package that includes this for scenarios where you cannot install / update by connecting to the internet.

@mhenke - this sounds similar to the issue https://github.com/Microsoft/vscode-mssql/issues/365. Does this eventually fix itself? It seems that in some cases VSCode may be taking a long time to initialize our extension.

Please let us know if instead the problem is that it's failing to download the SQL Tools Service (as indicated by the status view showing this is still happening.

@harvey635 you can also try downloading the service and copy it to where the extension is installed. The url for the service for Windows is this: http://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip

and you need to unzip it here %USERPROFILE%.vscode\extensions\ms-mssql.mssql-0.1.5\sqltoolsservice\0.1.2\Windows

@llali Do you have the link for Ubuntu 16.04? I'm suspecting I'm having the same issue.

I let "Installing SqlTool Service" fully run and still have an issue. I'll try @llali suggestion

%USERPROFILE%.vscode-oss\extensions\ms-mssql.mssql-0.1.5\sqltoolsservice\0.1.2\Windows

Shortly after restarting VSCode I received errors like "Running the contributed command:'extension.manageProfiles' failed." but now everything seems fine.

@riker09 the link for Ubuntu 16.04 is: https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-ubuntu16-x64-netcoreapp1.0.tar.gz

and the location to install is: ~/.vscode/extensions/ms-mssql.mssql-0.1.5/sqltoolsservice/0.1.2/Ubuntu16

Here's the list of the links for all supported platforms:

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-ubuntu14-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-ubuntu16-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-osx-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-centos-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-debian-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-fedora-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-opensuse-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-rhel-x64-netcoreapp1.0.tar.gz

https://download.microsoft.com/download/F/1/C/F1CD2B31-008B-4ED9-96AD-F10D44EE091F/microsoft.sqltools.servicelayer-win-x64-netcoreapp1.0.zip

Downloaded and extracted the backing service (as above). got this error:
Failed to load the dll from [C:\Users\username \ .vscode\extensions\ms-mssql.mssql-0.1.5\sqltoolsservice\0.1.2\Windows\hostfxr.dll], HRESULT: 0x8007007E

[Error - 12:55:50 PM] Connection to server got closed. Server will not be restarted.

May be the UCRT prereq. Investigating.

@llali Thank you for the link. To be honest, I'm working on Elementary OS 0.4 Freya, which is a fork of Ubuntu 16.04. I was hoping, this would work. I looked into the extensions folder, and it looked like the extension was installed twice with similar names. The one you've mentioned (ms-mssql.mssql-0.1.5) and another one: Microsoft.mssql-0.1.5. The folder structure inside the second Microsoft extension looked identical to that of the ms-mssql extension.

I went ahead and reinstalled the ms-mssql.mssql-0.1.5 extension from the build-in store. Afterwards checked the ~/.vscode/extensions folder and verified, that the extension was installed. When I started vscode I got the same error as before (mssql: Failed to load Sql Tools Service). In the extension folder (.vscode/extensions/ms-mssql.mssql-0.1.5/sqltoolsservice/0.1.2/) there was now a Windows folder that wasn't there before (I think). I created the Ubuntu16 folder right beside it, copied the files from the .tar.gz you've posted, restarted VScode, but the error remains the same.

If you need additional information I'll gladly provide them.

I was able to connect to MSSQL Server running in a docker image on my Elementary OS 0.4 Loki. There was just a minor error in one of the extension files that prevented the correct startup. See issue #364 for details.

And just a reminder: When spinning up docker containers and persisting the data in a volume you need to clear that volume if you ever change the password provided to the docker container during startup. Took me almost half an out debugging around with sqlcmd before it hit me. :smile:

ORIGINAL ISSUE: SqlTool Service was not installed, had to do it manually.

I am receiving this issue as well. I have waited all day (since about 8am now 1pm)

I'm preparing a package for installation of VS code on all our servers - they are without internet access. I'm facing similar issue.

code --install-extension ms-mssql.mssql-1.3.0.vsix

During install it throws:
Error: getaddrinfo EAI_AGAIN vortex.data.microsoft.com:443

The extension is installed, but compains "mssql: Unable to execute the command while the extension is initializing."

@petrparik I'd recommend you use our pre-packaged extensions with our service bundled in, from our releases page. The most recent release is https://github.com/Microsoft/vscode-mssql/releases/tag/1.3.0.

For the version installed from the marketplace we pull down our backend service post-install since it's platform dependent and >20MB. This is much like the C# and some other language extensions. However each release should have a page on GitHub with a per-platform packaged VSIX. This makes it possible to install behind a firewall like you're doing.

@kevcunnane thank you! I'm trying to install on Windows server 2016. I tried to install mssql-1.3.0-win7-x64.vsix. It throws an error during installation:

code : ApplicationInsights:Sender [ { Error: getaddrinfo EAI_AGAIN vortex.data.microsoft.com:443

Despite the error, the extension works like charm after the installation. But I still need to get rid of the error. I need to deploy to many computers, and if the installer will throw errors then it is a problem. Any ideas? Thank you very much!

That sounds like it's VSCode sending a telemetry event, but since it's behind a firewall it fails. In the UI this is probably just put in an output channel but from cmdline install I guess it shows as an error?

If you update the VSCode user settings to disable all telemetry reporting does this avoid logging that error?

 // Enable crash reports to be sent to Microsoft.
  // This option requires restart to take effect.
  "telemetry.enableCrashReporter": false,

  // Enable usage data and errors to be sent to Microsoft.
  "telemetry.enableTelemetry": false

@kevcunnane works fine, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henksandoval picture henksandoval  路  6Comments

paaland picture paaland  路  3Comments

casraysa picture casraysa  路  7Comments

coquagli picture coquagli  路  4Comments

klukiyan picture klukiyan  路  3Comments