Ad Widget

Collapse

[1.4.1] zabbix_agentd doesn't start afert upgrade...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobrivers
    Senior Member
    • Feb 2007
    • 115

    #1

    [1.4.1] zabbix_agentd doesn't start afert upgrade...

    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:

    Code:
    ....
    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:

    Code:
    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
    Last edited by bobrivers; 01-07-2007, 04:49.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    How do you start zabbix_agentd? What is location of zabbix_agentd.conf?
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      It can be related to RH security settings, not quite sure.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • bobrivers
        Senior Member
        • Feb 2007
        • 115

        #4
        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...
        Last edited by bobrivers; 01-07-2007, 19:04.

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          The code didn't change since 1.4, by the way.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • EtherTrogg
            Junior Member
            • Jul 2007
            • 10

            #6
            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. [Invalid argument]".

            zabbix_agentd.conf
            Code:
            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.

            Comment

            • kempkep
              Junior Member
              • Feb 2006
              • 18

              #7
              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.

              Comment

              • nonaka_nona_to
                Junior Member
                • Sep 2007
                • 9

                #8
                extending shmmax solved problem

                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/pgdo...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!!

                Comment

                • Niels
                  Senior Member
                  • May 2007
                  • 239

                  #9
                  I have a similar problem on Linux, with r4798: The server dies.

                  Code:
                  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

                  Comment

                  • Myke
                    Junior Member
                    • Feb 2005
                    • 8

                    #10
                    Not just shmmax

                    [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)

                    Comment

                    • Niels
                      Senior Member
                      • May 2007
                      • 239

                      #11
                      Originally posted by Myke
                      [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.

                      Comment

                      • Niels
                        Senior Member
                        • May 2007
                        • 239

                        #12
                        Developers, can you please take a look at this?

                        Comment

                        • maksim
                          Junior Member
                          • Jul 2007
                          • 5

                          #13
                          Stop you zabbix_agentd if running and zabbix_server (if they running on this server also).
                          Code:
                          # 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.

                          Comment

                          • Niels
                            Senior Member
                            • May 2007
                            • 239

                            #14
                            Note: I've not seen my particular error since upgrading to r4835. I'll let it run over the weekend and we'll see.

                            Comment

                            Working...