Ad Widget

Collapse

Autoregistration with PSK fails...

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TonyTheTiger
    Junior Member
    • Oct 2022
    • 4

    #1

    Autoregistration with PSK fails...

    Im trying to setup Autoregistration with PSK on Zabbix for Windows, but Autoregistration keeps failing as soon as i enable PSK.
    I have setup PSK under "Administration/General/Autoregistration"

    Adding hosts with Autoregistration works fine without PSK.
    Adding a host manually with PSK works fine.

    On my Client side this is what i have.

    zabbix_agentd.conf looks like this:
    # This is a configuration file for Zabbix agent service (Windows)
    # To get more information about Zabbix, visit http://www.zabbix.com
    LogFile=C:\Program Files\Zabbix Agent\zabbix_agentd.log
    Server=11.11.11.11
    Hostname=ADFS-server01
    TLSConnect=psk
    TLSAccept=psk
    TLSPSKIdentity=ElevenPSK
    TLSPSKFile=C:\Program Files\Zabbix Agent\psk.key

    This is what i see in the logs.

    zabbix_agentd.log looks like this:

    8812:20221017:125541.954 Zabbix Agent stopped. Zabbix 6.2.3 (revision 98ee88fc19d).
    7032:20221017:132218.708 Starting Zabbix Agent [PATCH01-DRIFT]. Zabbix 6.2.3 (revision 98ee88fc19d).
    7032:20221017:132218.710 **** Enabled features ****
    7032:20221017:132218.712 IPv6 support: YES
    7032:20221017:132218.713 TLS support: YES
    7032:20221017:132218.714 **************************
    7032:20221017:132218.714 using configuration file: C:\Program Files\Zabbix Agent\zabbix_agentd.conf
    7032:20221017:132220.452 agent #0 started [main process]
    1300:20221017:132220.455 agent Forum started[listener #1]
    6432:20221017:132220.456 agent #3 started[listener #2]
    4164:20221017:132220.460 agent Home started [collector]
    7328:20221017:132220.461 agent #4 started[listener #3]
    6432:20221017:133843.325 failed to accept an incoming connection: from 11.11.11.11: unencrypted connections are not allowed
    7328:20221017:140313.440 failed to accept an incoming connection: from 11.11.11.11: unencrypted connections are not allowed


    I even tried to set debug level to 5 and all i got was the two linies before and after the failed to accept linie.

    3040:20221017:124939.775 In collect_perfstat()
    3040:20221017:124939.780 End of collect_perfstat()
    3064:20221017:124939.936 failed to accept an incoming connection: from 11.11.11.11: unencrypted connections are not allowed
    3040:20221017:124940.790 In collect_perfstat()
    3040:20221017:124940.796 End of collect_perfstat()


    Any HELP would be greatly appreciated!!!

    Best regards

    Tony

    Ps. First time Zabbix setup, so be gentle... plz
  • Answer selected by Markku at 18-10-2022, 13:27.
    Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    Conditions: Host metadata contains windows
    You don't have any metadata configuration in your agent, so your autoregistration action cannot match.

    Suggested way to proceed:

    1. Stop the agent
    2. Delete the host in Zabbix
    3. Add HostMetadata=windows in the agent configuration
    4. Start the agent

    Markku

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #2
      Autoregistration needs an active agent, meaning ServerActive configuration in the agent.



      Markku

      Comment

      • TonyTheTiger
        Junior Member
        • Oct 2022
        • 4

        #3
        Ohhh, i misunderstood that article as being about the active agent as in "Zabbix agent 2"...
        ill try that tomorrow when im back at work, thx...

        Tony

        Comment

        • TonyTheTiger
          Junior Member
          • Oct 2022
          • 4

          #4
          Arghhh.... Still dosn't work...
          I now added the "ServerActive=11.11.11.11" to my conf file on the client but now i just get another error, now my log file looks like this:

          5360:20221018:075826.238 no active checks on server [11.11.11.11:10051]: host [PATCH01-DRIFT] not found
          8240:20221018:075858.798 Zabbix Agent stopped. Zabbix 6.2.3 (revision 98ee88fc19d).
          4384:20221018:075928.202 Starting Zabbix Agent [PATCH01-DRIFT]. Zabbix 6.2.3 (revision 98ee88fc19d).
          4384:20221018:075928.203 **** Enabled features ****
          4384:20221018:075928.204 IPv6 support: YES
          4384:20221018:075928.205 TLS support: YES
          4384:20221018:075928.206 **************************
          4384:20221018:075928.207 using configuration file: C:\Program Files\Zabbix Agent\zabbix_agentd.conf
          4384:20221018:075928.737 agent #0 started [main process]
          8372:20221018:075928.741 agent Forum started[listener #1]
          6872:20221018:075928.743 agent #4 started[listener #3]
          2172:20221018:075928.744 agent #3 started[listener #2]
          6560:20221018:075928.745 agent #5 started [active checks #1]
          336:20221018:075928.747 agent Home started [collector]
          6560:20221018:075928.768 no active checks on server [11.11.11.11:10051]: host [PATCH01-DRIFT] not found
          6560:20221018:080128.119 no active checks on server [11.11.11.11:10051]: host [PATCH01-DRIFT] not found​


          My server has a Autoregistration actions configured looking like this:

          Configuration/Actions/Autoregistration actions:
          Name: Windows Server AutoReg
          Conditions: Host metadata contains windows
          Operations: Add to host groups: Windows Servers
          Link to templates: Windows by Zabbix agent​


          What i don't get is from the log file if i understand it right the request to the server works fine, but the server answer back to the client that it has no host that correspond with the name PATCH01-DRIFT, but isn't that how it should be as what im trying to do is asking the server to make that host on it self?
          Or did i misunderstand something?

          Again, any HELP would be greatly appreciated!!!

          Best regards

          Tony

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1781

            #5
            Conditions: Host metadata contains windows
            You don't have any metadata configuration in your agent, so your autoregistration action cannot match.

            Suggested way to proceed:

            1. Stop the agent
            2. Delete the host in Zabbix
            3. Add HostMetadata=windows in the agent configuration
            4. Start the agent

            Markku

            Comment

            • TonyTheTiger
              Junior Member
              • Oct 2022
              • 4

              #6
              That did it, thanks a lot Markku for all the help...

              Tony​

              Comment

              Working...