PDA

View Full Version : ZABBIX Server stopped 1.4.2


rodelapena
05-12-2007, 15:39
my zabbix server is falling when i try to watch the Overview page, this is the debug log:

18133:20071205:083523 In delete_history(history,25049,5140497389936705543,1 1582191)
18133:20071205:083523 Query [select min(clock) from history where itemid=25049]
18133:20071205:083523 Query [delete from history where itemid=25049 and clock<14400]
18082:20071205:083523 Query::insert into trends (clock,itemid,num,value_min,value_avg,value_max) values (1196863200,32075,1,0.000000,0.000000,0.000000)
18082:20071205:083523 Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key violates unique constraint "trends_pkey"

18082:20071205:083523 End of add_history
18082:20071205:083523 In update_item()
18082:20071205:083523 In calculate_item_nextcheck (32075,30,,1196865323)
18082:20071205:083523 End calculate_item_nextcheck (result:1196865335)
18082:20071205:083523 Query [update items set nextcheck=1196865335,prevvalue=lastvalue,lastvalue ='0.000000',lastclock=1196865323 where itemid=32075]
18133:20071205:083523 In delete_history(history_uint,25049,5140497389936705 543,0)
18133:20071205:083523 Query [select min(clock) from history_uint where itemid=25049]
18082:20071205:083523 Query::update items set nextcheck=1196865335,prevvalue=lastvalue,lastvalue ='0.000000',lastclock=1196865323 where itemid=32075
18082:20071205:083523 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

18082:20071205:083523 End update_item()
18082:20071205:083523 In update_functions(32075)
18082:20071205:083523 Query [select distinct function,parameter,itemid,lastvalue from functions where itemid=32075]
18133:20071205:083523 Query [delete from history_uint where itemid=25049 and clock<14400]
18082:20071205:083523 Query::select distinct function,parameter,itemid,lastvalue from functions where itemid=32075
18082:20071205:083523 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

18084:20071205:083523 After write()
18133:20071205:083523 In delete_history(history_str,25049,51404973899367055 43,0)
18133:20071205:083523 Query [select min(clock) from history_str where itemid=25049]
18133:20071205:083523 Query [delete from history_str where itemid=25049 and clock<14400]
17869:20071205:083523 One child process died. Exiting ...
... continues ...

18096:20071205:083523 Got signal. Exiting ...
18154:20071205:083523 Got signal. Exiting ...
18153:20071205:083523 Got signal. Exiting ...
17869:20071205:083525 ZABBIX Server stopped



i deleted the duplicated records (967 rows) but it seems they are coming from other table and the deuplicated key insert happends again.

zabbix=> delete from trends where clock=1196863200;

[root@xx ~]# ll /var/run/zabbix/zabbix_server.pid
ls: /var/run/zabbix/zabbix_server.pid: No such file or directory

when i start zabbix there is no zabbix PID, but the logs shows this

/usr/local/sbin/zabbix_server [11086]: File [/var/run/zabbix/zabbix_server.pid] exists and locked. Is this process already running ?
/usr/local/sbin/zabbix_server [11086]: ERROR: File [/var/run/zabbix/zabbix_server.pid] exists and locked. Is this process already running ?
/usr/local/sbin/zabbix_server [11097]: File [/var/run/zabbix/zabbix_server.pid] exists and locked. Is this process already running ?
/usr/local/sbin/zabbix_server [11097]: ERROR: File [/var/run/zabbix/zabbix_server.pid] exists and locked. Is this process already running ?


i have:
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
postgres (PostgreSQL) 8.2.4
ZABBIX Server (daemon) v1.4.2 (20 August 2007)

rodelapena
07-12-2007, 21:12
my zabbix server continues falling, it's not operative anymore, in the instant a start it it falls with the messages posted earlier, no one has an idea to find out what is happening??

please help me

Niels
10-12-2007, 08:22
Do you have another path to the pid file in your server config? Is the volume full?

rodelapena
10-12-2007, 17:11
thanks for the reply

the pid problem doesnt show anymore, but the server stoped continues
the volume is not full
/dev/sda5 65G 39G 23G 63% /

i have a directory to allocate zabbix pids

[root@nserver2 ~]# vi /etc/zabbix_agentd.conf
[root@nserver2 ~]# ll /var/run/zabbix/
total 8
-rw-rw-r-- 1 zabbix zabbix 5 Dec 6 09:03 zabbix_agentd.pid
-rw-rw-r-- 1 zabbix zabbix 5 Dec 10 10:08 zabbix_server.pid

server file:
PidFile=/var/run/zabbix/zabbix_server.pid
agent file:
PidFile=/var/run/zabbix/zabbix_agentd.pid


Stop error

[root@nserver2 ~]# tail -f /var/log/zabbix/zabbix_server.log
30701:20071210:101400 Query::insert into trends (clock,itemid,num,value_min,value_avg,value_max) values (1197302400,32675,1,1.000000,1.000000,1.000000)
30701:20071210:101400 Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key violates unique constraint "trends_pkey"

30701:20071210:101400 Query::update items set nextcheck=1197303245,prevvalue=lastvalue,lastvalue ='1',lastclock=1197303240 where itemid=32675
30701:20071210:101400 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

30701:20071210:101400 Query::select distinct function,parameter,itemid,lastvalue from functions where itemid=32675
30701:20071210:101400 Query failed:PGRES_FATAL_ERROR:ERROR: current transaction is aborted, commands ignored until end of transaction block

30609:20071210:101402 ZABBIX Server stopped

Niels
11-12-2007, 08:19
Hmm... To me it looks like your database is borked. When those duplicate key violations start occurring, the game is usually lost, in my experience. So my only advice is to start over, but maybe others can come up with some more insightfull and less drastic ideas.

Edit: And there's this: https://support.zabbix.com/browse/ZBX-194

rodelapena
11-12-2007, 20:40
God no!!

Alexei has something to say about this problem??

how this database problems are generated?

do i have to start over?

took months to get here, i lose my time??

Niels
12-12-2007, 08:26
Back up you database now!

You could try deleting offending rows from the trends table, or all of them -- after all, you've nothing to lose.

And get a second and third opinion, don't just trust me.

rodelapena
13-12-2007, 21:27
what is the function or the trends table? in my database is very big, how can i debug information from it??

Alexei
13-12-2007, 23:10
I would suggest switching to MySQL for now. You will get much better performance and probably better support as we are using MySQL as a primary development database engine.

rodelapena
14-12-2007, 17:42
i have:
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
postgres (PostgreSQL) 8.2.4
ZABBIX Server (daemon) v1.4.2 (20 August 2007)

and

mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline 4.3

in my server, and i can't move to mysql 5, what should i do???

switch to MySQL or stay in postgres???

thanks Alexei

Alexei
14-12-2007, 19:14
MySQL 4.x will work absolutely fine. I would switch to MySQL.