mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 22:02:28 +00:00
Separated JMX_BINDING from JMX_HOST in ENABLE_JMX usage
This commit is contained in:
parent
c056b9d2dd
commit
d47c801b18
2 changed files with 6 additions and 5 deletions
|
@ -1150,9 +1150,11 @@ For some cases, if e.g. after removing mods, it could be necessary to startup mi
|
|||
|
||||
### Enable Remote JMX for Profiling
|
||||
|
||||
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true` and add a port forwarding of TCP port 7091, such as:
|
||||
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true`, set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
|
||||
|
||||
-e ENABLE_JMX=true -p 7091:7091
|
||||
```
|
||||
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
|
||||
```
|
||||
|
||||
### Enable Aikar's Flags
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ if [ -n "$JVM_DD_OPTS" ]; then
|
|||
fi
|
||||
|
||||
if isTrue ${ENABLE_JMX}; then
|
||||
: ${JMX_HOST:=0.0.0.0}
|
||||
: ${JMX_PORT:=7091}
|
||||
JVM_OPTS="${JVM_OPTS}
|
||||
-Dcom.sun.management.jmxremote.local.only=false
|
||||
|
@ -92,8 +91,8 @@ if isTrue ${ENABLE_JMX}; then
|
|||
-Dcom.sun.management.jmxremote.rmi.port=${JMX_PORT}
|
||||
-Dcom.sun.management.jmxremote.authenticate=false
|
||||
-Dcom.sun.management.jmxremote.ssl=false
|
||||
-Dcom.sun.management.jmxremote.host=${JMX_HOST}
|
||||
-Djava.rmi.server.hostname=${JMX_HOST}"
|
||||
-Dcom.sun.management.jmxremote.host=${JMX_BINDING:-0.0.0.0}
|
||||
-Djava.rmi.server.hostname=${JMX_HOST:-localhost}"
|
||||
|
||||
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue