Skip to content

OF-3181: Allow static configuration of cluster node ID#3141

Open
guusdk wants to merge 1 commit intoigniterealtime:mainfrom
guusdk:OF-3181_Static-NodeID
Open

OF-3181: Allow static configuration of cluster node ID#3141
guusdk wants to merge 1 commit intoigniterealtime:mainfrom
guusdk:OF-3181_Static-NodeID

Conversation

@guusdk
Copy link
Member

@guusdk guusdk commented Feb 18, 2026

Previously, an Openfire server generated a new cluster node ID on every startup, causing the identifier to change after each restart. This commit ensures that a server reuses the same node ID over time by persisting the initially generated value.

The node ID is now stored in openfire.xml under a new property: clustering.nodeid

  • If the property does not exist at startup, a random node ID is generated and persisted.
  • If the property exists, its value is reused.

This allows administrators to optionally define stable, human-recognizable node IDs. When doing so, administrators are responsible for ensuring uniqueness across all cluster members.

This change also removes the concept of a "default" node ID. Since Openfire 4.4.0 (OF-1705), node IDs no longer change when joining a cluster, making the distinction between default and runtime IDs obsolete. As a result, there is now a single node ID per server.

As a functional consequence, the node ID is no longer available until after server initialization (it is no longer a static field). This is expected to have little to no practical impact, as the previous static value was not publicly accessible.

Previously, an Openfire server generated a new cluster node ID on every startup, causing the identifier to change after each restart. This commit ensures that a server reuses the same node ID over time by persisting the initially generated value.

The node ID is now stored in `openfire.xml` under a new property: `clustering.nodeid`

- If the property does not exist at startup, a random node ID is generated and persisted.
- If the property exists, its value is reused.

This allows administrators to optionally define stable, human-recognizable node IDs. When doing so, administrators are responsible for ensuring uniqueness across all cluster members.

This change also removes the concept of a "default" node ID. Since Openfire 4.4.0 (OF-1705), node IDs no longer change when joining a cluster, making the distinction between default and runtime IDs obsolete. As a result, there is now a single node ID per server.

As a functional consequence, the node ID is no longer available until after server initialization (it is no longer a static field). This is expected to have little to no practical impact, as the previous static value was not publicly accessible.
@guusdk
Copy link
Member Author

guusdk commented Feb 18, 2026

A related improvement to the Hazelcast plugin is in igniterealtime/openfire-hazelcast-plugin#124 - it helps to guard against using the same node ID value for more than one server in the cluster.

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.

1 participant