Ad Widget

Collapse

1.4.1 zabbix-agentd not working on SLES 9.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marc
    Senior Member
    • Oct 2004
    • 146

    #1

    1.4.1 zabbix-agentd not working on SLES 9.3

    21924:20070630:231816 zabbix_agentd started. ZABBIX 1.4.1.
    21924:20070630:231816 Can't allocate shared memory for collector. [Invalid argument]

    nothing more in logfiles. builded from zabbix-1.4.1.tar.gz without any error while compiling. i can submit configure log tomorrow.
  • marc
    Senior Member
    • Oct 2004
    • 146

    #2
    1.4.1 zabbix-server not working well on ubuntu 6.10

    server is starting and running, but active checks cannot get synct from agent 1.4. nor 1.4.1. nothing in th elogs even not with DebugLevel4.

    Comment

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

      #3
      Originally posted by marc
      21924:20070630:231816 zabbix_agentd started. ZABBIX 1.4.1.
      21924:20070630:231816 Can't allocate shared memory for collector. [Invalid argument]

      nothing more in logfiles. builded from zabbix-1.4.1.tar.gz without any error while compiling. i can submit configure log tomorrow.
      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

      • marc
        Senior Member
        • Oct 2004
        • 146

        #4
        location is /opt/foobar/deps/zabbix/bin/zabbix_agentd conffile is /opt/foobar/deps/zabbix/etc/zabbix_agentd.conf.
        its started by /opt/foobar/deps/zabbix/bin/zabbix_agentd -c /opt/foobar/deps/zabbix/etc/zabbix_agentd.conf. using this command since 1.1.4 and it used to be always fine this way
        Last edited by marc; 01-07-2007, 22:31.

        Comment

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

          #5
          I believe it can be related to security settings of your operating system. I have no other ideas yet...
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • marc
            Senior Member
            • Oct 2004
            • 146

            #6
            maybe this helps... Its reproduceble just when running active checks. DisableActive checks and agent is up..

            straced one with active checks on (strace2.out ) one without active checks.
            diif:
            cmtabb01:/home/qx56451/zabbix-1.4.1 # diff strace.out strace2.out
            55c55
            < fstat(3, {st_mode=S_IFREG|0644, st_size=4110, ...}) = 0
            ---
            > fstat(3, {st_mode=S_IFREG|0644, st_size=4109, ...}) = 0
            58c58
            < read(3, "ogstat.pl $1\n\n", 4096) = 14
            ---
            > read(3, "gstat.pl $1\n\n", 4096) = 13
            63c63
            < fstat(3, {st_mode=S_IFREG|0644, st_size=4110, ...}) = 0
            ---
            > fstat(3, {st_mode=S_IFREG|0644, st_size=4109, ...}) = 0
            66c66
            < read(3, "ogstat.pl $1\n\n", 4096) = 14
            ---
            > read(3, "gstat.pl $1\n\n", 4096) = 13
            86c86
            < poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1
            ---
            > poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 5000) = 1
            94,95c94
            < clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD, child_tidptr=0x2a95c17b90) = 13663
            < --- SIGCHLD (Child exited) @ 0 (0) ---
            ---
            > clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD, child_tidptr=0x2a95c17b90) = 16449

            strace with active checks
            execve("src/zabbix_agent/zabbix_agentd", ["src/zabbix_agent/zabbix_agentd", "-c", "/opt/foobar/deps/zabbix"...], [/* 56 vars */]) = 0
            uname({sys="Linux", node="cmtabb01", ...}) = 0
            brk(0) = 0x51c000
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9556b000
            access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
            open("/etc/ld.so.cache", O_RDONLY) = 3
            fstat(3, {st_mode=S_IFREG|0644, st_size=50452, ...}) = 0
            mmap(NULL, 50452, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a9556c000
            close(3) = 0
            open("/lib64/tls/libm.so.6", O_RDONLY) = 3
            read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\ 0 A\0\0\0"..., 640) = 640
            fstat(3, {st_mode=S_IFREG|0755, st_size=418347, ...}) = 0
            mmap(NULL, 1407192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2a9566d000
            madvise(0x2a9566d000, 1407192, MADV_SEQUENTIAL|0x1) = 0
            mprotect(0x2a956c1000, 1063128, PROT_NONE) = 0
            mmap(0x2a957c1000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54000) = 0x2a957c1000
            close(3) = 0
            open("/lib64/libresolv.so.2", O_RDONLY) = 3
            read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000 ;\0\0"..., 640) = 640
            fstat(3, {st_mode=S_IFREG|0755, st_size=85276, ...}) = 0
            mmap(NULL, 1129824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2a957c5000
            madvise(0x2a957c5000, 1129824, MADV_SEQUENTIAL|0x1) = 0
            mprotect(0x2a957d5000, 1064288, PROT_NONE) = 0
            mmap(0x2a958d4000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x2a958d4000
            mmap(0x2a958d7000, 7520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a958d7000
            close(3) = 0
            open("/lib64/libnsl.so.1", O_RDONLY) = 3
            read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`J\ 0\0\0"..., 640) = 640
            fstat(3, {st_mode=S_IFREG|0755, st_size=97929, ...}) = 0
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a958d9000
            mmap(NULL, 1135272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2a958da000
            madvise(0x2a958da000, 1135272, MADV_SEQUENTIAL|0x1) = 0
            mprotect(0x2a958eb000, 1065640, PROT_NONE) = 0
            mmap(0x2a959eb000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2a959eb000
            mmap(0x2a959ee000, 4776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a959ee000
            close(3) = 0
            open("/lib64/tls/libc.so.6", O_RDONLY) = 3
            read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\3 13\1\0"..., 640) = 640
            lseek(3, 624, SEEK_SET) = 624
            read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\ 0\0\0"..., 32) = 32
            fstat(3, {st_mode=S_IFREG|0755, st_size=1424617, ...}) = 0
            mmap(NULL, 2254664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2a959f0000
            madvise(0x2a959f0000, 2254664, MADV_SEQUENTIAL|0x1) = 0
            mprotect(0x2a95afb000, 1161032, PROT_NONE) = 0
            mmap(0x2a95bfa000, 102400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10a000) = 0x2a95bfa000
            mmap(0x2a95c13000, 14152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a95c13000
            close(3) = 0
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95c17000
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95c18000
            arch_prctl(ARCH_SET_FS, 0x2a95c17b00) = 0
            munmap(0x2a9556c000, 50452) = 0
            brk(0) = 0x51c000
            brk(0x53d000) = 0x53d000
            open("/opt/foobar/deps/zabbix/etc/zabbix_agentd.conf", O_RDONLY) = 3
            fstat(3, {st_mode=S_IFREG|0644, st_size=4109, ...}) = 0
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9556c000
            read(3, "# This is config file for zabbix"..., 4096) = 4096
            read(3, "gstat.pl $1\n\n", 4096) = 13
            read(3, "", 4096) = 0
            close(3) = 0
            munmap(0x2a9556c000, 4096) = 0
            open("/opt/foobar/deps/zabbix/etc/zabbix_agentd.conf", O_RDONLY) = 3
            fstat(3, {st_mode=S_IFREG|0644, st_size=4109, ...}) = 0
            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9556c000
            read(3, "# This is config file for zabbix"..., 4096) = 4096
            read(3, "gstat.pl $1\n\n", 4096) = 13
            read(3, "", 4096) = 0
            close(3) = 0
            munmap(0x2a9556c000, 4096) = 0
            getuid() = 0
            socket(PF_FILE, SOCK_STREAM, 0) = 3
            fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
            fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
            fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
            connect(3, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) = 0
            poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
            writev(3, [{"\2\0\0\0\v\0\0\0\7\0\0\0", 12}, {"passwd\0", 7}], 2) = 19
            poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1
            recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\350\254f\225*\0\0", 7}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 0
            close(3) = 0
            socket(PF_FILE, SOCK_STREAM, 0) = 3
            fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
            fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
            connect(3, {sa_family=AF_FILE, path="/var/run/.nscd_socket"}, 110) = 0
            poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1
            writev(3, [{"\2\0\0\0\0\0\0\0\7\0\0\0", 12}, {"zabbix\0", 7}], 2) = 19
            poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 5000) = 1
            read(3, "\2\0\0\0\1\0\0\0\7\0\0\0\2\0\0\0\23\345\0\0\f\0\0 \0\27"..., 36) = 36
            read(3, "zabbix\0x\0Zabbix Monitoring User\0"..., 56) = 56
            close(3) = 0
            setgid(12) = 0
            setuid(58643) = 0
            setresgid(-1, 12, -1) = 0
            setresuid(-1, 58643, -1) = 0
            clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGC HLD, child_tidptr=0x2a95c17b90) = 16449
            exit_group(0) = ?
            Last edited by marc; 01-07-2007, 22:33.

            Comment

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

              #7
              The traces didn't help. The agent fails on creation of shared memory. I still don't know why it fails on your system...
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • marc
                Senior Member
                • Oct 2004
                • 146

                #8
                i downgraded anything to 1.1.7 now and its working like a charm again.

                i cannot use 1.4.1 in production at the moment, as described there are lots of issues i even had no time to spend on. (zabbix_server eg. may have a serios problem, not collecting any data even not simple checks... and syncronisation of active checks wasnt working with 1.4 agent/server too where server is running on ubuntu 6.10) if you are interested i can tar all my binaries, zabbixdump.sql tomorrow and send you a download url by mail because it would take to much time to rip all customer data off to post in public.

                i also can offer to help debbuging the SuSE issue if you tell me what you need. straces not a help.. just tell me what else would be interesting for you.

                its a default SLES installation patchlevel 3. no special security mechs activated. just minimum base install with a software package running in /opt. all the rest is Suse Enterprise default.

                Comment

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

                  #9
                  Originally posted by marc
                  read(3, "# This is config file for zabbix"..., 4096) = 4096
                  Hmm, length of the first line of your config file is more than 4K. Something is really wrong here...
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • marc
                    Senior Member
                    • Oct 2004
                    • 146

                    #10
                    du -b /opt/foobar/deps/zabbix/etc/zabbix_agentd.conf = 4109

                    this used to be the conf.. now active checks are disabled again and iam working in polling mode 1.1.7 server where anything is ok with this conf.

                    # This is config file for zabbix_agentd
                    # To get more information about ZABBIX, go http://www.zabbix.com

                    ############ GENERAL PARAMETERS #################

                    # List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
                    # No spaces allowed. First entry is used for sending active checks.
                    # Note that hostnames must resolve hostname->IP address and
                    # IP address->hostname.

                    Server=xxx.xxx.xxx.xxy

                    # Server port for sending active checks

                    ServerPort=10051

                    # Unique hostname. Required for active checks.

                    Hostname=cmtamta1

                    # Listen port. Default is 10050

                    ListenPort=10050

                    # IP address to bind agent
                    # If missing, bind to all available IPs

                    ListenIP=xxx.xxx.xxx.xyy

                    # Number of pre-forked instances of zabbix_agentd.
                    # Default value is 5
                    # This parameter must be between 1 and 16

                    StartAgents=5

                    # How often refresh list of active checks. 2 minutes by default.

                    RefreshActiveChecks=120

                    # Disable active checks. The agent will work in passive mode listening server.

                    #DisableActive=1

                    # Enable remote commands for ZABBIX agent. By default remote commands disabled.

                    #EnableRemoteCommands=1

                    # Specifies debug level
                    # 0 - debug is not created
                    # 1 - critical information
                    # 2 - error information
                    # 3 - warnings
                    # 4 - information (default)
                    # 5 - for debugging (produces lots of information)

                    DebugLevel=4

                    # Name of PID file

                    PidFile=/var/run/zabbix/zabbix_agentd.pid

                    # Name of log file.
                    # If not set, syslog will be used

                    LogFile=/var/log/zabbix/zabbix_agentd.log

                    # Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
                    LogFileSize=5

                    # Spend no more than Timeout seconds on processing
                    # Must be between 1 and 30
                    30

                    ####### USER-DEFINED MONITORED PARAMETERS #######
                    # Format: UserParameter=<key>,<shell command>
                    # Note that shell command must not return empty string or EOL only
                    #UserParameter=system.test,who|wc -l
                    ### Set of parameter for monitoring MySQL server (v3.23.42 and later)
                    ### Change -u<username> and add -p<password> if required
                    #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
                    #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
                    #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
                    #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
                    #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
                    #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
                    #UserParameter=mysql.version,mysql -V
                    UserParameter=cmta.sendmailenabled[*],/etc/init.d/sendmail status enabled $1
                    UserParameter=cmta.sendmailup[*],/etc/init.d/sendmail status up $1
                    UserParameter=cmta.sendmailqueue[*],/etc/init.d/sendmail status queue $1
                    UserParameter=cmta.mailscannerenabled[*],/etc/init.d/mailscanner status enabled $1
                    UserParameter=cmta.mailscannerup[*],/etc/init.d/mailscanner status up $1
                    UserParameter=cmta.mailscannerqueue[*],/etc/init.d/mailscanner status queue $1
                    UserParameter=cmta.logpipe,ps -fu root | grep -c "/opt/foobar/deps/perl/bin/perl /opt/foobar/admin/bin/logpipe.pl"
                    UserParameter=cmta.syslogngup,/etc/init.d/syslog-ng status up
                    UserParameter=cmta.mailspermin,grep "`date -d '1 minute ago' '+%Y-%m-%dT%H:%M'`" /var/log/mail | grep -c DATA
                    UserParameter=cmta.dbconnect,. /opt/foobar/setup.conf; echo "show tables;"|/opt/foobar/deps/mysql-4.1.18/bin/mysql -u$DB_USER -h$DB_HOST $DB_DATABASE >/dev/null 2>&1; echo $(( ! $? ))
                    UserParameter=uvscan.pattern,cd /usr/local/uvscan ; ./uvscan --version | grep "Virus data" | cut -d" " -f4 | sed -e "s/v//g"
                    UserParameter=ldap.control,/opt/foobar/openldap/bin/ldapsearch -x -h localhost -p 389 -b "ou=Misc,ou=Groups,o=foobar,c=de" -LLL "cn=LdapControl" description | tail -n 2 | cut -d ":" -f 2 | sed -e "s/^ //"
                    UserParameter=ldap.master,/opt/foobar/openldap/bin/ldapsearch -x -h lp0056.muc -p 489 -b "ou=Misc,ou=Groups,o=foobar,c=de" -LLL "cn=LdapControl" description | tail -n 2 | cut -d ":" -f 2 | sed -e "s/^ //"
                    UserParameter=cmta.milterdisclaimer,ps -ef | grep -v grep | grep -c milter.disclaimer.pl
                    UserParameter=cmta.logstat[*],/opt/foobar/admin/bin/logstat.pl $1
                    Last edited by marc; 01-07-2007, 22:44.

                    Comment

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

                      #11
                      # Spend no more than Timeout seconds on processing
                      # Must be between 1 and 30
                      30

                      Is it copy&paste problem?
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • marc
                        Senior Member
                        • Oct 2004
                        • 146

                        #12
                        yes it is. The line is
                        Timeout 30

                        Comment

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

                          #13
                          It works fine with your config here. Please check ownership and permissions of:

                          PidFile=/var/run/zabbix/zabbix_agentd.pid
                          LogFile=/var/log/zabbix/zabbix_agentd.log

                          /var/log/zabbix must be writable by ZABBIX agent for log rotation. Is there any IPC resources (ipcs) owned by ZABBIX when the agent is not running? Remove them (ipcrm) and restart it.

                          Oner thing to try: copy file ZABBIX agent to a different location and restart ZABBIX agent with new log file.
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          • marc
                            Senior Member
                            • Oct 2004
                            • 146

                            #14
                            i will setup 14 in integration setup later today and then try to help debugging. in production i cannot verify now because of downgrade to 1.1.7

                            Comment

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

                              #15
                              I would be very interesting in more details about this issue, yet I'm quite confident it is related to some specifics of your setup.
                              Alexei Vladishev
                              Creator of Zabbix, Product manager
                              New York | Tokyo | Riga
                              My Twitter

                              Comment

                              Working...