How to peer to a new domain?
There are times when you may want to take any number of hosts from Domain A and Peer to Domain B. The most common example is moving hosts between development environments. By default our Durable Domain state will prevent this from happening because the new host is a known entity in the currently defined domain.

The typical error message that is received in the agent log on the peering host is:

SEVERE PeerService$EntryListener.messageArrived (serv-socket5-thread-2)
Failed to set ServerStateUUID
java.lang.IllegalArgumentException: UUID was already set


To resolve this execute the following:

Ensure that your host's default.properties files is updated with the new peer value (IP or DNS).

Stop / Start the nuoagent service with the --reset-broker-state flag.
It's important that you do this only once otherwise you will be resetting your domain state with each restart.

$ sudo service nuoagent stop

$ sudo service nuoagent start --reset-broker-state