HeartbeatSaver: Difference between revisions
No edit summary |
mNo edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[HeartbeatSaver]] is a utility, bundled with fCraft 0.633+, that serves as a standalone heartbeat server. It runs separately from fCraft process and reads information from a file ( | [[HeartbeatSaver]] is a utility, bundled with fCraft {{Changelog|0.633}}+, that serves as a standalone heartbeat server. It runs separately from fCraft process and reads information from a file (<code>heartbeatdata.txt</code>). This allows your server to keep its uptime on Minecraft.net even when your fCraft server process needs to be restarted/shutdown. | ||
When you disable fCraft's built-in heartbeat (from the Advanced tab of ConfigGUI, or by setting [[List of config keys#Advanced|HeartbeatEnabled config key]] to "false"), fCraft will start writing <code>heartbeatdata.txt</code> to disk, in fCraft's working directory. | When you disable fCraft's built-in heartbeat (from the Advanced tab of ConfigGUI, or by setting [[List of config keys#Advanced|HeartbeatEnabled config key]] to "false"), fCraft will start writing <code>heartbeatdata.txt</code> to disk, in fCraft's working directory. | ||
| Line 8: | Line 8: | ||
==Usage== | ==Usage== | ||
:'''<code>HeartbeatSaver</code>''' | |||
::Assumes that <code>heartbeatdata.txt</code> is in the working directory | |||
:'''<code>HeartbeatSaver "Path/To/heartbeatdata.txt"</code>''' | :'''<code>HeartbeatSaver "Path/To/heartbeatdata.txt"</code>''' | ||
::Specifies path to the text file with heartbeat data (including the filename) explicitly. | |||
==heartbeatdata.txt format== | ==heartbeatdata.txt format== | ||
Usually you don't need to mess with heartbeatdata.txt yourself. fCraft server will generate this for you every minute or so. | Usually you don't need to mess with <code>heartbeatdata.txt</code> yourself. fCraft server will generate this for you every minute or so. | ||
Line 01: Salt | Line 01: Salt | ||
Line 02: InternalIP | Line 02: InternalIP | ||
| Line 19: | Line 23: | ||
Line 06: Server name | Line 06: Server name | ||
Line 07: IsPublic flag ("true" or "false") | Line 07: IsPublic flag ("true" or "false") | ||
Line 08: | Line 08: HeartbeatUrl | ||
For example: | For example: | ||
MuXCwxhDCNz9BIz6aBDlNYXWWhypWwvA | MuXCwxhDCNz9BIz6aBDlNYXWWhypWwvA | ||
| Line 30: | Line 33: | ||
Custom Minecraft Server (fCraft) | Custom Minecraft Server (fCraft) | ||
False | False | ||
https://minecraft.net/heartbeat.jsp | |||
==HeartbeatSaver.exe exit codes== | ==HeartbeatSaver.exe exit codes== | ||
| Line 50: | Line 51: | ||
|2 | |2 | ||
|HeartbeatDataReadingError | |HeartbeatDataReadingError | ||
|Could not read heartbeat data at startup. Make sure that a valid path is given, and that the file is in correct format. If reading fails at any point AFTER the initial data is loaded, an error is printed in stderr, but HeartbeatSaver | |Could not read heartbeat data at startup. Make sure that a valid path is given, and that the file is in correct format. If reading fails at any point AFTER the initial data is loaded, an error is printed in stderr, but HeartbeatSaver keeps running and trying. | ||
|} | |} | ||
[[Category:Tools]] | [[Category:Tools]] | ||
Latest revision as of 21:39, 15 October 2013
HeartbeatSaver is a utility, bundled with fCraft 0.633+, that serves as a standalone heartbeat server. It runs separately from fCraft process and reads information from a file (heartbeatdata.txt). This allows your server to keep its uptime on Minecraft.net even when your fCraft server process needs to be restarted/shutdown.
When you disable fCraft's built-in heartbeat (from the Advanced tab of ConfigGUI, or by setting HeartbeatEnabled config key to "false"), fCraft will start writing heartbeatdata.txt to disk, in fCraft's working directory.
HeartbeatSaver only works as long as its external IP address is exactly same as your server's. That means it'll always work when ran from the same machine that fCraft is on, and it will usually work from another machine on the same LAN. Heartbeat saver does not depend on any other fCraft files/libraries, and does not need to be in the same directory as the rest of your fCraft installation.
fCraft's automatic updater (UpdateInstaller) does not include HeartbeatSaver. If an update to HeartbeatSaver is ever released, it will need to be installed manually.
Usage
HeartbeatSaver- Assumes that
heartbeatdata.txtis in the working directory
- Assumes that
HeartbeatSaver "Path/To/heartbeatdata.txt"- Specifies path to the text file with heartbeat data (including the filename) explicitly.
heartbeatdata.txt format
Usually you don't need to mess with heartbeatdata.txt yourself. fCraft server will generate this for you every minute or so.
Line 01: Salt
Line 02: InternalIP
Line 03: Port
Line 04: Player count
Line 05: Max players
Line 06: Server name
Line 07: IsPublic flag ("true" or "false")
Line 08: HeartbeatUrl
For example:
MuXCwxhDCNz9BIz6aBDlNYXWWhypWwvA 0.0.0.0 25565 0 20 Custom Minecraft Server (fCraft) False https://minecraft.net/heartbeat.jsp
HeartbeatSaver.exe exit codes
| Code | Meaning | Notes |
|---|---|---|
| 0 | Success | HeartbeatSaver never exits, so you should never normally encounter this code |
| 1 | UsageError | Required command-line arguments were missing, or an error occurred while trying to parse options. |
| 2 | HeartbeatDataReadingError | Could not read heartbeat data at startup. Make sure that a valid path is given, and that the file is in correct format. If reading fails at any point AFTER the initial data is loaded, an error is printed in stderr, but HeartbeatSaver keeps running and trying. |