![]() | ![]() | ![]() | ![]() | ![]() |
When you run SAS® 9.4 in Microsoft Windows operating environments, the SAS Web Application Server tcruntime-ctl.bat script produces unexpected output when it is executed. You do not encounter this issue in other operating environments.
This problem happens under the following circumstances:
When the problem occurs, SAS® Deployment Manager configuration tasks that use this script fail with the following error in the Configuration Failure dialog box:
In addition, the configuration log that is referenced by the SAS Deployment Manager error dialog box displays the following text:
To confirm that you are affected, open a command prompt and execute the tcruntime-ctl.bat script in the C:\SAS-configuration-directory\LevN\Web\WebAppServer\SASServerX_Y\bin\ directory, where SASServerX_Y denotes any SAS Web Application Server instance. You are affected by this problem if the following output appears in the prompt:
Derived instance name: SASServerX_Y " LSS 1.6 ( was unexpected at this time.
There are two possible workarounds, and you can choose which one to implement.
Workaround 1
Complete the following instructions:
Copy and paste the program from the Full Code tab of this SAS Note into Notepad and save it as update_tcruntime_ctl_bat.ps1.
Copy the update_tcruntime_ctl_bat.ps1 script to the SASHOME\SASWebApplicationServer\9.4 directory.
In PowerShell, with elevated privileges (Run as Administrator), navigate to SASHOME\SASWebApplicationServer\9.4\.
Run the following command:
.\update_tcruntime_ctl_bat.ps1
Note: The script creates a backup copy of the original tcruntime-ctl.bat file with a date-time stamp in the file name. This script also modifies the tcruntime-ctl.bat script so that it points to the updated SAS Private JRE.
If you received the error when you were performing configuration tasks using SAS Deployment Wizard or when you were administering SAS using SAS Deployment Manager, click Retry in the error dialog box described above. If you received the "LSS 1.6 ( was unexpected at this time" error when you ran the tcruntime-ctl.bat script, then you need to run the updated tcruntime-ctl.bat file again.
After you perform these steps, the tcruntime-ctl.bat file should work properly for all SAS Web Application Server instances configured on this machine.
Workaround 2
Complete the following instructions:
set JAVA_VERSION=%JAVA_VERSION:~14,3%
set JAVA_VENDOR=%JAVA_VERSION:~0,7%
if "%JAVA_VENDOR%" == "openjdk" (
set JAVA_VERSION=%JAVA_VERSION:~17,3%
) else (
set JAVA_VERSION=%JAVA_VERSION:~14,3%
)
After you perform these steps, the tcruntime-ctl.bat file should work properly for all SAS Web Application Server instances configured on this machine.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS Web Application Server | Microsoft® Windows® for x64 | 9.4 TS1M3 |
<# BEGIN CODE #>
<#
.SYNOPSIS
This script changes the JAVA_VERSION logic in tcruntime-ctl.bat
in order to fix the problem described in SAS Note http://support.sas.com/kb/62/222.html
.DESCRIPTION
This optional script is run one time to fix the problem in
http://support.sas.com/kb/62/222.html. This script needs to be saved in
...SASHOME\SASWebApplicationServer\9.4\ because it uses the current directory
to find tcruntime-ctl.bat. It checks if the file exist. Then checks that
it is not already updated. It makes a backup of.\tcruntime-ctl.bat in the
same directory. Finally, it runs the Set-Tcruntimebat function that
changes the JAVA_VERSION logic. Check the SAS note for more
details or updates. It is possible to make the change manually without this script.
An example path where you should save update_tcruntime_ctl_bat.ps1 is
C:\Program Files\SASHome\SASWebApplicationServer\9.4
.NOTES
Requirment : Save this script in ...SASHOME\SASWebApplicationServer\9.4\
File Name : update_tcruntime_ctl_bat.ps1
Author : SAS Technical Support
#>
Function Write-PopupBox($title,$box)
{
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("$box",0,"$title",0x1)
exit #the script stops running
}
Function Set-Tcruntimebat ($filename)
{
$orginal_string=@'
set JAVA_VERSION=%JAVA_VERSION:~14,3%
'@
$new_string=@'
set JAVA_VENDOR=%JAVA_VERSION:~0,7%
if "%JAVA_VENDOR%" == "openjdk" (
set JAVA_VERSION=%JAVA_VERSION:~17,3%
) else (
set JAVA_VERSION=%JAVA_VERSION:~14,3%
)
'@
( Get-Content $filename) | ForEach-Object {$_ -replace $orginal_string, $new_string} | Set-Content -Path $filename
Write-Host "$filename was updated "
Write-PopupBox "File updated" "$filename was updated "
}
Function Test-PathTcruntime($filename)
{
If (Test-Path -Path $filename -PathType Leaf)
{
return $true
}
Write-Host "Error: $filename cannot be found"
Write-PopupBox "Error" "$filename cannot be found"
}
Try {
$tcruntime_ctl_bat=".\tcruntime-ctl.bat"
Test-PathTcruntime($tcruntime_ctl_bat)
# The string "17,3" will only be in tcruntime-ctl.bat if it has already been updated.
# Checking for "17,3" and stopping if it is found
If (Get-Content $tcruntime_ctl_bat | Select-String "17,3")
{
Write-PopupBox "NOTE" "$tcruntime_ctl_bat was previously updated -- No change was made"
}
$tcruntime_ctl_bat_backupname = Get-ChildItem($tcruntime_ctl_bat) | % { $_.basename + "_" + (Get-Date -UFormat %Y%m%d%H%m%S) + $_.extension + ".bck"}
Copy-Item $tcruntime_ctl_bat -Destination $tcruntime_ctl_bat_backupname -errorAction SilentlyContinue
Test-PathTcruntime($tcruntime_ctl_bat_backupname)
Set-Tcruntimebat($tcruntime_ctl_bat)
}
Catch { Write-PopupBox "Error" "There was an error running the script.
Make sure you saved it in the correct location and
you have permissions to edit tcruntime-ctl.bat" }
<# END CODE #>
Type: | Problem Note |
Priority: | high |
Date Modified: | 2018-12-03 14:01:53 |
Date Created: | 2018-04-26 17:53:49 |