Peer cannot be discovered
From the master, we can run the discover using the cli tool with debug enabled to get further information:
bin ./opha-cli.exe act=discover url_base=http://poller username=xxxxxx password=xxxxxx debug=9
If there is any connectivity error, you can test the connectivity from the poller to the master using curl (This is an example with default credentials):
curl -k -d 'username=nmis&password=nm1888' -H 'DNT: 1' -H 'Accept: application/json' http://poller/omk/opCore/login
The response should be something like this:
{"message":"Authenticated as user nmis","ok":1}
If this is a login error, please review the credentials used are correct in the poller. You can check the file log/auth.log from the poller.
opHA cluster_id already exist!
Check the master and all other pollers nmis configuration for the cluster_id property. It can be found in nmis9/conf/Config.nmis. This one should be unique per server, so in case one of the pollers has a repeated one you can remove the property in the configuration file and nmis will generate a new one.
Please, notice that in case the server has nodes already, the nodes should be exported and imported again with localised_ids once the cluster_id was changed, as the nodes information won't have the same cluster_id attribute and they will be treated as remote nodes (They cannot be edited, or polled, as an example).
401 Error from the poller
opHA uses user/password to access the registry data from the poller, but once the poller has been discover, it uses a token for authentication. So, we should have enabled the authentication method "token" in the poller.
Check if in om/conf/opCommon.nmis we have:
'auth_method_X' => 'token',
Configuring a poller over https
From the master, we can initiate discovery of a peer using the url https://servername. (using SSL/TLS).
But, we will not be able to query the poller as the poller will report http: . To force the master to use HTTPS to the poller we must have the configuration item opha_url_base set to https otherwise, it won't work.
This can be set in <omk_dir>/conf/opCommon.nmis in the poller:
'opha_url_base' => 'https://servername'
If we set the url to https://servername in the discover, the poller is going to send its registry data to the master, and the master will get the correct url_base for the peer from that information.
If the opha_url_base is blank the master will swap the https:// URL for http://
Some data is not updated in the master
opHA has a new feature to synchronise only the data that has being added/modified since the last synchronisation. In case some data is not modified, we can perform a force synchronisation, adding some parameters to update only the required data types and nodes:
opha-cli.pl act=pull data_types=[nodes|latest_data|...] peers=[nodeNames] force=t