12 Replies Latest reply: Feb 20, 2012 9:31 AM by 832857 RSS

    Load Balancing-wrong ELF class: ELFCLASS64

    832857
      GlassFish 3.1.1
      Apache Webserver 2.2.x

      To configure the loadbalancing I followed the following link
      http://docs.oracle.com/cd/E18930_01/html/821-2426/abdhg.html

      However Although the linux machine I am using is 32bit version I am having the following error.
      After google search, I have found many points referencing 64compile, but I have properly assigned the corrent flags and compiled it.


      +[root@bin]# ./apachectl start+
      httpd: Syntax error on line 419 of /usr/local/apacheHttpServer/conf/httpd.conf: Cannot load /usr/local/apacheHttpServer/modules/mod_loadbalancer.so into server: /usr/local/apacheHttpServer/modules/mod_loadbalancer.so: wrong ELF class: ELFCLASS64


      +[root@httpd-2.2.22]# file /usr/bin/file+
      +/usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped+

      +[root@]# export+
      declare -x AS_HOME="/usr/local/glassfish-3.1.1/glassfish"
      declare -x CFLAGS="-m32"

      Besides that do I need the enable mod_jk for loadbalancing for glassfish App Serv, where mod_jk enabling is not mentioned in the link given above.

      Thanks in advance.
        • 1. Re: Load Balancing-wrong ELF class: ELFCLASS64
          René van Wijk
          Do you know how mod_loadbalancer.so was compiled, looks like it was compiled for 64-bit, and you are linking it with a 32-bit computation.

          You only need to enable the jk listener when you are using mod_jk as the load balancing solution

          An example of setting-up mod_jk can be found here: http://middlewaremagic.com/weblogic/?p=7677 look in the section 'Using the Apache HTTP Server as a front-end'.
          • 2. Re: Load Balancing-wrong ELF class: ELFCLASS64
            832857
            I am sure it was compiled with 32bit settings, as follows, besides my linux machine is 32bit version , normally it should not be allowed to compile with 64 bit settigs even if i tried to compile with 64bit version

            cd http-2.2_x
            export CFLAGS="-m32"
            ./configure with-mpm=worker with-included-apr --with-ssl=open-ssl-install-path
            prefix=apache-install-path enable-ssl --enable-so


            In addtion,
            for enabling the glassfish loadbalancing, mod_loadbalance.so and loadBalanacer.xml file will be enaought right?

            Edited by: mmc18 on 15-Feb-2012 05:34
            • 3. Re: Load Balancing-wrong ELF class: ELFCLASS64
              René van Wijk
              "In addtion, for enabling the glassfish loadbalancing, mod_loadbalance.so and loadBalanacer.xml file will be enaought right?"

              Detailed steps can be found here: https://blogs.oracle.com/sprabhu7/entry/install_configure_lb_on_apache
              see the 'Configure LB Plugin for Apache.' section
              • 4. Re: Load Balancing-wrong ELF class: ELFCLASS64
                832857
                in the link you provided Glassfish 2.x is mentioned, however I want to configure the loadbalancing in Version 3.1.1

                Thanks.

                Edited by: mmc18 on 15-Feb-2012 07:31
                • 5. Re: Load Balancing-wrong ELF class: ELFCLASS64
                  René van Wijk
                  You have an Apache 3.*? Where did you download that one? (http://httpd.apache.org/download.cgi)
                  • 6. Re: Load Balancing-wrong ELF class: ELFCLASS64
                    832857
                    Corrected it,it is Glassfish,
                    I am using Glassfish 3.1.1 version.
                    • 7. Re: Load Balancing-wrong ELF class: ELFCLASS64
                      832857
                      [root@]# file mod_loadbalancer.so
                      mod_loadbalancer.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

                      I have found out that, glassfish plugin glassfish-lbconfigurator-3_1_1.jar creates 64bit mod_balancer.so file somehow.

                      Edited by: mmc18 on 15-Feb-2012 07:34

                      Edited by: mmc18 on 15-Feb-2012 23:21
                      • 8. Re: Load Balancing-wrong ELF class: ELFCLASS64
                        René van Wijk
                        Could you try with the loadbalancer configurator 3.1 (http://www.oracle.com/technetwork/middleware/downloads/glassfish-301-downloads-326755.html)
                        See also the supported operating systems and web servers page - http://docs.oracle.com/cd/E18930_01/html/821-2426/gldbq.html#scrolltoc

                        Steps to configure Apache are given here: http://docs.oracle.com/cd/E18930_01/html/821-2426/abdhg.html#scrolltoc

                        The steps to install the loadbalancer plug-in are given here: http://docs.oracle.com/cd/E18930_01/html/821-2426/gktkv.html#scrolltoc
                        • 9. Re: Load Balancing-wrong ELF class: ELFCLASS64
                          832857
                          Hi René van Wijk
                          sorry about that but,
                          You are only giving references except answering my questions.

                          Have you ever been tried to produce mod_loadbalancer.so file via glassfish-lbconfigurator-3_1_1.jar on 32bit machine then run the apache http server?
                          if so you are propbably see the error?

                          to be sure is mod_balanser.so file is 32bit or 64bit you can type the following command
                          file mod_loadbalancer.so
                          • 10. Re: Load Balancing-wrong ELF class: ELFCLASS64
                            René van Wijk
                            The post above gives you an alternative as the set-up you have is clearly not working.

                            "Could you try with the loadbalancer configurator 3.1 (http://www.oracle.com/technetwork/middleware/downloads/glassfish-301-downloads-326755.html)"

                            Which is 32-bit for sure, as no 64-bit version was available than, which you can see in the supported operating systems and web servers page - http://docs.oracle.com/cd/E18930_01/html/821-2426/gldbq.html#scrolltoc

                            Ahh, who cares anyway
                            • 11. Re: Load Balancing-wrong ELF class: ELFCLASS64
                              832857
                              I have installed jk-connector module following the instruction in link http://tomcat.apache.org/connectors-doc/
                              In this link there is a src file should be complied pointing the <web_server>/bin/apxs, there will be created a mod_jk.so file which has to be reperenced in httpd.conf file web server before starting the web server.

                              If you do not want to spend installing and compling jk-connector module, you can download compiled version of jk-module: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.31/i386/


                              Thanks all for motivating me to find the real solution.


                              -Istanbul-
                              • 12. Re: Load Balancing-wrong ELF class: ELFCLASS64
                                832857
                                found own solution. but contribution gets me motovated