[
https://issues.apache.org/jira/browse/NIFI-5556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Grey updated NIFI-5556:
----------------------------
Description:
Recently I have been performing remote JVM debugging on a number of NiFi
components -- core instances, etc. Currently, to enable/disable JVM debugging
requires manually modifying the {{bootstrap.conf}} file or the {{*.sh}} file
and (un)commenting/adding the following line(s):
*bootstrap.conf*
{code}
java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
{code}
I propose we decide on a standard command-line flag or environment variable
which can be set to enable/disable JVM debugging (and optional flag/variable to
enable/disable *suspend*) in order to make this easier for developers.
My suggestion is to follow a pattern like Kafka uses, as proposed in [this
StackOverflow answer|https://stackoverflow.com/a/52021140/70465].
This can be copied to NiFi Registry, MiNiFi Java, etc.
was:
Recently I have been performing remote JVM debugging on a number of NiFi
components -- core instances, TLS toolkit, etc. Currently, to enable/disable
JVM debugging requires manually modifying the {{bootstrap.conf}} file or the
{{*.sh}} file and (un)commenting/adding the following line(s):
*bootstrap.conf*
{code}
java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
{code}
*tls-toolkit.sh*
{code}
# exec "${JAVA}" -cp "${CLASSPATH}" ${JAVA_OPTS:--Xms12m -Xmx24m}
org.apache.nifi.toolkit.tls.TlsToolkitMain "$@"
exec "${JAVA}" -cp "${CLASSPATH}" ${JAVA_OPTS:--Xms12m -Xmx24m}
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
org.apache.nifi.toolkit.tls.TlsToolkitMain "$@"
{code}
I propose we decide on a standard command-line flag or environment variable
which can be set to enable/disable JVM debugging (and optional flag/variable to
enable/disable *suspend*) in order to make this easier for developers.
My suggestion is to follow a pattern like Kafka uses, as proposed in [this
StackOverflow answer|https://stackoverflow.com/a/52021140/70465].
This can be copied to NiFi Registry, MiNiFi Java, etc.
> Expose JVM debugging via command-line argument
> ----------------------------------------------
>
> Key: NIFI-5556
> URL: https://issues.apache.org/jira/browse/NIFI-5556
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Configuration, Tools and Build
> Affects Versions: 1.7.1
> Reporter: Andy LoPresto
> Assignee: Troy Melhase
> Priority: Major
> Labels: debug, jvm, toolkit
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Recently I have been performing remote JVM debugging on a number of NiFi
> components -- core instances, etc. Currently, to enable/disable JVM debugging
> requires manually modifying the {{bootstrap.conf}} file or the {{*.sh}} file
> and (un)commenting/adding the following line(s):
> *bootstrap.conf*
> {code}
> java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
> {code}
> I propose we decide on a standard command-line flag or environment variable
> which can be set to enable/disable JVM debugging (and optional flag/variable
> to enable/disable *suspend*) in order to make this easier for developers.
> My suggestion is to follow a pattern like Kafka uses, as proposed in [this
> StackOverflow answer|https://stackoverflow.com/a/52021140/70465].
> This can be copied to NiFi Registry, MiNiFi Java, etc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)