Tuesday, May 18, 2010

Solaris coreadm utility

This includes the ability to control where core files are written, the name of core files, which portions of the processes address space will be written to the core file, and my favorite option, whether or not to generate a syslog entry indicating that a core file was generated.

To begin using coreadm, you will first need to run it wit the “-g” option to specify where core files should be stored, and the pattern that should be used when creating the core file:

$ coreadm -g /var/core/core.%f.%p

Once a directory and file pattern are specified, you can optionally adjust which portions of the processes address space (e.g., text segment, heap, ISM, etc.) will be written to the core file. To ease debugging, I like to configure coreadm to dump everything with the”-G all” option:

$ coreadm -G all

Since core files are typically created at odd working hours, I also like to configure coreadm to log messages to syslog indicating that a core file was created. This can be done by using the coreadm “-e log” option:

$ coreadm -e log

After these settings are adjusted, the coreadm “-e global” option can be used to enable global core file generation, and the coreadm utility can be run without any arguments to view the settings (which are stored in /etc/coreadm.conf):

$ coreadm -e global

$ coreadm

     global core file pattern: /var/core/core.%f.%p
global core file content: all
init core file pattern: core
init core file content: default
global core dumps: enabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setid core dumps: disabled
global core dump logging: enabled

Once global core file support is enabled, each time a process receives a deadly signal (e.g., SIGSEGV, SIGBUS, etc.):

$ kill -SIGSEGV 4652

A core file will be written to /var/core:

$ ls -al /var/core/*4652

-rw-------   1 root     root     4163953 Mar  9 11:51 /var/core/core.inetd.4652

Friday, May 7, 2010

Managing JBoss 5.0.0 Instance

Managing JBoss Instance

  • Admin Console
  • JMX Console
  • JBoss Web Console
Admin Console & JMX Console

http://ip:port/admin-console
http://ip:port/jmx-console/

username/passwd == admin/admin

  • vi jboss-eap-5.0/jboss-as/server/node/conf/props/jmx-console-users.properties & uncomment admin=admin

Imp files
jmx-console-roles.properties
jmx-console-users.properties

Being Reffered in login-config.xml

server/node/conf/props/jmx-console-users.properties
server/node/conf/props/jmx-console-roles.properties


JBoss Web Console

http://ip:port/web-console

username/passwd == admin/admin

  • Copy files in jboss-eap-5.0/jboss-as/server/node/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/
web-console-users.properties
web-console-roles.properties

to jboss-eap-5.0/jboss-as/server/node/conf/props/

  • vi the file web-console-users.properties and uncomment admin=admin
  • vi login-config.xml and update web-console element to right location
props/web-console-users.properties
props/web-console-roles.properties


Services in JBoss 5.X.X

Following are the list of Services I cross in Jboss version : jboss-eap-5.0 (enterprise-installer-5.0.0.GA.jar)

EJB3 services

In server/node/deploy/
  • ejb3-connections-jboss-beans.xml
  • ejb3-container-jboss-beans.xml
  • ejb3-interceptors-aop.xml
  • ejb3-timerservice-jboss-beans.xml
  • profile-service-secured.jar

In server//deployers

  • jboss-ejb3-endpoint-deployer.jar

EJB2 services

In server/node/deploy
  • ejb2-container-jboss-beans.xml
  • ejb2-timer-service.xml (Note that EJB3 deployments may fail without this service. See this forum post)

JUDDI

In server/node/deploy
  • juddi-service.sar

Key Generator

In server/node/deploy

  • uuid-key-generator.sar

JBoss Messaging

In server/node/deploy

  • messaging
  • jms-ra.rar

In server/node/deployers

  • messaging-definitions-jboss-beans.xml

JBoss Mail

In server/node/deploy

  • mail-service.xml
  • mail-ra.rar

Scheduling

In server/node/deploy

  • scheduler-manager-service.xml
  • scheduler-service.xml
  • quartz-ra.rar

Hypersonic DB

hsqldb-ds.xml
jboss/common/lib/hsqldb.jar and lib/hsqldb-plugin.jar

JBossWS

In server/node/deploy

  • jbossws.sar

In server/node/deployers

  • jbossws.deployer

Seam

In server/node/deployers/

  • seam.deployer
  • webbeans.deployer

In server/node/deploy

  • admin-console.war - takes too much resources in JBoss 5.x, remove it even if you use Seam

other services

In server/node/deployers

  • xnio-provider.jar - not used in JBoss 5.x default configuration for JBooss remoting anyway

In server/node/deploy

  • jboss-xa-jdbc.rar - if you do not use XA datasources
  • jmx-remoting.sar - remote (RMI) acces to JMX, you can still access JMX by jmx-console
  • profileservice-secured.jar - secured remote access to profileservice
  • sqlexception-service.xml - pretty useless in JBoss 5.x
  • xnio-provider.jar - not used in JBoss 5.x default configuration for JBooss remoting

In server/node/deployers

  • hibernate-deployer-jboss-beans.xml - deployment of HAr archives only, you can still use Hibernate in EJBs after you remove this

Also, feel free to remove the corresponding .jars for the services slimmed above from jboss/common/lib.

RemoveHSQLDB in Jboss 5.X.X

Version : jboss-eap-5.0 (enterprise-installer-5.0.0.GA.jar)

Performed these steps on default profile
  • Remove the libraries hsqldb.jar and hsqldb-plugin.jar from jboss/common/lib/.
  • Remove the descriptor for the HSQLDB datasource DefaultDS by deleting deploy/hsqldb-ds.xml;
  • In conf/login-config.xml, comment out the declaration with the name "HsqlDbRealm";


Several services rely on the datasource defaultDS which point to HsqlDbRealm
  • JBoss Messaging
  • EJB Services (EJB Timer Service)
  • Key Generator Services

We should remove above services, otherwise you will end up in dependency errors. Below are the steps to remove them


Remove JBoss Messaging

In server//deploy/ remove:

  • messaging
  • jms-ra.rar

In server//deployers/ remove:

  • messaging-definitions-jboss-beans.xml

Remove EJB3 services

In server//deploy/ remove:

  • ejb3-connections-jboss-beans.xml
  • ejb3-container-jboss-beans.xml
  • ejb3-interceptors-aop.xml
  • ejb3-timerservice-jboss-beans.xml
  • profile-service-secured.jar

In server//deployers/ remove

  • jboss-ejb3-endpoint-deployer.jar

Remove EJB2 services

In server//deploy/ remove:

  • ejb2-container-jboss-beans.xml
  • ejb2-timer-service.xml (Note that EJB3 deployments may fail without this service. See this forum post)

Remove Key Generator

In server//deploy/ remove:

  • uuid-key-generator.sar

Remove JBoss Mail

In server//deploy/ remove:

  • mail-service.xml
  • mail-ra.rar