Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor
OS: Windows
main batch Script: sample_Import_Load.bat
@Former Member off && pushd "%~dp0" && setlocal
call "C:\Program Files\CARIS\BASE Editor\5.5\system\caris_env.bat"
call "C:\sample_Testing\1_XYZ\import-points-loop.bat"
set pythonpath=c:\Program Files\CARIS\BASE Editor\5.5\python\3.5
python "C:\sample_Testing\2_Coverages_Upload\coverage_loader_sample.py" -L dba/sql@localhost -D sample_TEST -o surfac -t .csar -f "C:\sample_Testing\2_Coverages_Upload" -m "C:\sample_Testing\2_Coverages_Upload\Sample_Meta.csv" -v
popd && endlocal
pause
Nested batch script: Import-points-loop.bat
@Former Member off && pushd "%~dp0" && setlocal
call "C:\Program Files\CARIS\BASE Editor\5.5\system\caris_env.bat"
FOR %%f in (*.xyz) do (
carisbatch --run ImportPoints --input-format ASCII --input-crs EPSG:3395 --output-crs EPSG:32659 --info-file "C:\sample_Testing\1_XYZ\Example.info" "%%~nf.xyz" "C:\sample_Testing\2_Coverages_Upload\%%~nf.csar"
)
popd && endlocal
REM pause
Python Call Code snippet:
""" This script can be executed to load a coverage file into a BDB Server database and optionally being able to load related metadata from a CSV file """
import argparse
import sys
import os
import getpass
import csv
# Attempt to import CARIS modules
try:
import caris.bathy.db as bdb
import caris.coverage
import caris
except ImportError as e:
if "No module named" in str(e):
print('Error importing CARIS modules. Is the PYTHONPATH variable configured with the path to the installed CARIS Python modules?')
sys.exit(1)
raise e
...
When I execute this batch Script from a windows command prompt. i.e., C:\windows\system32\cmd.exe\sample_Import_Load.bat
everything works correctly, but when I execute the script from within Nifi's ExecuteStreamCommand 1.19.1
I get a message "Unknown process name "ImportPoints" ERROR: No such feature is available on the license server." in the List Queue and the process aborts.
When I view the content in List Queue, I get a message "No such feature is available on the license server." = SNTL_NO_SUCH_FEATURE
RMS explains this error as "The requested feature does not exist on the License Manager host Diagnose further for locking mismatch and similar issues to understand why the license failed to load"
CARIS Support is saying that Apache Nifi is causing this issue, they asked mr to confirm that the Sentinel License Server default port is open, which I did.
ExecuteStreamCommand
Property Value
Command Arguments Strategy: Commmand Arguments Property
Command Arguments: /C C:\Temp\sample_Import_Load.bat
Ignore STDIN: false
Working Directory: No value set
Does anyone know what would cause the execution of the sample_Import_Load.bat to run correctly from the windows command prompt, but fail when executed via the ExecuteStreamCommand processor with these errors?
Thanks

