Ad Widget

Collapse

fping failed: "/usr/sbin/fping6: can't create raw socket (must run as root?) : Operat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carlitos_30
    Junior Member
    • Feb 2015
    • 3

    #1

    fping failed: "/usr/sbin/fping6: can't create raw socket (must run as root?) : Operat

    Hello.

    I was looking for a NMS and Google lead me to Zabbix. I downloaded the VM image.

    When I try to create a ping item I get the following message:

    "fping failed: "/usr/sbin/fping6: can't create raw socket (must run as root?) : Operation not permitted"

    I applied the commands:

    chown root:zabbix /usr/sbin/fping
    chmod 4710 /usr/sbin/fping

    chown root:zabbix /usr/sbin/fping6
    chmod 4710 /usr/sbin/fping6

    then reboot the VM.

    The damned thing still doesn't work.

    It's hard to understand a supossed professional level software comes with this kind of details.

    "Focus in the user" I read in someplace.
  • scdickey
    Junior Member
    • Feb 2015
    • 11

    #2
    i experienced the same thing. I think what may have fixed it is uncommenting the 2 lines:

    # Mandatory: no
    # Default:
    FpingLocation=/usr/sbin/fping

    ### Option: Fping6Location
    # Location of fping6.
    # Make sure that fping6 binary has root ownership and SUID flag set.
    # Make empty if your fping utility is capable to process IPv6 addresses.
    #
    # Mandatory: no
    # Default:
    Fping6Location=/usr/sbin/fping6

    located in the zabbix-server.conf in the /etc/zabbix folder

    and then restarting the server...

    Comment

    • carlitos_30
      Junior Member
      • Feb 2015
      • 3

      #3
      Solved

      Thank you very much scdickey. Your solution worked to me. I think this post should be sticked.

      Thanks again!

      Comment

      • msantangelo
        Junior Member
        • Feb 2015
        • 19

        #4
        Hmm. Curious.

        I just deployed the OVF template for Zabbix and was having this same exact issue.

        I did the chown/chmod commands as per the manual and it didn't fix anything. I came across this and did the fix, but now I'm getting:

        " At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist. Both are missing in the system. "

        Any thoughts?

        Those files are DEFINITELY there. I just tried to use them:

        > sudo /usr/sbin/fping anip
        >> anip is alive

        Any ideas?

        Originally posted by scdickey
        i experienced the same thing. I think what may have fixed it is uncommenting the 2 lines:

        # Mandatory: no
        # Default:
        FpingLocation=/usr/sbin/fping

        ### Option: Fping6Location
        # Location of fping6.
        # Make sure that fping6 binary has root ownership and SUID flag set.
        # Make empty if your fping utility is capable to process IPv6 addresses.
        #
        # Mandatory: no
        # Default:
        Fping6Location=/usr/sbin/fping6

        located in the zabbix-server.conf in the /etc/zabbix folder

        and then restarting the server...

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          Originally posted by msantangelo
          Hmm. Curious.

          I just deployed the OVF template for Zabbix and was having this same exact issue.

          I did the chown/chmod commands as per the manual and it didn't fix anything. I came across this and did the fix, but now I'm getting:

          " At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist. Both are missing in the system. "

          Any thoughts?

          Those files are DEFINITELY there. I just tried to use them:

          > sudo /usr/sbin/fping anip
          >> anip is alive

          Any ideas?
          Can you show the output of these commands?

          # which fping
          /usr/sbin/fping

          # ls -l /usr/sbin/fping
          -rws--x---. 1 root zabbix 37079 Nov 10 2010 /usr/sbin/fping

          And then show the section of your zabbix_server.conf file that shows the fping parameter:

          # Mandatory: no
          # Default:
          FpingLocation=/usr/sbin/fping

          Comment

          • msantangelo
            Junior Member
            • Feb 2015
            • 19

            #6
            I actually figured it out this afternoon! On the 2.4 OVF, the server instance runs as user zabbixs, in group zabbixs. The fping and fping6 in /usr/sbin had permissions granted to zabbix. This was fixed by either changing fping and fping6 group to zabbixs (favorable) or adding zabbixs to group zabbix (not so favorable)

            In the 2.2 OVF, the user zabbix is not in group zabbix, which is fixed with usermod -a G zabbix zabbix.

            Weird.

            Originally posted by tchjts1
            Can you show the output of these commands?

            # which fping
            /usr/sbin/fping

            # ls -l /usr/sbin/fping
            -rws--x---. 1 root zabbix 37079 Nov 10 2010 /usr/sbin/fping

            And then show the section of your zabbix_server.conf file that shows the fping parameter:

            # Mandatory: no
            # Default:
            FpingLocation=/usr/sbin/fping

            Comment

            • dirckcopeland
              Member
              • Oct 2013
              • 50

              #7
              At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist. Both are missing

              msantangelo,

              That fixed it for me to. The command actually has a "-" before the G:

              usermod -a -G zabbix zabbix

              Comment

              • konomoujorge
                Junior Member
                • May 2015
                • 2

                #8
                Originally posted by scdickey
                i experienced the same thing. I think what may have fixed it is uncommenting the 2 lines:

                # Mandatory: no
                # Default:
                FpingLocation=/usr/sbin/fping

                ### Option: Fping6Location
                # Location of fping6.
                # Make sure that fping6 binary has root ownership and SUID flag set.
                # Make empty if your fping utility is capable to process IPv6 addresses.
                #
                # Mandatory: no
                # Default:
                Fping6Location=/usr/sbin/fping6

                located in the zabbix-server.conf in the /etc/zabbix folder

                and then restarting the server...

                uncommented FpingLocation and FpingLocation, and restarting the service returns an error and could not start zabbix agent service.
                Any ideas?

                Comment

                • msantangelo
                  Junior Member
                  • Feb 2015
                  • 19

                  #9
                  What's your zabbix error log show? Maybe you entered some text elsewhere in the file that is gumming up the works.

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    Originally posted by konomoujorge
                    uncommented FpingLocation and FpingLocation, and restarting the service returns an error and could not start zabbix agent service.
                    Any ideas?
                    Uncommenting those lines doesn't do anything, as those are the default settings. Zabbix will use the defaults regardless of being commented or not.

                    The only difference would be if you changed something on that line and uncommented it.

                    Comment

                    • konomoujorge
                      Junior Member
                      • May 2015
                      • 2

                      #11
                      Originally posted by tchjts1
                      Uncommenting those lines doesn't do anything, as those are the default settings. Zabbix will use the defaults regardless of being commented or not.

                      The only difference would be if you changed something on that line and uncommented it.


                      Thanks tchjts1.
                      Manage to get fping trigger working, without uncommented any lines in conf. file.
                      Here's another thread that followed and helps.

                      Comment

                      • lkolluru
                        Junior Member
                        • Dec 2015
                        • 1

                        #12
                        unable to start zabbix on CentoOS 7

                        [root@Centos70x64 ~]# systemctl start zabbix-server
                        Job for zabbix-server.service failed. See 'systemctl status zabbix-server.service' and 'journalctl -xn' for details.
                        [root@Centos70x64 ~]# journalctl -xn
                        -- Logs begin at Wed 2015-12-16 05:24:24 EST, end at Wed 2015-12-16 06:41:49 EST. --
                        Dec 16 06:41:49 Centos70x64 zabbix_server[10887]: zabbix_server [10887]: cannot run as root!
                        Dec 16 06:41:49 Centos70x64 systemd[1]: zabbix-server.service: control process exited, code=exited status=1
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Failed to start Zabbix Server.
                        -- Subject: Unit zabbix-server.service has failed
                        -- Defined-By: systemd
                        -- Support: http://lists.freedesktop.org/mailman.../systemd-devel
                        --
                        -- Unit zabbix-server.service has failed.
                        --
                        -- The result is failed.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Unit zabbix-server.service entered failed state.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: zabbix-server.service holdoff time over, scheduling restart.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Stopping Zabbix Server...
                        -- Subject: Unit zabbix-server.service has begun shutting down
                        -- Defined-By: systemd
                        -- Support: http://lists.freedesktop.org/mailman.../systemd-devel
                        --
                        -- Unit zabbix-server.service has begun shutting down.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Starting Zabbix Server...
                        -- Subject: Unit zabbix-server.service has begun with start-up
                        -- Defined-By: systemd
                        -- Support: http://lists.freedesktop.org/mailman.../systemd-devel
                        --
                        -- Unit zabbix-server.service has begun starting up.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: zabbix-server.service start request repeated too quickly, refusing to start.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Failed to start Zabbix Server.
                        -- Subject: Unit zabbix-server.service has failed
                        -- Defined-By: systemd
                        -- Support: http://lists.freedesktop.org/mailman.../systemd-devel
                        --
                        -- Unit zabbix-server.service has failed.
                        --
                        -- The result is failed.
                        Dec 16 06:41:49 Centos70x64 systemd[1]: Unit zabbix-server.service entered failed state.

                        Comment

                        • zerono
                          Junior Member
                          • Oct 2021
                          • 4

                          #13
                          as https://ip-connection.blogspot.com/2...cket-must.html
                          Code:
                          chown root:zabbix /usr/bin/fping
                          chmod 710 /usr/bin/fping
                          chmod ug+s /usr/bin/fping

                          Comment

                          • RandyS
                            Junior Member
                            • Nov 2014
                            • 5

                            #14
                            Another thing to consider:
                            Did you disable support for IPV 6 on your server? Thank you all for your help - this thread lead me to success on that note.

                            [root@~]# grep fping6 /etc/zabbix/zabbix_server.conf
                            # Location of fping6.
                            # Make sure that fping6 binary has root ownership and SUID flag set.
                            #ORIG## Fping6Location=/usr/sbin/fping6
                            #NEXT LINE FAKED OUT BECAUSE IPV6 IS DISABLED ON THIS RHEL 8 SYSTEM##Fping6Location=/usr/sbin/fping6
                            Fping6Location=/usr/sbin/fping

                            [root@~]#

                            Comment

                            • sajihome
                              Junior Member
                              • Dec 2022
                              • 1

                              #15
                              The below Steps worked for me
                              Give Permission
                              usermod -a -G zabbix zabbix
                              Edit in Zabbix Config
                              FpingLocation=/usr/sbin/fping
                              Fping6Location=/usr/sbin/fping

                              Enable IPv6 in Ubuntu​

                              Good luck

                              Comment

                              Working...