Skip to content

[To rel/1.0] [IOTDB-5047] Fix iotdb.jmx.port missing from data-env.sh#8240

Merged
Beyyes merged 2 commits intoapache:rel/1.0from
MiniSho:test
Nov 30, 2022
Merged

[To rel/1.0] [IOTDB-5047] Fix iotdb.jmx.port missing from data-env.sh#8240
Beyyes merged 2 commits intoapache:rel/1.0from
MiniSho:test

Conversation

@MiniSho
Copy link
Copy Markdown
Contributor

@MiniSho MiniSho commented Nov 29, 2022

Add JMX_PORT to system properties in data-env.sh/bat
ConfigNode:
0c85b466fe5c01579ee3e66210f532e

DataNode:
1417e2f7ccdc1f2ff337331f0117f89

@jixuan1989
Copy link
Copy Markdown
Member

Only when JMX_LOCAL=false, the port can be set.

@jixuan1989
Copy link
Copy Markdown
Member

A simple solution:

Change IOTDB_JMX_PORT from "iotdb.jmx.port" to "com.sun.management.jmxremote.port"
then there is no need to modify the scripts.

-  public static final String IOTDB_JMX_PORT = "iotdb.jmx.port";
+  public static final String IOTDB_JMX_PORT = "com.sun.management.jmxremote.port";

@jixuan1989
Copy link
Copy Markdown
Member

Besides, the StartChecker is incorrect as even when we start a confignode, it also says ".....datanode-env.sh"

@jixuan1989
Copy link
Copy Markdown
Member

A simple solution:

Change IOTDB_JMX_PORT from "iotdb.jmx.port" to "com.sun.management.jmxremote.port" then there is no need to modify the scripts.

-  public static final String IOTDB_JMX_PORT = "iotdb.jmx.port";
+  public static final String IOTDB_JMX_PORT = "com.sun.management.jmxremote.port";

Better solution:

set JMX_LOCAL as a variable to IoTDB (modify the -env scripts). Then in StartChecker.java, you should check whether the user wants to monitor JMX locally or open its remote port. In this way, we can give users more clear tips.

add 2 constants of node role; add a parament for checkJMXPort
Copy link
Copy Markdown
Member

@Beyyes Beyyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Beyyes Beyyes merged commit 8553d9e into apache:rel/1.0 Nov 30, 2022
@MiniSho MiniSho deleted the test branch December 2, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants