Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Server crash notifications
#1
Hi,

I'm getting following notifications time to time (every 10-15 minutes) and goes away. but there are no errors logged in pandora_server.error. server service seems to run fine. There are no restarts or stops in the service.

[Image: uc?id=1lr5-MrSeiwkWcMyhmWuk9gBlEISPAql4]

i'm running Pandorafms v7.0NG.749 - Build PC200909 - MR 41 on Ubuntu 16.04.7 LTS

Any help will be appreciated.

Thanks.
 Reply
#2
¡Hi!

I am reading this function, it seems to me (maybe) ¿a time problem from server? (other reason: old cache at database). 
Or maybe I am wrong with this theory.

PHP Code:
    public function checkPandoraServers()
    {
        $servers db_get_all_rows_sql(
            'SELECT
                id_server,
                name,
                server_type,
                server_keepalive,
                status,
                unix_timestamp() - unix_timestamp(keepalive) as downtime
            FROM tserver
            WHERE 
                unix_timestamp() - unix_timestamp(keepalive) > server_keepalive
                OR status = 0'
        ); 

Line 1201:
 https://github.com/pandorafms/pandorafms...rvisor.php
 Reply
#3
Hello

Please, check the file /var/log/pandora/pandora_server.log and tell us if you see any related error. You can also send it to us so that we can check it.

Greetings
Diego
 Reply
#4
I was managed to solved the problem. Thank you Jimmy_Olano for pointing me to the code.

Below is the DB query how pandorafms check for server status. line 1298

Code:
public function checkPandoraServerMasterAvailable()
    {
        $n_masters = db_get_value_sql(
            'SELECT
                count(*) as n
            FROM tserver
            WHERE
                unix_timestamp() - unix_timestamp(keepalive) <= server_keepalive
                AND master > 0
                AND status = 1'
        );


This checks whether last keepalive value is lower than than the defined threshold. If difference of the keepalive more than the defined threshold, it will generate notification.

Earlier I had configured server_threshold = 60 intentionally (default value = 5) while server_keepalive 45 (default) in pandora_server.conf which will result server upating tserver table keepalive on every 60 seconds. So, that cause notifications popping up randomly.

Now i have reduced server_threshold = 15. so no more false notifications.
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes