PDA

View Full Version : [1.4.1] zabbix_agentd doesn't start afert upgrade...


bobrivers
01-07-2007, 04:28
Hi,

I did the upgrade from 1.4 to 1.4.1.

Server side looks like working well (zabbix_server). But I'm trying to deploy the agents and I'm not going so well.

I have 4 linux boxes that were installed with the same media, and all of them has the same update level. We are using RedHat EL Update 4 (plus patches).

I unpacked 1.4.1, and then I run "./configure --enable-agent". Looks like nothing wrong happened:


....
config.status: executing depfiles commands


Configuration:

Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux

Compiler: gcc
Compiler flags: -g -O2
Linker flags:
Libraries: -lm -lresolv -lnsl

Enable server: no
With database: no

Enable agent: yes

************************************************** *********
* Now run 'make install' *
* *
* Thank you for using ZABBIX! *
* <http://www.zabbix.com> *
************************************************** *********


Then I "make install" and again, no errors message appears. If I do a "./zabbix_agentd -p" it works fine (except for my userparameter -- see my previous post).

But when I try to start it, it does't work. Looking into the log, it shows:

23131:20070630:220520 Can't allocate shared memory for collector. [Invalid argument]

The funny thing, is that it worked in 2 boxes. The other two no (same problem). I did the same steps...

I don't know if zabbix has I problem, or if I have a problem. I thought that the boxes were absolutly equal...

If I rollback to 1.4, it works well....

Any hint?

TIA,

Bob

Alexei
01-07-2007, 08:29
How do you start zabbix_agentd? What is location of zabbix_agentd.conf?

Alexei
01-07-2007, 13:21
It can be related to RH security settings, not quite sure.

bobrivers
01-07-2007, 19:00
Hi,

I was trying to start it from command line:

/usr/local/bin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf

I also tried to chmod 777 zabbix_agentd. I also tried to start it as root.

No security settings are enabled. No iptables or selinux...

I will post more information afterwards. Today we will reboot the server (do to a hardware maintenance)... Who knows...

Alexei
01-07-2007, 21:36
The code didn't change since 1.4, by the way.

EtherTrogg
03-07-2007, 00:26
I am also running into this issue.

I have two identical FreeBSD 6.2 systems running the 1.4.1 agent. System #1 runs the agent without trouble. System #2 fails with "Can't allocate shared memory for collector. ".

[I]zabbix_agentd.conf
Server=<IP of zabbix server>
ServerPort=10051
Hostname=<FQDN of client system>
ListenPort=10050
StartAgents=5
RefreshActiveChecks=120
DisableActive=0
EnableRemoteCommands=1
DebugLevel=4
PidFile=/var/tmp/zabbix_agentd.pid
LogFile=/var/tmp/zabbix_agentd.log
LogFileSize=5
Timeout=3

Since both systems are exact clones, I would expect to see this problem on both.

kempkep
29-08-2007, 02:41
Check you value for SHMMAX.

It looks like the 1.4.2 version uses a shared memory segment of size 1067408.

If your SHMMAX is less than that then the agent won't start as a daemon. It will run okay from command line eg: zabbix_agentd -p.

nonaka_nona_to
27-09-2007, 11:26
I also encounterd same problem, "Can't allocate shared memory for collector." message, in FreeBSD-6.2-STABLE and zabbix-1.4.2.

By stopping PostgreSQL's postmaster, I could start zabbix_agentd.
Before extending shmmax I could start one of postmaster or zabbix_agentd, but not both.

from http://developer.postgresql.org/pgdocs/postgres/kernel-resources.html
# sysctl -w kern.ipc.shmmax=134217728

After executing above command, both postmaster and zabbix_agentd started.

You can check shared memory status using ipcs command.
# ipcs -ma
You can set FreeBSD kernel value upon boot using /etc/sysctl.conf,
but I'm not going to reboot my system, you check it.

Thanks, kempkep!!

Niels
27-09-2007, 13:36
I have a similar problem on Linux, with r4798: The server dies.

2393:20070927:133151 zbx_realloc: out of memory. requested '1064960' bytes.
2387:20070927:133152 One child process died. Exiting ...
2387:20070927:133154 ZABBIX Server stopped

Myke
28-09-2007, 06:31
[root@drc ~]# grep ipc /etc/sysctl.conf
kern.ipc.shmmax=134217728
kern.ipc.shmall=16384
[root@drc ~]#


Now I'm working (with mildly insane values)

Niels
28-09-2007, 09:28
[root@drc ~]# grep ipc /etc/sysctl.conf
kern.ipc.shmmax=134217728
kern.ipc.shmall=16384
[root@drc ~]#


Now I'm working (with mildly insane values)

These values don't help me, I still get the exact same crash.

Does the amount of RAM in the machine matter here? I'll try putting some more in and see what happens.

Niels
01-10-2007, 11:39
Developers, can you please take a look at this?

maksim
03-10-2007, 08:33
Stop you zabbix_agentd if running and zabbix_server (if they running on this server also).

# ipcs
Message Queues:
T ID KEY MODE OWNER GROUP

Shared Memory:
T ID KEY MODE OWNER GROUP
m 262144 2053858639 --rw-rw-rw- zabbix zabbix
m 131073 5432001 --rw------- pgsql pgsql
m 131074 2053896815 --rw-rw-rw- zabbix zabbix
m 131075 2053858636 --rw-rw-rw- zabbix zabbix
m 65540 21377647 --rw------- root wheel
m 131077 2053856269 --rw-rw-rw- zabbix zabbix
m 131078 2053856259 --rw-rw-rw- zabbix zabbix

Semaphores:
T ID KEY MODE OWNER GROUP
s 196608 2053856259 --rw-rw-rw- zabbix zabbix
s 131073 5432001 --rw------- pgsql pgsql
s 131074 5432002 --rw------- pgsql pgsql
s 131075 5432003 --rw------- pgsql pgsql
s 131076 2053857412 --rw-rw-rw- zabbix zabbix
s 458757 2053858639 --rw-rw-rw- zabbix zabbix
s 131078 2053896815 --rw-rw-rw- zabbix zabbix
s 65543 21377648 --rw------- root wheel
s 196616 2053856269 --rw-rw-rw- zabbix zabbix


if you see Shared Memory or Semaphores with user zabbix - kill him with ipcrm (ipcrm -s semid or ipcrm -m shmid).
Then try again run zabbix_agentd.

Niels
05-10-2007, 13:57
Note: I've not seen my particular error since upgrading to r4835. I'll let it run over the weekend and we'll see.