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.
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 discover a peer using the url https://servername.
But, the poller should have the configuration item opha_url_base set to https or blank, otherwise, it won't work.
This can be set in <omk_dir>/conf/opCommon.nmis in the poller:
'opha_url_base' => ''
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 url_base for the peer from that information, overwriting the url that we have set up. If opha_url_base is set to blank, the url_base set from the master will remain the same.
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