export-http-lb-config / appserver bug

We've encountered a bug in the loadbalancer.xml configuration file generated from this command (export-http-lb-config).

The problem occurs when, accidentally, you have more than one application deployed on the appserver with the same context root.

While this shouldn't happen, it's currently allowed. Tested in 8.1EE

For example, two apps that deploy to "/appname"

Trouble is, when you run "export-http-lb-config" it will generate an invalid XML file that the loadbalancer doesn't like. It will generate a file with two entries for the same context root.

ie

<web-module context-root="appname" disable-timeout-in-minutes="30" enabled="true" />

<web-module context-root="appname" disable-timeout-in-minutes="30" enabled="true" />

The loadbalancer plugin doesn't like this.

Although not valid, this isn't meant to cause a fatal error - the loadbalancer is meant to just stick with the existing configuration.

Trouble is, when the loadbalancer is installed on Apache, which is by default multi-process, if a new process is spawned, then it has to start a new load balancer instance, which doesn't work because the new loadbalancer.xml config file is invalid. Hence that Apache worker is dead (500 server error).

I suspect the problem might be better solved in the appserver.

It doesn't make a great deal of sense to allow more than one application to be deployed at the context root. The deployer should check this and fail if its the case.

[1537 byte] By [tourtech] at [2007-11-26 10:58:19]
# 1

hi,

Can you please tell me the exact version of the appserver that you are testing on ? asadmin version --verbose=true

I have tried deploying two applications with the same context-root on SJSAS 8.1 UR2 patch 8 and it does not allow me to deploy the second app. I get the below error :

An error has occurred.

Deploying application in domain failed; Context-Root already exists in a deployed object: Application: vastest1 ; requested operation cannot be completed Context-Root already exists in a deployed object: Application: vastest1

So, maybe upgrading to the latest and greatest version of the appserver (8.1 UR2, patch 11) should do the trick for you.

Cheers,

Vasanth

pts_forum at 2007-7-7 3:11:43 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

Hey Vasanth,

The version we're running is reported as being:

Sun Java System Application Server 8.1_02

Looking closer at the console, it's build b21_p10.

As the --force=yes option is required to redeploy an app, the force also seems to make the appserver deploy the apps (with an non-unique context root ), which causes the error.

I really think that despite everything, --force=yes should not allow an app to be (re)deployed if another apps is deployed with the same context root.

tourtech at 2007-7-7 3:11:43 > top of Java-index,Application & Integration Servers,Application Servers...