Agent - Could not resolve hostname

963 views
Skip to first unread message

Brad Turnbough

unread,
Aug 16, 2023, 1:27:13 PM8/16/23
to Wazuh mailing list
I am trying to register my first agent to the server.

I've used the following to install the agent:

msiexec.exe /i wazuh-agent-4.5.0-1.msi /q WAZUH_MANAGER='KNX-BRADTEST' WAZUH_REGISTRATION_SERVER='KNX-BRADTEST' WAZUH_AGENT_GROUP='default' 

However, the following comes up:
2023/08/16 12:23:03 wazuh-agent: INFO: Requesting a key from server: 'KNX-BRADTEST'
2023/08/16 12:23:07 wazuh-agent: ERROR: Could not resolve hostname: 'KNX-BRADTEST'

I've verified my workstation can resolve 'knx-bradtest' via dns.

Whats the problem here?

P.S. --

I've tried all of the following:
msiexec.exe /i wazuh-agent-4.5.0-1.msi /q WAZUH_MANAGER='knx-bradtest.blahblah.com' WAZUH_REGISTRATION_SERVER='knx-bradtest.blahblah.com' WAZUH_AGENT_GROUP='default'
msiexec.exe /i wazuh-agent-4.5.0-1.msi /q WAZUH_MANAGER='knx-bradtest' WAZUH_REGISTRATION_SERVER='knx-bradtest' WAZUH_AGENT_GROUP='default'
msiexec.exe /i wazuh-agent-4.5.0-1.msi /q WAZUH_MANAGER='KNX-BRADTEST' WAZUH_REGISTRATION_SERVER='KNX-BRADTEST' WAZUH_AGENT_GROUP='default'
msiexec.exe /i c:\wazuh\wazuh-agent-4.5.0-1.msi /q WAZUH_MANAGER='192.168.0.141' WAZUH_REGISTRATION_SERVER='192.168.0.141' WAZUH_AGENT_GROUP='default'


Nicolas Agustin Guevara Pihen

unread,
Aug 16, 2023, 2:30:49 PM8/16/23
to Wazuh mailing list
Hello Brad, 
Could you verify after deploying an agent if the configuration is properly applied? In the ossec.conf file you should see a configuration like this

<ossec_config>
  <client>
    <server>
      <address>192.168.0.42</address>
      <port>1514</port>
      <protocol>tcp</protocol>
    </server>


In which the address should be the manager address that you configured previously. 

Additionally, when you try with the manager's IP address, do you get the exact same error? 

Ken Dionne

unread,
Nov 10, 2024, 11:57:20 PM11/10/24
to Wazuh | Mailing List
I fixed the issue by removing the single quotes in the install command.
The single quotes appeared in the ossec.conf file, but not when the server hostname is not enclosed in single quotes.
Reply all
Reply to author
Forward
0 new messages