Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.63k stars 404 forks source link

Poller not running , no graph appears #2506

Closed fadhilrajabian closed 5 years ago

fadhilrajabian commented 5 years ago

have updated Cacti from 0.8.8 to 1.2.1 and I have also done a number of things below:

  1. Rebuild poller Cache
  2. Change the ownership and permission of / var / lib / cacti / rra / *
  3. Setting the SNMP community on the host that I monitor

but what happens is that graph doesn't appear,

image

image

cigamit commented 5 years ago

What does your logs say?

Also, try "Troubleshooting >> Data Sources" Change "Debugging" to "All" and select one of the Data Sources with issues. Then select the Action "Run Check" and let it run.

fadhilrajabian commented 5 years ago

the logs say this : image

after i run the result only like this : image

and there is another log : image

cigamit commented 5 years ago

Likely spine is broken. Can you please run it by hand:

cd /usr/local/spine/bin
./spine -R -V 3 -S
fadhilrajabian commented 5 years ago

@cigamit

the result is:

image

cigamit commented 5 years ago

What is in your spine.conf? What version of spine is this? Does it match the Cacti version? Until you solve this problem, your poller will not complete and you will get no data. You can test the values in the spine.conf by runing the following from the server with spine:

mysql -ucacti -ppassword cacti

Replace 'password' with your password. Until that works, spine won't work.

fadhilrajabian commented 5 years ago

@cigamit i use spine 0.8.8f, is it problem? image

This is my spine.conf image

mysql -ucacti -ppassword cacti -> i can connect to mysql using cacti user. image

cigamit commented 5 years ago
DB_Host localhost
cigamit commented 5 years ago

or use the real hostname, but be prepared for a different permission denied message. You can do the grant on the real hostname as well. Just review the message you get from mysql and follow that hostname convention.

fadhilrajabian commented 5 years ago

@cigamit yes i try with localhost and ipaddress the result is still same.

netniV commented 5 years ago

Are you sure that mysql is definitely listening on that port? Check the netstat -an to see if you can find the listening process.

fadhilrajabian commented 5 years ago

@netniV image

this is mysql listen port

netniV commented 5 years ago

That appears to be listening on IPv6 only. Under IPv6 the :: is a shortcut for local host, with the third colon being the port separator. So :::3306 is effectively localhost:3306 but only for IPv6.

fadhilrajabian commented 5 years ago

@netniV now i add a shortcut for local host with 0.0.0.0 , but still cannot . image

cigamit commented 5 years ago

That output is misleading. It is listening for an IPv6, but the way the stack works it that it's still listening on IPv4. It's just the way netstat works. You can do a tcpdump when running the mysql command and see for yourself. Verify with tcpdump and wireshark as to what is happening. It has to be the grant.

netniV commented 5 years ago

Interesting coz on my system, I have an IPv4 listening port:

netstat -an | grep 3306 | grep "LISTEN"
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
netniV commented 5 years ago

This would seem to agree with what you've said though it is also talking about windows as well. (learn something new every day) https://superuser.com/a/733575/387788

I've finally had time to dig into the mysql 5.6 source. Line 2405 of mysqld.cc seems to hold some answers.


/*
For interoperability with older clients, IPv6 socket should
listen on both IPv6 and IPv4 wildcard addresses.
Turn off IPV6_V6ONLY option.
  NOTE: this will work starting from Windows Vista only.
  On Windows XP dual stack is not available, so it will not
  listen on the corresponding IPv4-address.
*/

if (a->ai_family == AF_INET6) { arg= 0;

 if (mysql_socket_setsockopt(ip_sock, IPPROTO_IPV6, IPV6_V6ONLY,/* Line: 2405 */
                             (char *) &arg, sizeof (arg)))
 {
   sql_print_warning("Failed to reset IPV6_V6ONLY flag (error: %d). "
                     "The server will listen to IPv6 addresses only.",
                     (int) socket_errno);
 }

}


>
> Setting this socket option causes the extra line 0.0.0.0:3306 to show up in netstat. However, I'm still not able to connect by specifying 127.0.0.1 to telnet.
>
> The comments do make it sound like this option should only be used when wildcard is applied, but it seems the option is applied even when bind-address is specified.
>
> Possibly related discussion here: http://serverdown.ttwait.com/que/486038
> 
> google cache: http://webcache.googleusercontent.com/search?q=cache:14aq4-3tRLsJ:serverdown.ttwait.com/que/486038+&cd=4&hl=en&ct=clnk&gl=us
>
> **EDIT**: In the bug report (which is still in triage), I've proposed MySQL only clear IPV6_V6ONLY when binding to the wildcard address *. This seems to give the most flexibility of configuration in my.ini. If some admins are binding :: and then connecting to 127.0.0.1 they could be surprised. Binding * instead of :: would fix it.
fadhilrajabian commented 5 years ago

hi @netniV and @cigamit

i found this https://www.youtube.com/watch?v=kea-2yFFrl0

i give the skip-grant-tables=TRUE on the my.cnf

after that i can run ./spine -R -V 3 -S

i think the problem is grant user for user cacti.

this is the result :

image

thankyou for all of your help @netniV @cigamit

really appreciated

cigamit commented 5 years ago

Please continue to research this setting. For now, I will close this.