We are trying to inject a Java agent into the start file of Apache Nifi (run-nifi.bat). Based from the Application Environment Configuration for a Java Application, below configuration string must be added to all JVMs -
- which in this case we assume is the batch command file.
However when it is added in the run-nifi.bat batch command file, we get the following prompt:
The input line is too long
Attached is the actual file. run-nifi.txt
I'll research this prompt in the web, seems a limitation of Windows batch command. However I would also like to know if anyone else has experienced this and able to find a workaround?
Thanks in advance.
Could it be related to ordering?
SET JAVA_PARAMS=-cp %CONF_DIR%;%LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.bootstrap.RunNiFi
cmd.exe /K "%JAVA_EXE%" %JAVA_PARAMS% %DYNA_ARGS% %BOOTSTRAP_ACTION%
It looks like you're applying the dynatrace arguments in the wrong order.
Maybe try this:
SET JAVA_PARAMS=-cp %CONF_DIR%;%LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% %DYNA_ARGS% org.apache.nifi.bootstrap.RunNiFi
cmd.exe /K "%JAVA_EXE%" %JAVA_PARAMS% %BOOTSTRAP_ACTION%