Error communicating between BxlServer and client - sql-server

I have been trying to upgrade SQL server 2017 to run Python 3.7. We have installed CU28 and the product version is 14.0.3430.2 which includes the C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\PYTHON_SERVICES.3.7.
I have made sure all permissions are granted to the INSTANCENAME directory and pythonlauncher.config working directory is pointing to C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\MSSQL\ExtensibilityData and launchpad service account has permissions to this directory.
I have done all this as an upgrade twice and got various errors, and a clean install. The error I am getting is
Msg 39004, Level 16, State 20, Line 0
A 'Python' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 0
An external script error occurred:
Invalid BXL stream
error while running BxlServer: caught exception: Error communicating between BxlServer and client: 0x000000e8
HRESULT 0x000000e8 looks like INVALID_CANCEL_OF_FILE_OPEN
HRESULT 0x80004004 looks like E_ABORT
So no real clues what is wrong here. pythonlauncher.log does show the error;
[Error] Process::TryTerminate failed with error code: 5
Session 0E93E9D1-07A7-448A-8B1A-FCA5263A5F53 TryTerminate(1067) failed with 5
Error code 5 is ERROR_ACCESS_DENIED
Also got this warning
[Warning] StaleDirectoryCleaner() failed to delete C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\MSSQL\ExtensibilityData\FAMSQL17UAT01\8B97815A-E9EA-4FA0-98F3-0440D4180522 after 5 retries
So all up this looks there are still permission issues. Extremely frustrating as there is next to no help on this. Any help would be greatly appreciated.
UPDATE:
After another clean install - first checked Python 3.5.2 worked and it did. Upgraded to 3.7, and again got the same issue. A bit more digging around I find this...
The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/SERVERNAME.domain_name.com:INSTANCENAME ]
Login failed for user 'DOMAIN\SERVERNAME$'. Reason: Could not find a login matching the name provided.
We have a service account that is not part of the domain which is NT Service\MSSQL$INSTANCENAME. Why on this implementation expecting a windows authenticated user the same name as the server??? How can I go about remedy this?
I think what has happened is that MS have left debug code in their production release.
FURTHER UPDATE:
In the event log we are seeing
Faulting application:Python.exe: 3.7.1150.1013 Faulting module name:
pylink.pyd Faulting module path:c:\Program Files\Microsoft SQL
Server\MSSQL14.INSTANCENAME\PYTHON_SERVICES.3.7\lib\site-packages\revoscalepy\rxLibs\pylink.pyd

Microsoft have confirmed that this is a bug. Their work around is below.
It's CU27 and CU28 that 3.7 is broken in - so you could use CU26 and still use Python 3.7. That version started at CU22... so CU22-26 work fine.
Or - it's only the pylink.pyd that is broken - you can simply grab the pylink.pyd from a CU22-26 installation for Python 3.7, and swap it into your CU27/CU28 files. This workaround will work now, and will also not cause any issues going forward once the fix does come. That is, on your next update, it shouldn't interfere and it should all go smoothly.

Related

Error connecting Robot Framework to MS SQL Server database

I am somewhat experienced with Robot Framework, but new to the idea of connecting it to databases. I am trying to create a basic database test in my organization using Robot Framework in the PyCharm IDE. I've written the test using pymssql. It gives an unusual error message when it fails. I've read that I might need to install FreeTDS to do this, but I would prefer not to if I don't absolutely have to. I have seen several answers to this kind of question from Python developers, but I've not seen any who are using Robot Framework specifically.
Versions:
PyCharm 2020.1
Python 3.8.
Pymssql version 2.1.5.
Here is my code and the error messages I am getting.
*** Settings ***
Documentation DB Suite
Library Zoomba.GUILibrary
Library DatabaseLibrary
Resource ../../Pages/xxx/resource.robot
*** Variables ***
${DBName} DBxxx
${DBUser} USER xxx
${DBPass} PASS xxx
${DBHost} localhost
${DBPort} 1433
*** Test Cases ***
TC 001 Database Check
Connect To Database pymssql ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort}
${output}= Execute SQL String select * from dbo.xxx;
Log To Console ${output}
Disconnect From Database
And here is the error message:
OperationalError: (20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (localhost)\nNet-Lib error during Unknown error (10061)\nDB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (localhost)\nNet-Lib error during Unknown error (10061)\n')
I have read elsewhere that this error means that my Pymssql just can't find the server, but I've seen Pymssql not throw these errors before in other tutorials. It just connects right away. Anybody got any ideas on this one? I'd really appreciate the help.

SQL Server Machine Learning Services - Unable to launch the runtime. ErrorCode 0x80070032: 50(The request is not supported.)

Trying to configure MLS on SQL Server 2017, but when running a very basic external script like so:
EXEC sp_execute_external_script #language =N'R',
#script=N'OutputDataSet <- InputDataSet;',
#input_data_1 =N'SELECT 1 AS hello'
WITH RESULT SETS (([hello] int not null));
GO
I get this error:
Msg 39021, Level 16, State 1, Line 1
Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime.
Msg 39019, Level 16, State 2, Line 1
An external script error occurred:
Unable to launch the runtime. ErrorCode 0x80070032: 50(The request is not supported.).
And if I look at the log EXTLAUNCHERRORLOG I see:
2020-12-29 17:53:49.554 SetCpuRateCap failed with error code 0x80070032.
I can't find a reference to this error anywhere, and am very perplexted. Tried all kinds of things (checking permissions, turning the resource governor off, updating to latest CU, reinstalling MLS, etc). We have a similar server that is running on same Azure platform (same size, W2012R2, same memory/cpu config), configured about the same time and it seems to not have this issue. This happens with both R and Python services.
Any help would be appreciated.
I have a solution we used today changing from R 3.3.3 and python 3.5.2 to R 3.5.2 and Python 3.7.1.
SQL 2017 CU22 installs the higher value of R & Python, so you have to run an exe to tell SQL to use the higher R & Python versions that were installed on disk.
The fix that worked for us :
(1) Create a new directory e.g. D:\MLSTEMP
(2) Create subdirectories D:\MLSTEMP\ < SQL_instance >00 and D:\MLSTEMP\ < SQL_instance >01
(3) Make sure the local MSSQLLaunchpad service, Everyone group & SQL service account has full access to both the D:\MLSTEMP and the sub dirs.
Note : the < > brackets are not part of the directory name
Note: launchpad service name is : NTService\MSSQLLaunchpad$ < instance_name >
(4) Go to your
D:\Program Files\Microsoft SQL Server\MSSQL14.SQL001\MSSQL\Binn\pythonlauncher.config
and
D:\Program Files\Microsoft SQL Server\MSSQL14.SQL001\MSSQL\Binn\rlauncher.config
files and alter the WORKING_DIRECTORY setting in each file to be WORKING_DIRECTORY=D:\MLSTEMP
(5) Restart the MSSQLLaunchpad service on the box.
Interestingly, the ****01 directory is the one that's used, not the ****00 dir.
It should now work. You may have to play with permissions a bit.
HTH.

Trying to install SQL Server 2012 on win 7. Its a 64-bit machine. I get the following error

TITLE: Microsoft SQL Server 2012 Setup
The following error has occurred:
An error occurred during the installation of assembly 'Microsoft.VC80.ATL, version="8.0.50727.6229", publicKeyToken="1fc8b3b9a1e18e3b", processorArchitecture="x86",type="win32"'.
Please refer to Help and Support for more information.
HRESULT: 0x80070422.
The problem was with Windows update.The "Windows Module installer" service was disabled once i enabled it and cleared up all the updates in C:\Windows\software distribution folder, it started updating and when i install the sqlserver-2012 i dint get that error anymore.
This is where i found about the service.
https://answers.microsoft.com/en-us/windows/forum/all/windows-update-error-80070422/372f6482-ff7c-4f92-858c-228b637bfae4

How to configure pgadmin4 (PostgreSQL)

When I finished installation postgresql-10.5 and ran pgadmin4 (that came installed with postgresql) I get a configuration error that says:
An error occurred initializing the application server:
Failed to launch application server, server thread existing
It then asks me to input a python path and an application path.
Can anybody help me and and advise what to do to run pgadmin4. I tried find problem solution, but nothing helped me(

Getting Error 2337 while installing SQL Server 2014 on Windows 10

Can someone please help me, I am stuck with an error message saying "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2337" When I click on more details, It shows the source of the error is file called setup.rll
The installation fails at the "Installation Progress" level which is the second last step of the of the installation steps
I have tried researching and some sites suggest that I go to C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\SQLServer2014 and rename the setup.rll file. But when I navigate to this location The Setup Bootstrap does not contain the SQLServer2014 folder.
The strange thing is that I was able to install SQL Server on another 2 other machines. I just dont know what is wrong with my machine.
Thank you in advance for your brilliant replies.

Resources