Troubleshooting
Problem
You are trying to deploy R script as web service in WML, in that script you have function with calling of data source that uses dsxCoreUtilsR library. You are getting Token Not Found error in the deployment pod log.
R script:
finstatadhoc <- function(args) {
library(dsxCoreUtilsR)
library(RJDBC)
data_source_FS <<- getDataSourceInfo('db2wh')
return(data_source_FS$user)
}
Symptom
Logs from the deployment pod
time="2020-07-31T11:57:58Z" level=info msg=Alias currAlias=/dsx-get-static-content
time="2020-07-31T11:57:58Z" level=info msg=" static handle - creating serving route" currAlias=/dsx-get-static-content dir=/user-home/publishedContent/^^all_auth/
time="2020-07-31T11:57:58Z" level=info msg=Alias currAlias=/modelgroup
INFO [2020-07-31 11:58:01] Starting plumber http server in PROD environment
Loading required package: openssl
Loading required package: methods
Loading required package: DBI
Loading required package: rJava
Error in getToken() : Token Env Not Found
Calls: plumb ... getDataSourceInfo -> getDataSourceInfoImpl -> getToken
Execution halted
Status of deployment pod
[root@e1231-master-1 ~]# kubectl get po -n dsx | grep abc
abcdeploy-rscript-abcwmlws-68dc966ffb-h4qfc 0/1 CrashLoopBackOff 5 4m30s
Cause
Since the DSX_token
isn't exposed in to Renviron
during R script web service deployment setup, you are getting the error. It is required for accessing remote dataset.
Environment
Watson Studio Local (1.2.3.1 with Patch 11)
Resolving The Problem
This issue is fixed in WSL (1.2.3.3) patch 02 , here is the workaround
- Via cluster console, add
after line 74. (Note: Useecho "DSX_TOKEN='${DSX_TOKEN}'" >> /usr/lib/R/etc/Renviron in /user-home/.scripts/system/spawner/deployments/startup-r-server.sh
for WSL (1.2.3.3) or newer.echo "DSX_TOKEN='${DSX_TOKEN}'" >> $R_HOME/etc/Renviron
- In WSL via browser, disable & enable the web service.
Document Location
Worldwide
[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSHGWL","label":"IBM Watson Studio Local"},"ARM Category":[{"code":"a8m0z000000bnmIAAQ","label":"Scoring and Development->Asset as a Web Service"}],"ARM Case Number":"TS003991251","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.2.0"}]
Was this topic helpful?
Document Information
More support for:
IBM Watson Studio Local
Component:
Scoring and Development->Asset as a Web Service
Software version:
1.2.0
Document number:
6332419
Modified date:
18 September 2020
UID
ibm16332419