Tuesday, October 4, 2011

JBOSS Server Slimming

Issue No: 1
Date: 04-Oct-2011
JBOSS Application Server

Sometimes the JBOSS server will take more time for the startup. It is because of many configuration files will get deployed at that time of startup, in these files few are not really required for our application. Here I am listing out few unwanted deployment configurations at the startup time. In the below list few files may require for your application so please have a look at your application dependency configuration and then remove the configuration/files which are not really required for your application.
NOTE: Please take a backup of your server directory before going for this change.

Web Deployer:
• For Disabling Development mode in JBoss:
• Edit $JBOSS_HOME/server/all/deploy/ jboss-web.deployer /conf/web.xml and look for the jsp servlet

jsp
org.apache.jasper.servlet.JspServlet
...

Add

developmentfalse


checkInterval300


RMI for Remote Invocations
By default, JBoss creates a new thread for every RMI request that comes in. This is not generally efficient on a large system. Secondly, it can be dangerous to allow unrestrained connections in the case of performance or traffic spikes or run-away connection creating clients. To remedy this you should consider switching to the pooled invoker.
• Edit server/all/conf/standardjboss.xml
• Change all of the proxy bindings to the pooled invoker by changing every XML fragment reading:

jboss:service=invoker,type=jrmp

To
jboss:service=invoker,type=pooled

Mail-service (J2EE standard JavaMail client)
• remove server/all/deploy/mail-service.xml
• remove server/all/lib/mail (mail-plugin.jar, mail.jar - JavaMail stuff)
• remove server/all/lib/activation.jar (Java Activation Framework is used by JavaMail)
J2EE client deployer service
• remove server/all/deploy/client-deployer-service.xml
Integrated HAR deployer and Hibernate session management services
• remove server/all/lib/jboss-hibernate.jar
• remove server/all/lib/hibernate3.jar
• remove server/all/lib/cglib.jar
JbossMQ
• remove the entire server/all/deploy/jms directory
• remove server/all/lib/jbossmq.jar
XA datasources
• remove server/all/deploy/jboss-xa-jdbc.rar
JBoss Scheduler Manager
• remove server/all/deploy/scheduler-service.xml
• remove server/all/deploy/schedule-manager-service.xml
• remove server/all/lib/scheduler-plugin (scheduler-plugin.jar, scheduler-plugin-example.jar)
EARDeployer
• open server/all/conf/jboss-service.xml in the editor
• remove/comment the following XML fragments
from under the
jboss.j2ee:service=EARDeployer

RMI Classloading
• open server/all/conf/jboss-service.xml in the editor
• remove/comment this XML fragment




java.rmi.server.RMIClassLoaderSpi
org.jboss.system.JBossRMIClassLoader

And

8083

true
${jboss.bind.address}
${jboss.bind.address}

• and change this XML fragment (NOTE: In JBoss 4.0, this is located in the file server/all/deploy/ejb-deployer.xml):

true
...
jboss:service=WebService

to read like this:

true
...

BeanShelldeployer
• remove server/all/deploy/bsh-deployer.xml
• remove server/all/lib/bsh-deployer.jar
• remove server/all/lib/bsh.jar
Auto Deploy
• open server/all/conf/jboss-service.xml in the editor
• change this XML frament:


...
5000
...

to read (by adding):


...
5000
False
...


JBoss UUID key generation
• remove server/all/deploy/uuid-key-generator.sar
• remove server/all/lib/autonumber-plugin.jar
Connection Close Checking
• In production you don't need this check (assuming all connection leaks were found during development).
• In deploy/jbossjca-service.xml, change the Debug entry to false in the CachedConnectionManager service

Tuesday, August 10, 2010

Issue No: 5
Date: 10-Aug-2010
Version: weblogic portal 10.3.2




Getting the below ERROR when starting a Weblogic Portal 10.3.2 domain




Solution:
Create a dummy SYSTABLES table in Oracle. Your portal datasources will run “SELECT COUNT(*) FROM SYSTABLES” command when server starting up. If the table is not there in Database it will through those error and cause startup problem. So please create the dummy table or change the testing query at $WEBLOGIC_DOMAIN_HOME/config/jdbc/-jdbc.xml file.

Thursday, July 29, 2010

Showing Deployment Health Status As "WARNING"

Issue No: 4
Date: 29-July-2010
Version: weblogic portal 10.3.2
I deployed an ejb application, deployment is in active but health status is showing as warning. I am deployed an ejb application and targeted all to the same server.
Solution:
Please check the Server Log of the Deployment Timestamp. Do u see any WARNING there? There are sometimes some Ignorable Warnings related to MSG#BUFFER which makes the Deployment Health Status to be displayed as "WARINIG" in admin Console.

ERROR: transport error 202: bind failed: Address already in use

Issue No: 3
Date: 29-July-2010
Version: weblogic portal 10.3.2
I created 2 WL 10.3 Domains. I can start the admin server in domain but when I start the second admin server i get the following error:
starting weblogic with Java version:
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../.
./../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_E
RROR_TRANSPORT_INIT(197)
Starting WLS with line:
C:\bea\JDK160~1\bin\java -client -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket
,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx512m -XX:Com
pileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -XX:MaxPermSize=160m
-Xverify:none -Xverify:none -da:org.apache.xmlbeans... -ea -da:com.bea... -da:
javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.
sbconsole... -Dplatform.home=C:\bea\WLSERV~1.3 -Dwls.home=C:\bea\WLSERV~1.3\serv
er -Dweblogic.home=C:\bea\WLSERV~1.3\server -Dweblogic.management.discover=tru
e -Dwlw.iterativeDev=true -Dwlw.testConsole=true -Dwlw.logErrorsToConsole=true
-Dweblogic.ext.dirs=C:\bea\patch_wlw1030\profiles\default\sysext_manifest_classp
ath;C:\bea\patch_wls1030\profiles\default\sysext_manifest_classpath;C:\bea\patch
_cie670\profiles\default\sysext_manifest_classpath;C:\bea\patch_alsb1031\profile
s\default\sysext_manifest_classpath -Dweblogic.Name=TestAdmin2 -Djava.security.p
olicy=C:\bea\WLSERV~1.3\server\lib\weblogic.policy weblogic.Server
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../.
./../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_E
RROR_TRANSPORT_INIT(197)
Stopping PointBase server...

Solution:

1) Changing the configuration in the setDomainEnv.cmd will resolve this issue. Check the DEBUG_PORT it might be the same for both the domains.

OR

2) Remove the following from the script that is used to start the server.
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n.
This is used to debug the process and I don't think you may need to start a production system in debug mode. Lets try this.

OR

3) This issue you may face due to heap memory also. Tune the Memory arguments according to your RAM and then try it and try keeping maximum and minimum heap as same, may be your JVM is taking too much of time to manage heap; and also try out increasing you -XX:MaxPermSize accordingly,
check your garbage collection data, that will show you what the problem is, check for PermGeneration committed and Used size. If committed size is used completely try increasing MaxPermSize. Take a thread dump of your running process and analyze those by detecting deadlock and stuck threads.

Monday, July 19, 2010

Library Reference Error

Issue No.2
13-July-2010
Version: Weblogic Server 10.2
Getting the Below Error while Deploying the EAR application
#### <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1279091617514> webdav-web-lib#10.0.0@10.0.1.1From
...wlserver_10.0/cm/lib/modules/...To.../wlserver_10.0/cm/lib/modules/maintenance/1001/default/...A ticket has been created for this issue.Hope this helps.
3 Exact match means, waiting for same version, not accepting same name with another version.In my case, these problems' reason, the referenced libraries not targeted to same server
. I have admin server and clustered server, my referenced libraries targeted to the clustered server only, but not targeted to admin server. I have targeted all libraries to admin server and clustered servers, and then problem solved. When I deploy application, I have deploy it admin server and also managed servers.
Possible ways to trouble shoot
1. Checkout the versions of both the Jar and Weblogic server versions which you are using.
2. I was able to fix the problem by giving a work around. Also I found what causes the problem. If you are working with managed servers on WL10 MP1 or 2 you will face this problem for sure. This problem appears in these cases:a) If you target the libraries to the Admin server and the cluster. The libraries by default are target only to the cluster and not to the Admin server.b) When using pack/unpack to create managed servers after starting a managed server and target the libraries to the admin server.c) If the deployed application targets to the admin server.
To fix this you need to run the servers and after they are on Admin state you must undeploy the libraries that run into conflict and deploy them again with another name.Another way to fix this is by changing the path in the config.xml file for the libraries:content-management-app-lib#10.0.0@10.0.1.1content-management-web-lib#10.0.0@10.0.1.1webdav-app-lib#10.0.0@10.0.1.1

Weblogic Trouble Shootings

Issue No:1
Date: 7-July-2010
Version: Weblogic Server 10.3
Getting the below Error in weblogic logs while deploying/accessing a perticular page.
09 Jul 2010 21:01:37,811 ERROR HomePageBacking []: javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from KAXXXX08.kxxxoc.com - 1xx.1x.x.1x failed hostname verification check. Certificate contained KAXXXX08 but check expected
Possible ways to trouble shoot
1. Check the consumer's URL for the hostname they are using and the host name in the certificate.
2. Changing the hostname verification parameters.
3. Setting it to NONE for ALL servers.
4. URL Hostname will b mydomain.com And certHostname will b mydomain.com:port (CN of the certificate).
Resolution:
Need to trouble shoot for the right solution.