glassfish
  1. glassfish
  2. GLASSFISH-16616

ReadMe.UserDefinedLB needs an update for 64-bit compilation and correct gcc. This doc should perhaps be moved to GF user guides.

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: load_balancer
    • Labels:
      None
    • Environment:

      Solaris Sparc 10 + Apache2.2 64 bit + glassfish lb plugin 3.1.1

      Description

      I compiled roundrobin.so file for the user-defined testsand generated the .so file with -m64 flag in gcc command and still the library could not be read.

      Setup is on aroot@sf-171s-163.india.sun.com:/export/ha/64-bit/apache2.2

        Issue Links

          Activity

          Hide
          kshitiz_saxena added a comment -

          This issue is not reproducible. I compiled roundrobin.c with below command and it works fine :
          gcc -m64 -shared -fPIC -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so

          Show
          kshitiz_saxena added a comment - This issue is not reproducible. I compiled roundrobin.c with below command and it works fine : gcc -m64 -shared -fPIC -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so
          Hide
          varunrupela added a comment -

          Apache/LB is unable to load the user-defined policy file - roundrobin.so after it is correctly compiled with the above instructions.

          The following messages appear in apache error log:
          "FGRP1009: Error in loading the library /space/gf-ha/dft/controller-repository/glassfish-samples/roundrobin.so, check the library is present and has proper permissions"

          ******
          [Fri Jul 01 15:57:35 2011] [info] LBInstance created on virtual server 10.12.171.163 ...
          [Fri Jul 01 15:57:35 2011] [info] is_virtual = 1 defn_name = /export/ha/64-bit/apache2.2/conf/extra/httpd-vhosts.conf ...
          [Fri Jul 01 15:57:35 2011] [warn] lb.configurator: XML_VALIDATOR_WARNING: Cookies will not be rewritten by web server. All cookie updates will be handled by application server. If you are using older version of application server, then failover will not work.
          [Fri Jul 01 15:57:35 2011] [warn] lb.configurator: Preferred failover instance feature is enabled.
          [Fri Jul 01 15:57:35 2011] [crit] lb.failovermanager: FGRP1009: Error in loading the library /space/gf-ha/dft/controller-repository/glassfish-samples/roundrobin.so, check the library is present and has proper permissions
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28080 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28181 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28081 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28182 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28082 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28183 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28083 has been intialized.
          [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28184 has been intialized.
          [Fri Jul 01 15:57:35 2011] [notice] lb.runtime: RNTM2003:After LBDaemonManager::init()
          [Fri Jul 01 15:57:35 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance...
          [Fri Jul 01 15:57:36 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance...
          [Fri Jul 01 15:57:36 2011] [error] [client 129.146.11.110] File does not exist: /export/ha/64-bit/apache2.2/htdocs/favicon.ico
          [Fri Jul 01 16:03:44 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance...
          [Fri Jul 01 16:03:44 2011] [error] [client 129.146.11.110] File does not exist: /export/ha/64-bit/apache2.2/htdocs/favicon.ico
          ********

          Show
          varunrupela added a comment - Apache/LB is unable to load the user-defined policy file - roundrobin.so after it is correctly compiled with the above instructions. The following messages appear in apache error log: "FGRP1009: Error in loading the library /space/gf-ha/dft/controller-repository/glassfish-samples/roundrobin.so, check the library is present and has proper permissions" ****** [Fri Jul 01 15:57:35 2011] [info] LBInstance created on virtual server 10.12.171.163 ... [Fri Jul 01 15:57:35 2011] [info] is_virtual = 1 defn_name = /export/ha/64-bit/apache2.2/conf/extra/httpd-vhosts.conf ... [Fri Jul 01 15:57:35 2011] [warn] lb.configurator: XML_VALIDATOR_WARNING: Cookies will not be rewritten by web server. All cookie updates will be handled by application server. If you are using older version of application server, then failover will not work. [Fri Jul 01 15:57:35 2011] [warn] lb.configurator: Preferred failover instance feature is enabled. [Fri Jul 01 15:57:35 2011] [crit] lb.failovermanager: FGRP1009: Error in loading the library /space/gf-ha/dft/controller-repository/glassfish-samples/roundrobin.so, check the library is present and has proper permissions [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28080 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28181 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28081 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28182 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28082 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28183 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon http://sf-171s-163.india.sun.com:28083 has been intialized. [Fri Jul 01 15:57:35 2011] [warn] lb.runtime: RNTM2019: Daemon https://sf-171s-163.india.sun.com:28184 has been intialized. [Fri Jul 01 15:57:35 2011] [notice] lb.runtime: RNTM2003:After LBDaemonManager::init() [Fri Jul 01 15:57:35 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance... [Fri Jul 01 15:57:36 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance... [Fri Jul 01 15:57:36 2011] [error] [client 129.146.11.110] File does not exist: /export/ha/64-bit/apache2.2/htdocs/favicon.ico [Fri Jul 01 16:03:44 2011] [info] This virtual server already exists in map; Hence just retrieving the pointer to LBInstance... [Fri Jul 01 16:03:44 2011] [error] [client 129.146.11.110] File does not exist: /export/ha/64-bit/apache2.2/htdocs/favicon.ico ********
          Hide
          kshitiz_saxena added a comment -

          It works with library created using given command :

          gcc -m64 -shared -fPIC -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so

          OR

          cc -m64 -G -xcode=pic32 -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so

          Issue was with version of gcc used. It works when compiled with following gcc :
          sparc-sun-solaris2.10-gcc (GCC) 4.0.4 (gccfss)
          Copyright (C) 2006 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

          However it fails when compiled with following gcc :
          gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
          Copyright (C) 2004 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions. There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

          It is better to use sun studio compiler on solaris.

          Docs need to be updated to reflect the same.

          As of now instructions to compile of user defined library is bundled as ReadMe.UserDefinedLB along with GlassFish load-balancer plugin, making it difficult to be updated frequently. It can be probably added to GlassFish load-balancer documentation itself.

          Show
          kshitiz_saxena added a comment - It works with library created using given command : gcc -m64 -shared -fPIC -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so OR cc -m64 -G -xcode=pic32 -I glassfish-lbplugin/lib/install/templates roundrobin.c -o roundrobin.so Issue was with version of gcc used. It works when compiled with following gcc : sparc-sun-solaris2.10-gcc (GCC) 4.0.4 (gccfss) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. However it fails when compiled with following gcc : gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is better to use sun studio compiler on solaris. Docs need to be updated to reflect the same. As of now instructions to compile of user defined library is bundled as ReadMe.UserDefinedLB along with GlassFish load-balancer plugin, making it difficult to be updated frequently. It can be probably added to GlassFish load-balancer documentation itself.
          Hide
          varunrupela added a comment -

          Kshitiz figured out that the gcc we needed to use was sparc-sun-solaris2.10-gcc and it was available from /usr/bin/gcc. We were earlier using gcc from "/usr/sfw/bin/gcc". This issue now becomes one of updating the ReadMe for user-defined.

          • We found that the ReadMe.UserDefinedLB available under glassfish-lbplugin/lib/install/templates location also needs an update for 64 bit compilation.
          Show
          varunrupela added a comment - Kshitiz figured out that the gcc we needed to use was sparc-sun-solaris2.10-gcc and it was available from /usr/bin/gcc. We were earlier using gcc from "/usr/sfw/bin/gcc". This issue now becomes one of updating the ReadMe for user-defined. We found that the ReadMe.UserDefinedLB available under glassfish-lbplugin/lib/install/templates location also needs an update for 64 bit compilation.
          Hide
          varunrupela added a comment -

          Updated the summary to reflect findings.

          Show
          varunrupela added a comment - Updated the summary to reflect findings.
          Hide
          kshitiz_saxena added a comment -

          Readme is actually bundled with load-balancer plugin. So to update it, a new load-balancer plugin library need to be generated. It is not possible to generate and integrate new load-balancer plugin library now.

          It will be better to add this readme to documentation itself as it is easy to update and maintain it there. I will create a new documentation bug to track it.

          Show
          kshitiz_saxena added a comment - Readme is actually bundled with load-balancer plugin. So to update it, a new load-balancer plugin library need to be generated. It is not possible to generate and integrate new load-balancer plugin library now. It will be better to add this readme to documentation itself as it is easy to update and maintain it there. I will create a new documentation bug to track it.
          Hide
          kshitiz_saxena added a comment -

          Marking this issue as being dependent on GLASSFISH-17106

          Show
          kshitiz_saxena added a comment - Marking this issue as being dependent on GLASSFISH-17106
          Hide
          Joe Di Pol added a comment -

          Scrubbing from the 3.1.2 list assuming docs is fixing 17106 (which is on the 3.1.2 list)

          Show
          Joe Di Pol added a comment - Scrubbing from the 3.1.2 list assuming docs is fixing 17106 (which is on the 3.1.2 list)

            People

            • Assignee:
              kshitiz_saxena
              Reporter:
              Jothir Ganesan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: