I am trying to migrate to a new master manager (from on-prem to cloud) i am currently testing and after i changed in ossec.conf of the new master mode (used to be worker node) i start getting issues of connecting with wazuh-wui user.
Here is how i edited ossec.conf
<cluster>
<name>wazuh</name>
<node_name>new master node</node_name>
<node_type>master</node_type>
<key>key</key>
<port>1516</port>
<bind_addr>0.0.0.0</bind_addr>
<nodes>
<node>new master ip </node>
</nodes>
<hidden>no</hidden>
<disabled>no</disabled>
</cluster>
after running /var/ossec/bin/cluster_control -l it shows the new manager as master.
I've edited /usr/share/wazuh-dashboard/data/wazuh/wazuh.yml to include the new master IP address. however when i try to open server management through dashboard i get the following error:
INFO: No current API selected
INFO: Getting API hosts...
INFO: API hosts found: 1
INFO: Checking API host id [default]...
INFO: Could not connect to API id [default]: 3099 - ERROR3099 - Invalid credentials
INFO: Removed [navigate] cookie
ERROR: No API available to connect
I've tried adding the wazuh user and wazuh-wui user to wazuh-keystore of the newly created master, using the following commands but i still get the same error:
echo 'wazuh' | /var/ossec/bin/wazuh-keystore -f api -k username
echo 'password of api' | /var/ossec/bin/wazuh-keystore -f api -k password
echo 'wazuh-wui' | /var/ossec/bin/wazuh-keystore -f wui -k username
echo 'password of wui' | /var/ossec/bin/wazuh-keystore -f wui -k password
Am i doing something wrong in this migration of master manager?