1

There was a planned cluster failover to the secondary node of our FCI. Afterwards, sp_execute_external_script stopped working. Examples with error messages are below:

EXEC sp_execute_external_script @script=N'print(R.version)',@language=N'R';
GO

Msg 39012, Level 16, State 14, Line 0 Unable to communicate with the
runtime for 'R' script for request id:
4B918DE5-B534-4F35-8723-34F818536F68. Please check the requirements of
'R' runtime. STDERR message(s) from external script:

SQLSatellite Run() failed. Error code:0x80004004. Error in eval(ei,
envir) : SQLSatellite Run() failed. Error code:0x80004004. Calls:
runScriptFile -> source -> withVisible -> eval -> eval -> .Call
Execution halted

EXEC sp_execute_external_script @script=N'import sys;print(sys.version)',@language=N'Python'
GO

Msg 39012, Level 16, State 14, Line 3 Unable to communicate with the
runtime for 'Python' script for request id:
D1397DA5-79FD-4C4A-891C-C01E436FA20F. Please check the requirements of
'Python' runtime. STDERR message(s) from external script:

SQLSatellite Run() failed. Error code:0x80004004. SqlSatelliteCall
error: SQLSatellite Run() failed. Error code:0x80004004. STDOUT
message(s) from external script: SqlSatelliteCall function failed.
Please see the console output for more information. Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\revoscalepy\computecontext\RxInSqlServer.py",
line 608, in rx_sql_satellite_call
rx_native_call("SqlSatelliteCall", params)
File "C:\Program Files\Python310\lib\site-packages\revoscalepy\RxSerializable.py", line 375, in rx_native_call
ret = px_call(functionname, params) RuntimeError: revoscalepy function failed.

Other notes that may or may not be relevant:

  • In my mind, the setup and configuration of R and Python is the same on both cluster nodes. (But I'm fallible.)
  • The logon account for the SQL Server Launchpad service is a domain account on both nodes (same account).
  • Whether it's R or Python, sp_execute_external_script runs for 60 seconds before erroring out.

I reviewed the documentation for the following two articles. I'm not seeing anything that is missing or out of order:
Install SQL Server 2022 Machine Learning Services (Python and R) on Windows
Known issues for Python and R in SQL Server Machine Learning Services

More documentation:
Create a login for SQLRUserGroup: This suggested there is supposed to be a login for SQLRUserGroup, which is a local machine group account. However, sp_execute_external_script works on the primary node. And there is no [NodeA\SQLRUserGroup] login. Nonetheless, I thought I'd try creating the [NodeB\SQLRUserGroup] for the secondary node. No additional permissions were granted to the login, and it is not a member of any server roles (except for [public])

USE [master]
CREATE LOGIN [NodeB\SQLRUserGroup] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO

My Question
What could be causing sp_execute_external_script to fail on the secondary node (NodeB)?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.