Ad Widget

Collapse

Zabbix Agent installation issue on Oracle Solaris 10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitist
    Member
    • Apr 2014
    • 30

    #1

    Zabbix Agent installation issue on Oracle Solaris 10

    Hi,

    I am facing issue while installation of Zabbix Agent installation from source. Precisely, the issue is observed while running "configure". Details are below:

    Code:
    #cat /etc/release
                        Oracle Solaris 10 8/11 s10x_u10wos_17b X86
      Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                                Assembled 23 August 2011
    And the error while running configure is:

    Code:
    checking for -m64 compilation flag... yes
    checking for architecture... solaris (solaris2.10)
    checking for ICONV support... configure: error: Unable to use iconv (libiconv check failed)
    I have tried to modify the configure file and commented the statement found_iconv="no". This lead to successful configure run but running make install fails with following error:

    Code:
    make: Fatal error: Command failed for target `all-recursive'

    The, I tried to use gmake for the same, and the error was:

    Code:
    Making all in zabbix_agent
    gmake[2]: Entering directory `/zabbix-2.2.3/src/zabbix_agent'
    gcc -DSYSCONFDIR="\"/usr/local/zabbix/etc\"" -DLIBDIR="\"/usr/local/zabbix/lib\"" -m64 -g -O2      -o zabbix_agent zabbix_agent-zabbix_agent.o zabbix_agent-stats.o zabbix_agent-cpustat.o zabbix_agent-diskdevices.o zabbix_agent-vmstats.o zabbix_agent-zbxconf.o ../../src/libs/zbxsysinfo/libzbxagentsysinfo.a ../../src/libs/zbxsysinfo/solaris/libspecsysinfo.a ../../src/libs/zbxsysinfo/agent/libagentsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxregexp/libzbxregexp.a ../../src/libs/zbxalgo/libzbxalgo.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxexec/libzbxexec.a ../../src/libs/zbxmodules/libzbxmodules.a    -lkvm -lm -lrt -lnsl -lkstat -lsocket  -lresolv
    Undefined                       first referenced
     symbol                             in file
    libiconv_close                      ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
    libiconv_open                       ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
    libiconv                            ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
    
    ld: fatal: symbol referencing errors. No output written to zabbix_agent
    collect2: ld returned 1 exit status
    gmake[2]: *** [zabbix_agent] Error 1
    gmake[2]: Leaving directory `/zabbix-2.2.3/src/zabbix_agent'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/zabbix-2.2.3/src'
    gmake: *** [all-recursive] Error 1
    Later I added below path into the below environment variable:

    Code:
    export LD_PRELOAD=/usr/local/lib/preloadable_libiconv.so

    and the error of gmake changed like shown below:

    Code:
    gmake[2]: Entering directory `/zabbix-2.2.3/src/zabbix_agent'
    gcc -DSYSCONFDIR="\"/usr/local/zabbix/etc\"" -DLIBDIR="\"/usr/local/zabbix/lib\"" -m64 -g -O2      -o zabbix_agent zabbix_agent-zabbix_agent.o zabbix_agent-stats.o zabbix_agent-cpustat.o zabbix_agent-diskdevices.o zabbix_agent-vmstats.o zabbix_agent-zbxconf.o ../../src/libs/zbxsysinfo/libzbxagentsysinfo.a ../../src/libs/zbxsysinfo/solaris/libspecsysinfo.a ../../src/libs/zbxsysinfo/agent/libagentsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxregexp/libzbxregexp.a ../../src/libs/zbxalgo/libzbxalgo.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxexec/libzbxexec.a ../../src/libs/zbxmodules/libzbxmodules.a    -lkvm -lm -lrt -lnsl -lkstat -lsocket  -lresolv
    collect2: ld terminated with signal 9 [Killed]
    ld.so.1: ld: fatal: /usr/local/lib/preloadable_libiconv.so: wrong ELF class: ELFCLASS32
    gmake[2]: *** [zabbix_agent] Error 1
    gmake[2]: Leaving directory `/zabbix-2.2.3/src/zabbix_agent'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/zabbix-2.2.3/src'
    gmake: *** [all-recursive] Error 1
    Now, I suspect there is some environment variable that is not properly set.

    Please help me in this.
    Last edited by rohitist; 22-04-2014, 15:11.
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    On Zabbix Download Page I found 4 different version of Zabbix Agent for Solaris.

    Do you mind to use pre-compiled agent?

    Solaris 9 Agents 2.2.1 sparc Download
    Solaris 10 Agents 2.2.1 amd64 Download
    Solaris 10 Agents 2.2.1 sparc Download
    Solaris 11 Agents 2.2.1 amd64 Download
    Sincerely yours,
    Aleksey

    Comment

    • rohitist
      Member
      • Apr 2014
      • 30

      #3
      Thanks Aib for your reply,

      I had tried both of the versions and both of them failed with below shown error:

      Code:
      :/$ tar xf zabbix_agents_2.2.1.solaris10.amd64.tar
      tar: zabbix_agent - cannot create
      tar: zabbix_agentd - cannot create
      tar: zabbix_get - cannot create
      tar: zabbix_sender - cannot create
      Little I know, but the CPU architecture on which solaris installed is neither SPARC nor AMD. However, i tried with fail.

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        "cannot create" - It can be a problem with insufficient permissions.

        You have to install zabbix_agent from "root" account/privileges.
        Sincerely yours,
        Aleksey

        Comment

        • rohitist
          Member
          • Apr 2014
          • 30

          #5
          Sorry,

          I tried with root user. You can see below also.

          Code:
          [B]root[/B]@app2-voda-zabbix2:/$ tar xf zabbix_agents_2.2.1.solaris10.amd64.tar

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #6
            hmmm...

            It looks like your filesystem doesn't have a space for new directories/files.
            Or it's in rean-only mode (like FreeNAS root-filesystem)

            Sorry, you have to check why you cannot create a files on your server.
            Sincerely yours,
            Aleksey

            Comment

            • kloczek
              Senior Member
              • Jun 2006
              • 1771

              #7
              Originally posted by rohitist
              Hi,
              [..]
              Code:
              checking for -m64 compilation flag... yes
              checking for architecture... solaris (solaris2.10)
              checking for ICONV support... configure: error: Unable to use iconv (libiconv check failed)
              [..]

              collect2: ld terminated with signal 9 [Killed]
              ld.so.1: ld: fatal: /usr/local/lib/preloadable_libiconv.so: wrong ELF class: ELFCLASS32
              gmake[2]: *** [zabbix_agent] Error 1
              gmake[2]: Leaving directory `/zabbix-2.2.3/src/zabbix_agent'
              gmake[1]: *** [all-recursive] Error 1
              gmake[1]: Leaving directory `/zabbix-2.2.3/src'
              gmake: *** [all-recursive] Error 1[/CODE]
              You are compiling 64 bit code (-m64) and at the ed you are trying to link final binary using 32bit libraries (ELFCLASS32). You need to install missing 64bit iconv to finish this.
              Last edited by kloczek; 22-04-2014, 17:42.
              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
              https://kloczek.wordpress.com/
              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
              My zabbix templates https://github.com/kloczek/zabbix-templates

              Comment

              • rohitist
                Member
                • Apr 2014
                • 30

                #8
                Solved !!

                Thanks for your reply.

                I went through many blogs and somewhere I found below parameters to use. And it worked !!

                Code:
                export LD_LIBRARY_PATH=/opt/coolstack/lib/
                
                LIBS=-liconv LDFLAGS=-L/usr/lib ./configure --enable-agent
                The logs are updating fine now. But now my requirement has changed and I am going to create a new thread for a help to setup agentless monitoring.

                Thank you all again for your time.

                Comment

                • aib
                  Senior Member
                  • Jan 2014
                  • 1615

                  #9
                  Agentless???
                  Would you like to use SNMP? Or you have any other options?

                  To tell you the truth, SNMP cannot provide as many data as Zabbix agent can. The most important and useful part of agent is UserParameter which can work with any local scripts and programs to provide specific information about your system.
                  Sincerely yours,
                  Aleksey

                  Comment

                  • shadoon
                    Junior Member
                    • Jul 2014
                    • 1

                    #10
                    In fact you don't need any libiconv.so.2 from solaris 10 :

                    Normally all iconv function are in libc.

                    just get a look at you /usr/local/include and if you have a iconv.h in, it's the problem with gcc.

                    He use the /usr/local/include instead of /usr/include

                    Have a look at this :

                    http://stackoverflow.com/questions/4...ation-of-iconv

                    Comment

                    • reinhrj
                      Junior Member
                      • Dec 2015
                      • 1

                      #11
                      Solaris 10 zabbix_agentd: fatal: libresolv.so.2: version `SUNW_2.3' not found

                      I'm new on this board so sorry if this has been answered elsewhere.

                      I had the issue with the libresolv installing 1.6 on Solaris 10, intel 64 bit.

                      For solaris binaries I usually try OpenCSW first, http://www.opencsw.org/

                      I was able to install precompiled 2.0 binaries easily.

                      Comment

                      Working...