Hello, currently mc-monitor is given the same host address as RCON however the query address and RCON address aren't always the same. My specific example is when using the TrueCharts minecraft-java chart, it's set up so that the game and query are accessible at myapp-minecraft-java and RCON is accessible at myapp-minecraft-java-rcon. Setting RCON_HOST to the non -rcon appended address results in RCON just failing to connect at all. This causes issues when PAUSE_IF_NO_PLAYERS is set, as mc-monitor can't query the game for player count on the RCON address. There is an open issue on the TrueCharts project about this https://github.com/truecharts/charts/issues/20831.
I did some testing myself and found that adding an environment variable for SERVER_HOST and editing backup-loop.sh by:
adding : "${SERVER_HOST:=RCON_HOST}" to line 32
editing the mc-monitor command on line 594 to use --host "${SERVER_HOST}"
Admittedly, I haven't tested this too extensively but by setting SERVER_HOST to RCON_HOST as a default value, not setting a value for SERVER_HOST shouldn't change any functionality from how it works now.
I can open a draft pull request if necessary to better show these changes.
Hello, currently
mc-monitor
is given the same host address as RCON however the query address and RCON address aren't always the same. My specific example is when using the TrueChartsminecraft-java
chart, it's set up so that the game and query are accessible atmyapp-minecraft-java
and RCON is accessible atmyapp-minecraft-java-rcon
. SettingRCON_HOST
to the non-rcon
appended address results in RCON just failing to connect at all. This causes issues whenPAUSE_IF_NO_PLAYERS
is set, asmc-monitor
can't query the game for player count on the RCON address. There is an open issue on the TrueCharts project about this https://github.com/truecharts/charts/issues/20831.I did some testing myself and found that adding an environment variable for
SERVER_HOST
and editingbackup-loop.sh
by:: "${SERVER_HOST:=RCON_HOST}"
to line 32mc-monitor
command on line 594 to use--host "${SERVER_HOST}"
Admittedly, I haven't tested this too extensively but by setting
SERVER_HOST
toRCON_HOST
as a default value, not setting a value forSERVER_HOST
shouldn't change any functionality from how it works now.I can open a draft pull request if necessary to better show these changes.