Skip to main content

desperate with the load balancer

14 replies [Last post]
Anonymous

Hi all.
I have successfully installed a two-machine cluster using glassfish.
Now the main problem is with the load balancer.
I installed the plugin for the sun web server 7.0 but when I try to start
sun web server 7 it crashes.(Machine 1 runs SUSE 9.3 -jdk 1.6 and machine 2
kubuntu 7.04-jdk 1.6. The sun-web-server 7 runs on machine1. I have also
tried sun-web-server-6 but did not also work)
Has anyone has the experience of installing and working correctly the load
balancer with any flavor of web server(apache ,sun web server e.t.c)
Is it difficult for someone to write a load balancer?
If I code a simple http-server that accepts requests and forwards them in
one of the instances listeners will it work or am I missing something that
makes it very difficult and complicated for someone to code a load
balancer?
The whole system setup intends to be used for deploying web services.
Thanx,
GS
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Pankaj Jairath

Could you attach your load balancer configuration file. Load Balancer
has not being initialized successfully and thus any requests would try
to get resolved from the web server doc root as a default.

Could you verify whether the config file path is set correctly and has
read access. Is your file path correct -
'C:SunWebServer6.1https-cmh118582n01.nasa.cpwr.corpconfigloadbalancer.xml.';
did you add the path seperator "/" ?.

If these do not help could you set the WebServer log level to fine (you
can set this in config/server.xml) and provide the new logs.

regards
Pankaj

glassfish@javadesktop.org wrote:
> [15/Sep/2008:09:29:49] info ( 2424): reports: Initializing lbplugin BuildId: A701212-164111
> [15/Sep/2008:09:29:49] info ( 2424): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun Microsystems Inc.]
> [15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /, name-trans-passthrough reports: init-passthrough has not been called
> [15/Sep/2008:09:29:49] info ( 2424): WEB0100: Loading web module in virtual server [https-cmh118582n01.nasa.cpwr.corp] at [/search]
> [15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /WEB-INF/web.xml, name-trans-passthrough reports: init-passthrough has not been called
> [15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /WEB-INF/web.xml, name-trans-passthrough reports: init-passthrough has not been called
> [15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /, name-trans-passthrough reports: init-passthrough has not been called
> [15/Sep/2008:09:29:49] info ( 2424): HTTP3072: [LS ls1] http://cmh118582n01.nasa.cpwr.corp:80 ready to accept requests
> [15/Sep/2008:09:29:49] info ( 2424): CORE3274: successful server startup
> [15/Sep/2008:09:30:01] catastrophe ( 2424): LBConfigurator.cpp@88: reports: lb.configurator: CNFG1014 : Error occured while initializing Loadbalancer config Parser. Please check the config file: C:SunWebServer6.1https-cmh118582n01.nasa.cpwr.corpconfigloadbalancer.xml
> [Message sent by forum member 'cojugcody07' (cojugcody07)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299356
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Kshitiz Saxena

Please provide web-server logs.

Thanks,
Kshitiz

glassfish@javadesktop.org wrote:
> Is this all you had to do to correct the issue?
>
> I have modifed mangus.conf (.txt in windows), yet I get the same 404 when I try to access my cluster.
>
> Could you please elaborate?
>
> Thank you very much
> [Message sent by forum member 'cojugcody07' (cojugcody07)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299126
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

cojugcody07
Offline
Joined: 2007-05-10

THE FOLLOWING IS ERROR.LOG

[15/Sep/2008:09:29:49] info ( 2424): reports: Initializing lbplugin BuildId: A701212-164111
[15/Sep/2008:09:29:49] info ( 2424): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun Microsystems Inc.]
[15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /, name-trans-passthrough reports: init-passthrough has not been called
[15/Sep/2008:09:29:49] info ( 2424): WEB0100: Loading web module in virtual server [https-localhost] at [/search]
[15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /WEB-INF/web.xml, name-trans-passthrough reports: init-passthrough has not been called
[15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /WEB-INF/web.xml, name-trans-passthrough reports: init-passthrough has not been called
[15/Sep/2008:09:29:49] config ( 2424): for host 0.0.0.0 trying to GET /, name-trans-passthrough reports: init-passthrough has not been called
[15/Sep/2008:09:29:49] info ( 2424): HTTP3072: [LS ls1] http://localhost:80 ready to accept requests
[15/Sep/2008:09:29:49] info ( 2424): CORE3274: successful server startup
[15/Sep/2008:09:30:01] catastrophe ( 2424): LBConfigurator.cpp@88: reports: lb.configurator: CNFG1014 : Error occured while initializing Loadbalancer config Parser. Please check the config file: C:SunWebServer6.1https-localhostconfigloadbalancer.xml

Message was edited by: cojugcody07

cojugcody07
Offline
Joined: 2007-05-10

I have located the source of the issue.

The answer to my specific issue is described here: http://forums.java.net/jive/message.jspa?messageID=245383

I wish to thank you for your guidance on this issue.

I agree as well that the instructions described for this process DESPERATELY NEED TO BE UPDATED!!!

Once again thank you, I have got everything working now.

kshitiz_saxena
Offline
Joined: 2006-05-03

one more quick question :

In posted loadbalancer.xml, there are many "*" signs. Is it because of copy/paster?

Your loadbalancer.xml should be :








Thanks,
Kshitiz

kshitiz_saxena
Offline
Joined: 2006-05-03

Can you post error in errors logs to figure out the issue?

Saloustros Georgios

I have managed to install the lb plugin following the instructions at
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html.
Also I have deployed to my cluster the clusterjsp sample application.
I have access to the clusterjsp application when I hit with my browser
http://linux:38080/clusterjsp(which is instance 1 of my cluster) or
http://kubuntu:38080/clusterjsp(which is instance 2 of my cluster).
But when I hit with my browser the web server that is
http://linux:80/clusterjsp I get a 404 Not Found error.
I use the sun-web-server-6.1 service pack 5.
The loadbalancer.xml file in
/sun-web-server-6.1/https-linux/config/loadbalancer.xml
is

*** PUBLIC "-//Sun Microsystems Inc.//DTD Sun Java System Application
Server 9.1//EN" "sun-loadbalancer_1_2.dtd"*>***
**
* listeners="http://linux:38080 https://linux:38181" name="g1-i1"
weight="100"*/>*
* listeners="http://kubuntu:38080 https://kubuntu:38181" name="g2-i1"
weight="100"*/>*
* disable-timeout-in-minutes="30" enabled="true"*/>*
* url="/"*/>*
**
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
value="true"*/>**
**

*

and the error log of the web server

[03/Dec/2007:13:24:08] info (16516): CORE1116: Sun ONE Web Server
6.1SP5 B08/18/2005 02:17
[03/Dec/2007:13:24:08] info (16517): CORE3016: daemon is running as super-user
[03/Dec/2007:13:24:08] info (16517): reports: Initializing lbplugin
BuildId: A701212-164111
[03/Dec/2007:13:24:08] info (16517): CORE5076: Using [Java HotSpot(TM)
Server VM, Version 1.6.0_02] from [Sun Microsystems Inc.]
[03/Dec/2007:13:24:08] info (16517): WEB0100: Loading web module in
virtual server [https-linux] at [/search]
[03/Dec/2007:13:24:10] info (16517): HTTP3072: [LS ls1]
http://linux:80 ready to accept requests
[03/Dec/2007:13:24:10] info (16517): CORE3274: successful server startup
[03/Dec/2007:13:24:41] warning (16517): for host 10.64.13.10 trying to
GET /clusterjsp/, send-file reports: HTTP4142: can't find
/root/sun-web-server-6.1/docs/clusterjsp/ (File not found)
[03/Dec/2007:13:24:55] warning (16517): for host 10.64.13.10 trying to
GET /clusterjsp/, send-file reports: HTTP4142: can't find
/root/sun-web-server-6.1/docs/clusterjsp/ (File not found)

2007/12/3, glassfish@javadesktop.org :
>
> Can you post error in errors logs to figure out the issue?
> [Message sent by forum member 'kshitiz_saxena' (kshitiz_saxena)]
>
> http://forums.java.net/jive/thread.jspa?messageID=248235
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]

kshitiz_saxena
Offline
Joined: 2006-05-03

loadbalancer.xml is correct. It has clusterjsp module. No issues with that.

However webserver try to look under docroot directory for that file. It looks like loadbalancer.xml is not loaded. Please try stop/start webserver. This will ensure loadbalancer.xml is loaded.

If that does not work, please provide your obj.conf and magnus.conf.

Thanks,
Kshitiz

Saloustros Georgios

I finally discovered the bug.
I am posting it to this list in case someone newbie like me has the same
problem and spends 4 days for this silly bug.
Application server : glassfish v2 b58g
Web-Server: sun web server 6.1 service pack 5
First of all the instructions at
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster are not
exactly correct they need to be refreshed.
Bug 1.
In the
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html it
says:

9.Append the following lines to /config/magnus.conf
##BEGIN EE LB Plugin Parameters
Init fn="load-modules"
shlib="/plugins/lbplugin/bin/libpassthrough.so"
funcs="init-passthrough,service-passthrough,name-trans-passthrough"
Thread="no" Init fn="init-passthrough"
##END EE LB Plugin Parameters
The above lines need to be before following line.
Init fn="load-modules" shlib=".../libj2eeplugin.so"
shlib_flags="(global|now)"
Replace with your Web Server installation directory.

Wrong! This line must be after the line at magnus.conf

##BEGIN EE LB Plugin Parameters
Init fn="load-modules"
shlib="/plugins/lbplugin/bin/libpassthrough.so"
funcs="init-passthrough,service-passthrough,name-trans-passthrough"
Thread="no" Init fn="init-passthrough"
##END EE LB Plugin Parameters

or else you 'll get an error at web server startup

Bug 2.
There must not be any white space at the obj.conf file!!! else the
sun-web-server doesn't load the lbplugin. Unbelievable!
I think the webmaster should refresh the page at
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html

GS

2007/12/4, glassfish@javadesktop.org :
>
> loadbalancer.xml is correct. It has clusterjsp module. No issues with
> that.
>
> However webserver try to look under docroot directory for that file. It
> looks like loadbalancer.xml is not loaded. Please try stop/start
> webserver. This will ensure loadbalancer.xml is loaded.
>
> If that does not work, please provide your obj.conf and magnus.conf.
>
> Thanks,
> Kshitiz
> [Message sent by forum member 'kshitiz_saxena' (kshitiz_saxena)]
>
> http://forums.java.net/jive/thread.jspa?messageID=248392
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]

cojugcody07
Offline
Joined: 2007-05-10

Is this all you had to do to correct the issue?

I have modifed mangus.conf (.txt in windows), yet I get the same 404 when I try to access my cluster.

Could you please elaborate?

Thank you very much

Saloustros Georgios

yes the procedure is described in the thread exactly as i remember. Maybe is
something else?

2008/9/12

> Is this all you had to do to correct the issue?
>
> I have modifed mangus.conf (.txt in windows), yet I get the same 404 when
> I try to access my cluster.
>
> Could you please elaborate?
>
> Thank you very much
> [Message sent by forum member 'cojugcody07' (cojugcody07)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299126
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
[att1.html]

cojugcody07
Offline
Joined: 2007-05-10

When you refer to the whitespace in obj.conf, are you only meaning no whitespace at the end-of-file?

I have no whitespace at the end of file. It looks as

, with no other whitespace.

I have glassfish v2 with sun web server v6.1.

???

Thank you again

km
Offline
Joined: 2005-10-28

Load balancer is not a thing to be desperate about :)

Can you please see if web server has generated a core file? It should be created
either in the home folder or web-server's working directory.

Multiple blogs/docs are available about how to make this work. See this:

http://onesearch.sun.com/search/blog/index.jsp?col=blog&charset=utf-8&we...

- Kedar

sn123202
Offline
Joined: 2005-04-04

Hi
You might want to verify couple of things to ensure that the server is starting with the right permission
- permission of the logs directory (ls -la /logs
- which server user is configured within web server's config/magnus.conf (the user mentioned here should have permission to write to the logs directory)
- which server user is actually starting the server. (the user here should have permission to write to logs directory)

besides, sun web server related questions are discussed in length here
http://forum.java.sun.com/forum.jspa?forumID=759