XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Netdata package is now available in XCP-ng

    Scheduled Pinned Locked Moved News
    131 Posts 25 Posters 106.0k Views 14 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • olivierlambertO Online
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      Double check your firewall on the "non working host". Also check if Netdata service is up šŸ™‚

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        PC_123 @olivierlambert
        last edited by olivierlambert

        @olivierlambert

        Imagine that I don't know what to do. I've tried reviewing the Netdata documentation but it isn't specific to XCP-NG.

        I ran the below code and received a response. Does that indicate where the issue could be? Also...what code do you suggest I run to check to see if Netdata is running? Why can't it bind to the host address?

        [09:49 xcp-ng3 ~]# /usr/sbin/netdata
        2020-06-16 09:49:55: netdata INFO  : MAIN : SIGNAL: Not enabling reaper
        2020-06-16 09:49:55: netdata ERROR : MAIN : LISTENER: IPv4 bind() on ip '0.0.0.0' port 19999, socktype 1 failed. (errno 98, Address already in use)
        2020-06-16 09:49:55: netdata ERROR : MAIN : LISTENER: Cannot bind to ip '0.0.0.0', port 19999
        2020-06-16 09:49:55: netdata ERROR : MAIN : LISTENER: IPv6 bind() on ip '::' port 19999, socktype 1 failed. (errno 98, Address already in use)
        2020-06-16 09:49:55: netdata ERROR : MAIN : LISTENER: Cannot bind to ip '::', port 19999
        2020-06-16 09:49:55: netdata FATAL : MAIN :LISTENER: Cannot listen on any API socket. Exiting... # : Success
        
        2020-06-16 09:49:55: netdata INFO  : MAIN : EXIT: netdata prepares to exit with code 1...
        2020-06-16 09:49:55: netdata INFO  : MAIN : EXIT: cleaning up the database...
        2020-06-16 09:49:55: netdata INFO  : MAIN : Cleaning up database [0 hosts(s)]...
        2020-06-16 09:49:55: netdata INFO  : MAIN : EXIT: all done - netdata is now exiting - bye bye...
        
        stormiS 1 Reply Last reply Reply Quote 0
        • olivierlambertO Online
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          @PC_123 said in Netdata package is now available in XCP-ng:

          Address already in use

          It means there's already a service listening on this port. Try to stop it and see if it's still there on this port.

          1 Reply Last reply Reply Quote 0
          • stormiS Offline
            stormi Vates 🪐 XCP-ng Team @PC_123
            last edited by

            @PC_123 said in Netdata package is now available in XCP-ng:

            Also...what code do you suggest I run to check to see if Netdata is running?

            systemctl status netdata.service

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              PC_123 @stormi
              last edited by olivierlambert

              @stormi
              Green is a good.

              [10:06 xcp-ng3 ~]# systemctl status netdata.service
              ā— netdata.service - Real time performance monitoring
                 Loaded: loaded (/usr/lib/systemd/system/netdata.service; enabled; vendor pres                                                        et: disabled)
                 Active: active (running) since Tue 2020-06-16 09:48:42 EDT; 18min ago
                Process: 1588 ExecStartPre=/usr/libexec/netdata/xcpng-iptables-restore.sh (cod                                                        e=exited, status=0/SUCCESS)
                Process: 1523 ExecStartPre=/bin/chown -R netdata:netdata /var/run/netdata (cod                                                        e=exited, status=0/SUCCESS)
                Process: 1470 ExecStartPre=/bin/mkdir -p /var/run/netdata (code=exited, status                                                        =0/SUCCESS)
                Process: 1404 ExecStartPre=/bin/chown -R netdata:netdata /var/cache/netdata (c                                                        ode=exited, status=0/SUCCESS)
                Process: 1359 ExecStartPre=/bin/mkdir -p /var/cache/netdata (code=exited, stat                                                        us=0/SUCCESS)
               Main PID: 1861 (netdata)
                 CGroup: /system.slice/netdata.service
                         ā”œā”€1861 /usr/sbin/netdata -P /var/run/netdata/netdata.pid -D -W set...
                         ā”œā”€2035 /usr/libexec/netdata/plugins.d/apps.plugin 1
                         ā”œā”€2058 /usr/libexec/netdata/plugins.d/go.d.plugin 1
                         ā”œā”€2063 /usr/libexec/netdata/plugins.d/xenstat.plugin 1
                         └─2069 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.plu...
              
              P 1 Reply Last reply Reply Quote 0
              • P Offline
                PC_123 @PC_123
                last edited by

                @PC_123

                I ran identical code on two machines. One worked and the other didn't. The machine that didn't work is not the master of the pool. Could that be the reason? Do I need to setup the centralized reporting that was mentioned at the beginning of this thread?

                1 Reply Last reply Reply Quote 0
                • stormiS Offline
                  stormi Vates 🪐 XCP-ng Team
                  last edited by

                  If you installed netdata-ui, each instance of netdata is independant and has no knowledge of the pool setup. There's no obvious reason why it works on one and not on the other. Except if you installed netdata only instead of netdata-ui.

                  1 Reply Last reply Reply Quote 0
                  • stormiS Offline
                    stormi Vates 🪐 XCP-ng Team
                    last edited by

                    What's the output of iptables -L on both hosts?

                    P 1 Reply Last reply Reply Quote 0
                    • P Offline
                      PC_123 @stormi
                      last edited by olivierlambert

                      @stormi
                      Not working host:

                      [10:07 xcp-ng3 ~]# iptables -L
                      Chain INPUT (policy ACCEPT)
                      target     prot opt source               destination
                      xapi_nbd_input_chain  tcp  --  anywhere             anywhere             tcp dpt:nbd
                      ACCEPT     gre  --  anywhere             anywhere
                      RH-Firewall-1-INPUT  all  --  anywhere             anywhere
                      
                      Chain FORWARD (policy ACCEPT)
                      target     prot opt source               destination
                      RH-Firewall-1-INPUT  all  --  anywhere             anywhere
                      
                      Chain OUTPUT (policy ACCEPT)
                      target     prot opt source               destination
                      xapi_nbd_output_chain  tcp  --  anywhere             anywhere             tcp spt:nbd
                      
                      Chain RH-Firewall-1-INPUT (2 references)
                      target     prot opt source               destination
                      ACCEPT     all  --  anywhere             anywhere
                      ACCEPT     icmp --  anywhere             anywhere             icmp any
                      ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
                      ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
                      ACCEPT     udp  --  anywhere             anywhere             ctstate NEW udp dpt:ha-cluster
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:ssh
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:http
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:https
                      ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:21064
                      ACCEPT     udp  --  anywhere             anywhere             multiport dports hpoms-dps-lstn,netsupport
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited
                      
                      Chain xapi_nbd_input_chain (1 references)
                      target     prot opt source               destination
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
                      
                      Chain xapi_nbd_output_chain (1 references)
                      target     prot opt source               destination
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
                      

                      Working Host:

                      [10:28 xcp-ng2 ~]# iptables -L
                      Chain INPUT (policy ACCEPT)
                      target     prot opt source               destination
                      xapi_nbd_input_chain  tcp  --  anywhere             anywhere             tcp dpt:nbd
                      ACCEPT     gre  --  anywhere             anywhere
                      RH-Firewall-1-INPUT  all  --  anywhere             anywhere
                      
                      Chain FORWARD (policy ACCEPT)
                      target     prot opt source               destination
                      RH-Firewall-1-INPUT  all  --  anywhere             anywhere
                      
                      Chain OUTPUT (policy ACCEPT)
                      target     prot opt source               destination
                      xapi_nbd_output_chain  tcp  --  anywhere             anywhere             tcp spt:nbd
                      
                      Chain NETDATA (1 references)
                      target     prot opt source               destination
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:dnp-sec
                      
                      Chain RH-Firewall-1-INPUT (2 references)
                      target     prot opt source               destination
                      ACCEPT     all  --  anywhere             anywhere
                      ACCEPT     icmp --  anywhere             anywhere             icmp any
                      ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
                      ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
                      ACCEPT     udp  --  anywhere             anywhere             ctstate NEW udp dpt:ha-cluster
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:ssh
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:http
                      ACCEPT     tcp  --  anywhere             anywhere             ctstate NEW tcp dpt:https
                      ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:21064
                      ACCEPT     udp  --  anywhere             anywhere             multiport dports hpoms-dps-lstn,netsupport
                      NETDATA    all  --  anywhere             anywhere
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited
                      
                      Chain xapi_nbd_input_chain (1 references)
                      target     prot opt source               destination
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
                      
                      Chain xapi_nbd_output_chain (1 references)
                      target     prot opt source               destination
                      REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
                      
                      1 Reply Last reply Reply Quote 0
                      • stormiS Offline
                        stormi Vates 🪐 XCP-ng Team
                        last edited by

                        The firewall rule for netdata is clearly missing here on the first host. I don't know why.

                        P 1 Reply Last reply Reply Quote 0
                        • stormiS Offline
                          stormi Vates 🪐 XCP-ng Team
                          last edited by

                          What's the output of: rpm -qa | grep netdata on both hosts?

                          P 1 Reply Last reply Reply Quote 0
                          • P Offline
                            PC_123 @stormi
                            last edited by olivierlambert

                            @stormi

                            [10:28 xcp-ng3 ~]# rpm -qa | grep netdata
                            netdata-1.19.0-3.xcpng8.1.x86_64
                            netdata-ui-1.19.0-3.xcpng8.1.x86_64
                            
                            [10:29 xcp-ng2 ~]# rpm -qa | grep netdata
                            netdata-1.19.0-3.xcpng8.1.x86_64
                            netdata-ui-1.19.0-3.xcpng8.1.x86_64
                            
                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              PC_123 @stormi
                              last edited by

                              @stormi

                              I'm glad you were able to spot a difference. My untrained eye still doesn't see the difference. šŸ™‚

                              1 Reply Last reply Reply Quote 0
                              • stormiS Offline
                                stormi Vates 🪐 XCP-ng Team
                                last edited by

                                Can you run /usr/libexec/netdata/xcpng-iptables-restore.sh on the host where it's not working and share the output?

                                P 1 Reply Last reply Reply Quote 0
                                • P Offline
                                  PC_123 @stormi
                                  last edited by olivierlambert

                                  @stormi

                                  That fixed it, thank you. Any idea why the firewall rule wasn't initially created?

                                  [10:59 xcp-ng3 ~]# /usr/libexec/netdata/xcpng-iptables-restore.sh
                                  Applying firewall rules for netdata from /etc/sysconfig/iptables_netdata
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • stormiS Offline
                                    stormi Vates 🪐 XCP-ng Team
                                    last edited by

                                    No, I don't know. The iptables rules are rebuilt each time your host starts, and the additional rules for netdata are added when the netdata service starts.

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      PC_123 @stormi
                                      last edited by

                                      @stormi

                                      I just realized your icon is from Keen4. I use to play that game when I was much younger.

                                      Thanks again for all your help!

                                      P 1 Reply Last reply Reply Quote 1
                                      • P Offline
                                        PC_123 @PC_123
                                        last edited by

                                        @PC_123
                                        For anyone who has this issue in the future.

                                        The command stormi provided did fix the problem on a running machine. Unfortunately it did not persist following a reboot.

                                        The command: iptables -F

                                        Seems to be a better long term solution.

                                        Thanks again to @stormi for isolating the issue.

                                        1 Reply Last reply Reply Quote 0
                                        • stormiS Offline
                                          stormi Vates 🪐 XCP-ng Team
                                          last edited by

                                          That command I provided is run each time the netdata service starts. So the proper fix is to find out why it doesn't work. Maybe it runs too soon and a dependency needs to be added to another systemd unit.

                                          iptables -F is NOT a fix nor a "better long term solution". It simply deletes all the iptables rules, so basically you're disabling the firewall. By the way it does not survive a reboot.

                                          1 Reply Last reply Reply Quote 0
                                          • T Offline
                                            thisisbenwoo @olivierlambert
                                            last edited by

                                            @olivierlambert I'm experiencing something similar. I recently installed XCP-ng, and the trial Premium license. But it also gives me the netdata not available error. I also don't think I have a xapi0:

                                            uuid ( RO)                : 35124aac-2b87-4fff-8bc7-44ac346437fa
                                                      name-label ( RW): Host internal management network
                                                name-description ( RW): Network on which guests will be assigned a private link-local IP address which can be used to talk XenAPI
                                                          bridge ( RO): xenapi
                                            
                                            
                                            uuid ( RO)                : e2e0991c-17a1-22ce-1b3c-ba5178105b7a
                                                      name-label ( RW): Pool-wide network associated with eth4
                                                name-description ( RW):
                                                          bridge ( RO): xenbr4
                                            
                                            
                                            uuid ( RO)                : 63d1ff98-833c-f39f-cc65-d5843b20b037
                                                      name-label ( RW): Pool-wide network associated with eth3
                                                name-description ( RW):
                                                          bridge ( RO): xenbr3
                                            
                                            
                                            uuid ( RO)                : 8b649421-9686-d09c-19f0-8726c04f9134
                                                      name-label ( RW): Pool-wide network associated with eth0
                                                name-description ( RW):
                                                          bridge ( RO): xenbr0
                                            
                                            
                                            uuid ( RO)                : 8c47afa9-3bc0-dec0-3c2e-cd304d28b064
                                                      name-label ( RW): Pool-wide network associated with eth2
                                                name-description ( RW):
                                                          bridge ( RO): xenbr2
                                            
                                            
                                            uuid ( RO)                : 37e022e3-d5dd-e0ea-0be6-e2f07d6c75fc
                                                      name-label ( RW): Pool-wide network associated with eth1
                                                name-description ( RW):
                                                          bridge ( RO): xenbr1
                                            

                                            I would prefer to use the integrated installation, so that I can be assured of compatibility, etc. Thanks in advance. The product is awesome!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post