New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load sql tools service #364

Closed
ellwoods opened this Issue Nov 17, 2016 · 12 comments

Comments

Projects
None yet
7 participants
@ellwoods

ellwoods commented Nov 17, 2016

  • MSSQL Extension Version: 0.1.5
  • VSCode Version: 1.7.1
  • OS Version: Linux Mint 18

Steps to Reproduce:

  1. Install MSSQL
  2. Reload
    Installing SQL tools service message appears at the bottom of the application
    then ERROR mssql: Filed to load Sql Tools Service

The only logs I can find say -

[Extension Host] vscode-icons is active!
mssql: Failed to load Sql Tools Service
[Extension Host] rejected promise not handled within 1 second
spawn EACCES: Error: spawn EACCES
at exports._errnoException (util.js:1026:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at Object.exports.spawn (child_process.js:392:9)
at LanguageClient.createConnection (/home/steve/.vscode/extensions/ms-mssql.mssql-0.1.5/node_modules/vscode-languageclient/lib/main.js:824:32)
at LanguageClient.resolveConnection (/home/steve/.vscode/extensions/ms-mssql.mssql-0.1.5/node_modules/vscode-languageclient/lib/main.js:533:37)
at LanguageClient.start (/home/steve/.vscode/extensions/ms-mssql.mssql-0.1.5/node_modules/vscode-languageclient/lib/main.js:465:14)
at _server.getServerPath.then.serverPath (/home/steve/.vscode/extensions/ms-mssql.mssql-0.1.5/out/src/languageservice/serviceclient.js:146:46)

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 17, 2016

Member

Thanks for raising this. This platform isn't handled in our platform list right now - we handle Linux Mint v14 and 16 but for v18 we need to add an additional check. We will work to fix in the next release and improve handling in this area.

Bug fix info:
Looking at https://github.com/OmniSharp/omnisharp-vscode/blob/5c6ccf55e8671f08c480bf5991ebd6a8580510ce/src/platform.ts, it seems that C# extension has added support for this since we last updated. To fix, we should:

  • Add matching support for all platforms as done by C# extension
  • Change the error handling to not default to Windows. Instead we should return unknown_distribution just like their extension and handle in a similar manner.
Member

kevcunnane commented Nov 17, 2016

Thanks for raising this. This platform isn't handled in our platform list right now - we handle Linux Mint v14 and 16 but for v18 we need to add an additional check. We will work to fix in the next release and improve handling in this area.

Bug fix info:
Looking at https://github.com/OmniSharp/omnisharp-vscode/blob/5c6ccf55e8671f08c480bf5991ebd6a8580510ce/src/platform.ts, it seems that C# extension has added support for this since we last updated. To fix, we should:

  • Add matching support for all platforms as done by C# extension
  • Change the error handling to not default to Windows. Instead we should return unknown_distribution just like their extension and handle in a similar manner.
@ellwoods

This comment has been minimized.

Show comment
Hide comment
@ellwoods

ellwoods Nov 21, 2016

Many thanks for getting back to me, I was unsure which versions of Mint were supported. Is there some official documentation somewhere that I clearly missed?

thanks again

ellwoods commented Nov 21, 2016

Many thanks for getting back to me, I was unsure which versions of Mint were supported. Is there some official documentation somewhere that I clearly missed?

thanks again

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 21, 2016

Member

@ellwoods - Good point. I've created #393 to track the need for an official documentation page with supported distributions. At present we don't list this anywhere. We will work to get this updated so that there's clear guidance. I'm keeping this issue open to track the need to update our version mapping logic, since that would allow us to support v18.

Member

kevcunnane commented Nov 21, 2016

@ellwoods - Good point. I've created #393 to track the need for an official documentation page with supported distributions. At present we don't list this anywhere. We will work to get this updated so that there's clear guidance. I'm keeping this issue open to track the need to update our version mapping logic, since that would allow us to support v18.

@benrr101

This comment has been minimized.

Show comment
Hide comment
@benrr101

benrr101 Nov 21, 2016

Contributor

Though, for what it's worth, this would only be a list of "officially supported/tested" distributions. There's a good chance that the extension will work on other distributions we haven't explicitly tested, or that to get it working on an "unsupported" distro is a simple process. Sort of a "your mileage may vary" if you run it outside our explicit list.

Contributor

benrr101 commented Nov 21, 2016

Though, for what it's worth, this would only be a list of "officially supported/tested" distributions. There's a good chance that the extension will work on other distributions we haven't explicitly tested, or that to get it working on an "unsupported" distro is a simple process. Sort of a "your mileage may vary" if you run it outside our explicit list.

@karuna

This comment has been minimized.

Show comment
Hide comment
@karuna

karuna Nov 22, 2016

@kevcunnane will there be workaround for unsupported distributions? For example I have created a mssql-tools package for Arch linux, but it is in AUR (user contributed) repository and probably will never be in the core repository.

Maybe a configuration like an options to point to the path where sqlcmd and bcp installed is enough?

karuna commented Nov 22, 2016

@kevcunnane will there be workaround for unsupported distributions? For example I have created a mssql-tools package for Arch linux, but it is in AUR (user contributed) repository and probably will never be in the core repository.

Maybe a configuration like an options to point to the path where sqlcmd and bcp installed is enough?

@rselbor

This comment has been minimized.

Show comment
Hide comment
@rselbor

rselbor Nov 22, 2016

I had the same problem with:

MSSQL Extension Version: 0.1.5
VSCode Version: 1.7.1
OS Version: elementary OS 0.4 Loki

The problem was solved after change a case validation in the platform.js file, the ID for this OS is "elementary" and the validation string in the switch-case is "elementary OS".

rselbor commented Nov 22, 2016

I had the same problem with:

MSSQL Extension Version: 0.1.5
VSCode Version: 1.7.1
OS Version: elementary OS 0.4 Loki

The problem was solved after change a case validation in the platform.js file, the ID for this OS is "elementary" and the validation string in the switch-case is "elementary OS".

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 23, 2016

Member

@karuna - it seems you are referring to the mssql-tools commandline package rather than this extension? This forum is for the VSCode extension called "MSSQL", but I can help route you for questions. I'd recommend pinging https://twitter.com/tiger_vin on twitter and going from there, or even better raise this in the AMA - https://www.reddit.com/r/SQLServer/comments/5dijyg/ama_microsoft_sql_server_1118/?st=ivmy7r65&sh=3f3d1820.

We'll work to get good channels open for these tools too so that you can ask questions like this more easily

Member

kevcunnane commented Nov 23, 2016

@karuna - it seems you are referring to the mssql-tools commandline package rather than this extension? This forum is for the VSCode extension called "MSSQL", but I can help route you for questions. I'd recommend pinging https://twitter.com/tiger_vin on twitter and going from there, or even better raise this in the AMA - https://www.reddit.com/r/SQLServer/comments/5dijyg/ama_microsoft_sql_server_1118/?st=ivmy7r65&sh=3f3d1820.

We'll work to get good channels open for these tools too so that you can ask questions like this more easily

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 23, 2016

Member

@rselbor - thanks! we took a community contribution to fix this, which we really appreciate.

We have a full fix to support Mint and other distributions in review right now, so this will appear in a nightly dev build soon (https://github.com/Microsoft/vscode-mssql/releases - this will list daily drops if you really need a fix).

Member

kevcunnane commented Nov 23, 2016

@rselbor - thanks! we took a community contribution to fix this, which we really appreciate.

We have a full fix to support Mint and other distributions in review right now, so this will appear in a nightly dev build soon (https://github.com/Microsoft/vscode-mssql/releases - this will list daily drops if you really need a fix).

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 23, 2016

Member

Fixed by #400. I am going to close this issue out. Please feel free to open a new issue if you have related things to raise.

Member

kevcunnane commented Nov 23, 2016

Fixed by #400. I am going to close this issue out. Please feel free to open a new issue if you have related things to raise.

@kevcunnane kevcunnane closed this Nov 23, 2016

@riker09

This comment has been minimized.

Show comment
Hide comment
@riker09

riker09 Nov 25, 2016

@rselbor Could you please provide a more detailed description on how you got this extension working on Elementary OS 0.4 Loki? I'm having difficulties getting it to load (mssql: Failed to load Sql Tools Service).

[EDIT]
Found it! I've searched the whole extension folder for a file platform.js and found this file: ~/.vscode/extensions/ms-mssql.mssql-0.1.5/out/src/models/platform.js. Around lines 69-85 you'll find this:

            case 'debian':
                return Platform.Debian;
            case 'ol':
                // Oracle Linux is binary compatible with CentOS
                return Platform.CentOS;
            case 'elementary OS':
                const eOSVersionId = getValue('VERSION_ID');
                if (eOSVersionId.startsWith('0.3')) {
                    // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                    return Platform.Ubuntu14;
                }
                else if (eOSVersionId.startsWith('0.4')) {
                    // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                    return Platform.Ubuntu16;
                }
            default:
                return Platform.Windows;

I've replaced it with this:

            case 'debian':
                return Platform.Debian;
            case 'ol':
                // Oracle Linux is binary compatible with CentOS
                return Platform.CentOS;
            case 'elementary':
            case 'elementary OS':
                const eOSVersionId = getValue('VERSION_ID');
                if (eOSVersionId.startsWith('0.3')) {
                    // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                    return Platform.Ubuntu14;
                }
                else if (eOSVersionId.startsWith('0.4')) {
                    // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                    return Platform.Ubuntu16;
                }
            default:
                return Platform.Windows;

[/EDIT]

riker09 commented Nov 25, 2016

@rselbor Could you please provide a more detailed description on how you got this extension working on Elementary OS 0.4 Loki? I'm having difficulties getting it to load (mssql: Failed to load Sql Tools Service).

[EDIT]
Found it! I've searched the whole extension folder for a file platform.js and found this file: ~/.vscode/extensions/ms-mssql.mssql-0.1.5/out/src/models/platform.js. Around lines 69-85 you'll find this:

            case 'debian':
                return Platform.Debian;
            case 'ol':
                // Oracle Linux is binary compatible with CentOS
                return Platform.CentOS;
            case 'elementary OS':
                const eOSVersionId = getValue('VERSION_ID');
                if (eOSVersionId.startsWith('0.3')) {
                    // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                    return Platform.Ubuntu14;
                }
                else if (eOSVersionId.startsWith('0.4')) {
                    // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                    return Platform.Ubuntu16;
                }
            default:
                return Platform.Windows;

I've replaced it with this:

            case 'debian':
                return Platform.Debian;
            case 'ol':
                // Oracle Linux is binary compatible with CentOS
                return Platform.CentOS;
            case 'elementary':
            case 'elementary OS':
                const eOSVersionId = getValue('VERSION_ID');
                if (eOSVersionId.startsWith('0.3')) {
                    // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                    return Platform.Ubuntu14;
                }
                else if (eOSVersionId.startsWith('0.4')) {
                    // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                    return Platform.Ubuntu16;
                }
            default:
                return Platform.Windows;

[/EDIT]

@rselbor

This comment has been minimized.

Show comment
Hide comment
@rselbor

rselbor Nov 25, 2016

Hello @riker09...

Yes, I modified this file (plataform.js) but, instead of add a new case I only changed de string validation.

        case 'ol':
            // Oracle Linux is binary compatible with CentOS
            return Platform.CentOS;
        case 'elementary':
            const eOSVersionId = getValue('VERSION_ID');
            if (eOSVersionId.startsWith('0.3')) {
                // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                return Platform.Ubuntu14;
            }
            else if (eOSVersionId.startsWith('0.4')) {
                // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                return Platform.Ubuntu16;
            }
        default:
            return Platform.Windows;

I think both cases would be run fine, but for me the code above is working.

rselbor commented Nov 25, 2016

Hello @riker09...

Yes, I modified this file (plataform.js) but, instead of add a new case I only changed de string validation.

        case 'ol':
            // Oracle Linux is binary compatible with CentOS
            return Platform.CentOS;
        case 'elementary':
            const eOSVersionId = getValue('VERSION_ID');
            if (eOSVersionId.startsWith('0.3')) {
                // Elementary OS 0.3 Freya is binary compatible with Ubuntu 14.04
                return Platform.Ubuntu14;
            }
            else if (eOSVersionId.startsWith('0.4')) {
                // Elementary OS 0.4 Loki is binary compatible with Ubuntu 16.04
                return Platform.Ubuntu16;
            }
        default:
            return Platform.Windows;

I think both cases would be run fine, but for me the code above is working.

@kevcunnane

This comment has been minimized.

Show comment
Hide comment
@kevcunnane

kevcunnane Nov 26, 2016

Member

@riker09, @rselbor - a quick note that our nightly builds are now available and include the fixes to support these new versions. The most recent is https://github.com/Microsoft/vscode-mssql/releases/tag/v0.1.5_3-alpha. You can install the mssql-0.1.5.vsix package to verify this is fixed officially, and if stuck we have offline-installable packages listed too which have the service backend for different platforms. This may help skip altering the .js yourself manually.

Member

kevcunnane commented Nov 26, 2016

@riker09, @rselbor - a quick note that our nightly builds are now available and include the fixes to support these new versions. The most recent is https://github.com/Microsoft/vscode-mssql/releases/tag/v0.1.5_3-alpha. You can install the mssql-0.1.5.vsix package to verify this is fixed officially, and if stuck we have offline-installable packages listed too which have the service backend for different platforms. This may help skip altering the .js yourself manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment