ERROR x509: certificate is valid for <ip1>, not <ip2>

392 views
Skip to first unread message

phàng tú linh

unread,
Apr 8, 2024, 11:39:15 AM4/8/24
to Wazuh | Mailing List
Hello all, Wazuh 4.7
I got an error while running the output filebeat test
elasticsearch: https://<ip1>:9200...
  parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: <ip1>
    dial up... OK
  TLS...
    security: server's certificate chain verification is enabled
    handshake... OK
    TLS version: TLSv1.3
    dial up... OK
  talk to server... OK
  version: 7.10.2
elasticsearch: https://<ip2>:9200...
  parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: <ip2>
    dial up... OK
  TLS...
    security: server's certificate chain verification is enabled
    handshake... ERROR x509: certificate is valid for <ip1>, not <ip2>
This is my config file:
nodes:
  # Wazuh indexer nodes
  indexer:
    - name: wazuhindexernode1
      ip: "<ip1>"
    - name: wazuhindexernode2
      ip: "<ip2>"
    #- name: node-3
    #  ip: "<indexer-node-ip>"

  # Wazuh server nodes
  # If there is more than one Wazuh server
  # node, each one must have a node_type
  server:
    - name: wazuhservermaster
      ip: "<ip3>"
      node_type: master
    - name: wazuhserverworker
      ip: "<ip4>"
      node_type: worker
    #- name: wazuh-3
    #  ip: "<wazuh-manager-ip>"
    #  node_type: worker

  # Wazuh dashboard nodes
  dashboard:
    - name: wazuhdashboard
      ip: "<ip5>"

Then I tried running the command: curl -v --cacert root-ca.pem https://<ip2>:9200 but not successful
Then I tried running the command:  curl -v --cacert root-ca.pem https://<ip1>:9200 then it was successful.
Regards,
linhpt

Leonardo Daniel Sancho

unread,
Apr 8, 2024, 3:06:09 PM4/8/24
to Wazuh | Mailing List
Hello  phàng tú linh, thanks for choosing Wazuh!

Could you provide us with more information on your environment and your goals? Would this be a multi-node environment? If yes could you point us to the guide that you're using for this type of deployment?

I'll be waiting for your answer.

phàng tú linh

unread,
Apr 8, 2024, 9:18:50 PM4/8/24
to Wazuh | Mailing List
My target is a multi-node environment. I deploy on a VMware virtualized environment, with 2 Indexer servers, 2 wazuh servers and 1 Dashboard server. As in the config file I mentioned. I use the step-by-step Installation Guide in version 4.7
Thanks for answering my question. Looking forward to hearing from you
Vào lúc 02:06:09 UTC+7 ngày Thứ Ba, 9 tháng 4, 2024, Leonardo Daniel Sancho đã viết:

Leonardo Daniel Sancho

unread,
Apr 10, 2024, 6:17:10 PM4/10/24
to Wazuh | Mailing List
Hello  phàng tú linh, thanks for the answer you provided, it seems that there's an issue with the certificate, so it seems that you will have to re-deploy the certificates, you may follow this guide for doing so:  Certificates deployment - Wazuh server · Wazuh documentation.

After making the new certificates, you can attempt the installation once again.

I hope this helps you.
Have a great day!

Reply all
Reply to author
Forward
0 new messages