Ad Widget

Collapse

1.8 proxy won't run on FreeBSD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frankcheong
    Member
    • Oct 2009
    • 73

    #1

    1.8 proxy won't run on FreeBSD

    I have build a version 1.8 proxy using the command line below:-

    exec /bin/sh "./configure" '--disable-agent' '--with-net-snmp=/usr/local/bin/net-snmp-config' '--with-curl=/usr/local/bin/curl-config' '--enable-proxy' '--with-ldap=/usr/local' '--with-mysql=/usr/local/bin/mysql_config' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.2' 'build_alias=i386-portbld-freebsd7.2' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe -DLDAP_DEPRECATED' $ac_configure_extra_args --no-create --no-recursion

    The build is successful and I can do make install also. While when I tried to run the proxy it failed with the below error message:-

    81668:20091210:100308.422 Starting zabbix_proxy. Zabbix 1.8 (revision 8565).
    81668:20091210:100308.423 **** Enabled features ****
    81668:20091210:100308.423 SNMP monitoring: YES
    81668:20091210:100308.423 IPMI monitoring: NO
    81668:20091210:100308.423 WEB monitoring: YES
    81668:20091210:100308.423 ODBC: NO
    81668:20091210:100308.423 SSH2 support: NO
    81668:20091210:100308.423 IPv6 support: NO
    81668:20091210:100308.423 **************************
    81668:20091210:100308.423 Can't allocate shared memory of size 8388608 [Cannot allocate memory]
    81668:20091210:100308.423 Can't allocate shared memory for configuration cache.

    In the zabbix_proxy.conf I just configured hostname as well as path. All else left default. So what is the possible problem that I am enocuntering?
  • frankcheong
    Member
    • Oct 2009
    • 73

    #2
    sorry, the command line used should be below instead:-

    ./configure --disable-agent --with-net-snmp=/usr/local/bin/net-snmp-config --with-curl=/usr/local/bin/curl-config --
    enable-proxy --with-ldap=/usr/local --with-mysql=/usr/local/bin/mysql_config --prefix=/usr/local --mandir=/usr/local/man
    --infodir=/usr/local/info/ --build=i386-portbld-freebsd7.2

    Comment

    • simonc
      Member
      • Jul 2009
      • 73

      #3
      Try to clean your semaphores.
      Take a look at ipcs and ipcrm tools.

      Comment

      • frankcheong
        Member
        • Oct 2009
        • 73

        #4
        did clean the queue using the ipcrm. now ipcs -a return nothing. While the result is the same. Any other clue?

        Comment

        • frankcheong
          Member
          • Oct 2009
          • 73

          #5
          Is that related the sysctl setting of my freeBSD? What is the required sysctl setting? Pls find below the sysctl -a (cutting only related settings) for your quick reference.

          [root@host /usr/local/etc/rc.d]# sysctl -a
          kern.ostype: FreeBSD
          kern.osrelease: 7.2-RELEASE-p4
          kern.osrevision: 199506
          kern.version: FreeBSD 7.2-RELEASE-p4 #0: Thu Oct 15 12:21:31 HKT 2009
          [email protected]:/usr/obj/usr/src/sys/GENERIC

          kern.maxvnodes: 100000
          kern.maxproc: 6164
          kern.maxfiles: 12328
          kern.argmax: 262144
          kern.securelevel: -1
          kern.hostname: host.domain.com
          kern.hostid: 90238036
          kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 }
          kern.posix1version: 200112
          kern.ngroups: 16
          kern.job_control: 1
          kern.saved_ids: 0
          kern.boottime: { sec = 1256034592, usec = 631618 } Tue Oct 20 18:29:52 2009
          kern.domainname:
          kern.osreldate: 702000
          kern.bootfile: /boot/kernel/kernel
          kern.maxfilesperproc: 11095
          kern.maxprocperuid: 5547
          kern.ipc.maxsockbuf: 262144
          kern.ipc.sockbuf_waste_factor: 8
          kern.ipc.somaxconn: 128
          kern.ipc.max_linkhdr: 16
          kern.ipc.max_protohdr: 60
          kern.ipc.max_hdr: 76
          kern.ipc.max_datalen: 128
          kern.ipc.nmbjumbo16: 3200
          kern.ipc.nmbjumbo9: 6400
          kern.ipc.nmbjumbop: 12800
          kern.ipc.nmbclusters: 25600
          kern.ipc.piperesizeallowed: 1
          kern.ipc.piperesizefail: 0
          kern.ipc.pipeallocfail: 0
          kern.ipc.pipefragretry: 0
          kern.ipc.pipekva: 475136
          kern.ipc.maxpipekva: 16777216
          kern.ipc.msgseg: 2048
          kern.ipc.msgssz: 8
          kern.ipc.msgtql: 40
          kern.ipc.msgmnb: 2048
          kern.ipc.msgmni: 40
          kern.ipc.msgmax: 16384
          kern.ipc.semaem: 16384
          kern.ipc.semvmx: 32767
          kern.ipc.semusz: 136
          kern.ipc.semume: 10
          kern.ipc.semopm: 100
          kern.ipc.semmsl: 60
          kern.ipc.semmnu: 30
          kern.ipc.semmns: 60
          kern.ipc.semmni: 10
          kern.ipc.semmap: 30
          kern.ipc.shm_allow_removed: 0
          kern.ipc.shm_use_phys: 0
          kern.ipc.shmall: 8192
          kern.ipc.shmseg: 128
          kern.ipc.shmmni: 192
          kern.ipc.shmmin: 1
          kern.ipc.shmmax: 33554432
          kern.ipc.maxsockets: 25600
          kern.ipc.numopensockets: 202
          kern.ipc.nsfbufsused: 0
          kern.ipc.nsfbufspeak: 7
          kern.ipc.nsfbufs: 6656
          vm.vmtotal:
          System wide totals computed every five seconds: (values in kilobytes)
          ===============================================
          Processes: (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 37)
          Virtual Memory: (Total: 2328128K, Active 151892K)
          Real Memory: (Total: 169352K Active 53716K)
          Shared Virtual Memory: (Total: 12624K Active: 8432K)
          Shared Real Memory: (Total: 8372K Active: 6784K)
          Free Memory Pages: 2212044K

          vm.loadavg: { 0.00 0.03 0.06 }
          vm.v_free_min: 4896
          vm.v_free_target: 20635
          vm.v_free_reserved: 1051
          vm.v_inactive_target: 30952
          vm.v_cache_min: 20635
          vm.v_cache_max: 41270
          vm.v_pageout_free_min: 34
          vm.pageout_algorithm: 0
          vm.swap_enabled: 1
          vm.kmem_size_scale: 3
          vm.kmem_size_max: 335544320
          vm.kmem_size_min: 0
          vm.kmem_size: 335544320
          vm.nswapdev: 1
          vm.dmmax: 32
          vm.swap_async_max: 4
          vm.zone_count: 84
          vm.swap_idle_threshold2: 10
          vm.swap_idle_threshold1: 2
          vm.exec_map_entries: 16
          vm.stats.misc.zero_page_count: 86
          vm.stats.misc.cnt_prezero: 0
          vm.stats.vm.v_kthreadpages: 0
          vm.stats.vm.v_rforkpages: 0
          vm.stats.vm.v_vforkpages: 13244050
          vm.stats.vm.v_forkpages: 96837071
          vm.stats.vm.v_kthreads: 48
          vm.stats.vm.v_rforks: 0
          vm.stats.vm.v_vforks: 73769
          vm.stats.vm.v_forks: 508986
          vm.stats.vm.v_interrupt_free_min: 2
          vm.stats.vm.v_pageout_free_min: 34
          vm.stats.vm.v_cache_max: 41270
          vm.stats.vm.v_cache_min: 20635
          vm.stats.vm.v_cache_count: 78
          vm.stats.vm.v_inactive_count: 158413
          vm.stats.vm.v_inactive_target: 30952
          vm.stats.vm.v_active_count: 11282
          vm.stats.vm.v_wire_count: 46322
          vm.stats.vm.v_free_count: 552933
          vm.stats.vm.v_free_min: 4896
          vm.stats.vm.v_free_target: 20635
          vm.stats.vm.v_free_reserved: 1051
          vm.stats.vm.v_page_count: 769252
          vm.stats.vm.v_page_size: 4096
          vm.stats.vm.v_tfree: 53493235
          vm.stats.vm.v_pfree: 32701223
          vm.stats.vm.v_dfree: 0
          vm.stats.vm.v_tcached: 511
          vm.stats.vm.v_pdpages: 0
          vm.stats.vm.v_pdwakeups: 0
          vm.stats.vm.v_reactivated: 354
          vm.stats.vm.v_intrans: 22383
          vm.stats.vm.v_vnodepgsout: 0
          vm.stats.vm.v_vnodepgsin: 12576
          vm.stats.vm.v_vnodeout: 0
          vm.stats.vm.v_vnodein: 2034
          vm.stats.vm.v_swappgsout: 0
          vm.stats.vm.v_swappgsin: 0
          vm.stats.vm.v_swapout: 0
          vm.stats.vm.v_swapin: 0
          vm.stats.vm.v_ozfod: 1400476
          vm.stats.vm.v_zfod: 30293184
          vm.stats.vm.v_cow_optim: 21191
          vm.stats.vm.v_cow_faults: 15339207
          vm.stats.vm.v_vm_faults: 58191282
          vm.stats.sys.v_soft: 764716072
          vm.stats.sys.v_intr: 9072204
          vm.stats.sys.v_syscall: 738986931
          vm.stats.sys.v_trap: 95669961
          vm.stats.sys.v_swtch: 2087470642
          vm.stats.object.bypasses: 184348
          vm.stats.object.collapses: 1729856
          vm.v_free_severe: 2973
          vm.max_proc_mmap: 49344
          vm.old_msync: 0
          vm.msync_flush_flags: 3
          vm.boot_pages: 48
          vm.max_wired: 255673
          vm.pageout_lock_miss: 0
          vm.disable_swapspace_pageouts: 0
          vm.defer_swapspace_pageouts: 0
          vm.swap_idle_enabled: 0
          vm.pageout_stats_interval: 5
          vm.pageout_full_stats_interval: 20
          vm.pageout_stats_max: 20635
          vm.max_launder: 32
          vm.phys_segs:

          Comment

          • frankcheong
            Member
            • Oct 2009
            • 73

            #6
            eventually I have successfully get around the problem by modifying the below two setting as below:-
            kern.ipc.shmall=40960000
            kern.ipc.shmmax=204800000

            I believe it would be too large but I really don't have an idea on how large should I modify the setting before I can get it run, so a bit overkilling. Grateful if anyone got an idea on a better setting.

            Comment

            • kangaroos
              Junior Member
              • Jul 2009
              • 6

              #7
              Same problem with zabbix_server and same solution, thank you

              Comment

              • frankcheong
                Member
                • Oct 2009
                • 73

                #8
                Have read thru some other webpages

                http://www.linuxquestions.org/questi...riable-607991/


                and revised the setting as belows:-

                kern.ipc.shmall=409600
                kern.ipc.shmmax=204800000

                Though it is for linux but I guess it should be similar. While I really have no idea on the effect of tuning the shared memory? If not, I guess the default would be all available memory, so dare not setting this figures too high.

                Comment

                • frankcheong
                  Member
                  • Oct 2009
                  • 73

                  #9
                  I have a linux server with default setting for shmmax and shmall as below:-

                  cat /proc/sys/kernel/shmmax
                  4294967295
                  cat /proc/sys/kernel/shmall
                  268435456

                  whereby it also complain can't allocation share memory with below message:-
                  Can't find shared memory for database cache. [No such file or directory]

                  Anyway, I have then switched using the PAE kernel without turning those parameter, but it works by then. Really don't know what is the problem.

                  Comment

                  Working...