<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372570#M241285</link>
    <description>&lt;P&gt;Still wait for an answer Vidya.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 21:00:50 GMT</pubDate>
    <dc:creator>Fredb</dc:creator>
    <dc:date>2023-06-13T21:00:50Z</dc:date>
    <item>
      <title>Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372261#M241197</link>
      <description>&lt;DIV class="lia-note-subject"&gt;Environment&lt;/DIV&gt;&lt;DIV class="lia-note-description"&gt;&lt;DIV class="lia-note-body"&gt;&lt;P&gt;OS: &lt;STRONG&gt;Windows&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;main batch Script:&lt;/STRONG&gt;&lt;/U&gt; sample_Import_Load.bat&lt;/P&gt;&lt;P&gt;@Former Member off &amp;amp;&amp;amp; pushd "%~dp0" &amp;amp;&amp;amp; setlocal&lt;/P&gt;&lt;P&gt;call "C:\Program Files\CARIS\BASE Editor\5.5\system\caris_env.bat"&lt;/P&gt;&lt;P&gt;call "C:\sample_Testing\1_XYZ\import-points-loop.bat"&lt;/P&gt;&lt;P&gt;set pythonpath=c:\Program Files\CARIS\BASE Editor\5.5\python\3.5&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;popd &amp;amp;&amp;amp; endlocal&lt;BR /&gt;pause&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Nested batch script:&lt;/STRONG&gt;&lt;/U&gt; Import-points-loop.bat&lt;BR /&gt;&lt;BR /&gt;@Former Member off &amp;amp;&amp;amp; pushd "%~dp0" &amp;amp;&amp;amp; setlocal&lt;/P&gt;&lt;P&gt;call "C:\Program Files\CARIS\BASE Editor\5.5\system\caris_env.bat"&lt;/P&gt;&lt;P&gt;FOR %%f in (*.xyz) do (&lt;BR /&gt;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"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;popd &amp;amp;&amp;amp; endlocal&lt;BR /&gt;REM pause&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Python Call Code snippet:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;""" 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 """&lt;BR /&gt;import argparse&lt;BR /&gt;import sys&lt;BR /&gt;import os&lt;BR /&gt;import getpass&lt;BR /&gt;import csv&lt;/P&gt;&lt;P&gt;# Attempt to import CARIS modules&lt;BR /&gt;try:&lt;BR /&gt;import caris.bathy.db as bdb&lt;BR /&gt;import caris.coverage&lt;BR /&gt;import caris&lt;BR /&gt;except ImportError as e:&lt;BR /&gt;if "No module named" in str(e):&lt;BR /&gt;print('Error importing CARIS modules. Is the PYTHONPATH variable configured with the path to the installed CARIS Python modules?')&lt;BR /&gt;sys.exit(1)&lt;BR /&gt;raise e&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;&lt;BR /&gt;When I execute this batch Script from a windows command prompt. i.e., &lt;STRONG&gt;C:\windows\system32\cmd.exe\sample_Import_Load.bat&lt;/STRONG&gt;&lt;BR /&gt;everything works correctly, but when I execute the script from within Nifi's ExecuteStreamCommand 1.19.1&lt;/P&gt;&lt;P&gt;I get a message &lt;STRONG&gt;"Unknown process name "ImportPoints" ERROR: No such feature is available on the license server."&lt;/STRONG&gt; in the List Queue and the process aborts.&lt;/P&gt;&lt;P&gt;When I view the content in List Queue, I get a message "&lt;STRONG&gt;No such feature is available on the license server&lt;/STRONG&gt;." = SNTL_NO_SUCH_FEATURE&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.sentinel.thalesgroup.com/softwareandservices/RMS/RMSDocumentation/APIREF/Content/Unified_API_Error_Code.htm" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.sentinel.thalesgroup.com/softwareandservices/RMS/RMSDocumentation/APIREF/Content/Unifie...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;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"&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ExecuteStreamCommand&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Property Value&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Command Arguments Strategy: Commmand Arguments Property&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Command Arguments: /C C:\Temp\sample_Import_Load.bat&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Ignore STDIN: false&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Working Directory: No value set&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Jun 2023 15:09:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372261#M241197</guid>
      <dc:creator>Fredb</dc:creator>
      <dc:date>2023-06-07T15:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372282#M241203</link>
      <description>&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;We attempted to bundle the execute of the&amp;nbsp;&lt;EM&gt;sample_Import_Load.bat call into a PowerShell script, and then use the ExecuteStreamCommand processor to execute the PowerShell script. &amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Findings:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The PowerShell script executed from the windows command prompt&amp;nbsp;&lt;/EM&gt;&lt;I&gt;without issue, but the execution from the PowerShell script from the Processor Failed with the same error:&amp;nbsp;&lt;STRONG&gt;ERROR: No such feature is available on the license server."&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Could the issue be the windows account that the Nifi service is running under?&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 22:33:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372282#M241203</guid>
      <dc:creator>Fredb</dc:creator>
      <dc:date>2023-06-07T22:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372315#M241216</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105371"&gt;@Fredb&lt;/a&gt;&amp;nbsp;Welcome to our community! To help you get the best possible answer, I have tagged our NiFi experts&amp;nbsp; &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/103151"&gt;@cotopaul&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 10:53:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372315#M241216</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2023-06-08T10:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372570#M241285</link>
      <description>&lt;P&gt;Still wait for an answer Vidya.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 21:00:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372570#M241285</guid>
      <dc:creator>Fredb</dc:creator>
      <dc:date>2023-06-13T21:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372575#M241289</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;Any insights here? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 00:23:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372575#M241289</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-06-14T00:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Batch Script runs from the command prompt, but fails to run in the ExecuteStreamCommand Processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372608#M241307</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105371"&gt;@Fredb&lt;/a&gt;&amp;nbsp; This is a very difficult one to solve.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;&lt;STRONG&gt;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?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is most likely caused by permission issues.&amp;nbsp; &amp;nbsp; Nifi requires specific permissions against files and scripts it touches or executes from within processors.&amp;nbsp; As such, the error is saying the processor does not know where any of the resources exist to run that .bat file.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I do not have any experience with nifi on windows, other than to avoid it, but the solution is likely the same as other operating systems.&amp;nbsp; &amp;nbsp;Make sure the nifi user has full ownership of the file(s).&amp;nbsp; &amp;nbsp;Additionally, it is sometimes possible to find deeper errors looking at the nifi-app.log file while testing and/or setting the log level of the processor to be more aggressive.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 14:10:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Windows-Batch-Script-runs-from-the-command-prompt-but-fails/m-p/372608#M241307</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2023-06-14T14:10:49Z</dc:date>
    </item>
  </channel>
</rss>

