Tuesday Feb 08, 2011

Configure my Custom Log Handler in GlassFish 3.1

How do I configure my Custom Log Handler in GlassFish 3.1?

By default GlassFish logs data under server.log using pre-defined format. You may find that you want to log messages to a database, send them to a remote server or log messages from specific loggers to your own file. This can be done by writing a custom log handler. It is pretty straight forward you can add the handler, a Java class as specified by the JDK. In the examples below I log messages to a specific file in different format but you can replace that code with something that interests you.

1. Sample Handler (NewHandler.java):

package customhandler;

/\*\*
 \* @author naman mehta
 \*/

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Handler;
import java.util.logging.LogRecord;

/\*\*
 \* New Handler
 \*/
public class NewHandler extends Handler {

    static BufferedWriter f = null;

    public NewHandler() {
        try {
            String userDir = "/space/output";
            f = new BufferedWriter(new FileWriter(userDir + "/mylogging.log"));
        } catch (IOException e) {
            System.out.println("not able to create log file." + e);
        }
    }


    /\*\*
     \* Overridden method used to capture log entries   \*
     \*
     \* @param record The log record to be written out.
     \*/
    public void publish(LogRecord record) {

        // first see if this entry should be filtered out
        // the filter should keep anything
        if (getFilter() != null) {
            if (!getFilter().isLoggable(record))
                return;
        }

        try {
            f.write("NewHandler output - ");
            f.write("logger name: " + record.getLoggerName());
            f.write(" source classname: " + record.getSourceClassName());
            f.write(" message: " + record.getMessage());
            f.newLine();
            f.flush();
        } catch (IOException ex) {
            System.out.println("not able to write to log file." + ex);
        }

    }


    /\*\*
     \* Called to close this log handler.
     \*/
    public void close() {
        try {
            f.close();
        } catch (IOException ex) {
        }
    }


    /\*\*
     \* Called to flush any cached data
     \*/
    public void flush() {
	// not used
    }
}

In above sample I am logging data under '/space/output/mylogging.log'. I also changed the output format for logging data under mylogging.log file(Check publish(LogRecord record)function).

2. Changes needed under logging.properties file (GF_HOME/glassfish/domains/domain1/config):

#GlassFish logging.properties list
#Mon Mar 16 22:32:12 PDT 2009
javax.enterprise.system.tools.admin.level=INFO
handlers=java.util.logging.ConsoleHandler, customhandler.NewHandler
java.util.logging.ConsoleHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter
org.apache.jasper.level=INFO

Installation of custom Handler

1. Write your own custom handler as defined above 'NewHandler.java'. Compile the same and create jar for the same (e.g. customhandler.jar).
2. Copy 'customhandler.jar' under GF_HOME/glassfish/domains/domain1/lib/ext folder.
3. Make changes in default logging.properties file as mentioned above. Add your own handler class like 'handlers=java.util.logging.ConsoleHandler, customhandler.NewHandler'.
4. Restart the Glassfish.

Now when you restart the glassfish server it logs data under '/space/output/mylogging.log' file and you can find the logging statement under mylogging.log file as below:

NewHandler output - logger name: org.glassfish.ha.store.spi.BackingStoreFactoryRegistry source classname: org.glassfish.ha.store.spi.BackingStoreFactoryRegistry message: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.services.impl source classname: com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 message: Grizzly Framework 1.9.31 started in: 693ms - bound to [0.0.0.0:8080]
NewHandler output - NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.services.impl source classname: com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 message: Grizzly Framework 1.9.31 started in: 350ms - bound to [0.0.0.0:7676]
NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.services.impl source classname: com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 message: Grizzly Framework 1.9.31 started in: 539ms - bound to [0.0.0.0:4848]
NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.services.impl source classname: com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 message: Grizzly Framework 1.9.31 started in: 433ms - bound to [0.0.0.0:3700]
logger name: javax.enterprise.system.core.com.sun.enterprise.v3.services.impl source classname: com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1 message: Grizzly Framework 1.9.31 started in: 604ms - bound to [0.0.0.0:8181]
NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter source classname: com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter message: The Admin Console is already installed, but not yet loaded.
NewHandler output - logger name: javax.enterprise.system.core.com.sun.enterprise.v3.server source classname: com.sun.enterprise.v3.server.AppServerStartup message: GlassFish Server Open Source Edition 3.2-SNAPSHOT (naman-private) startup time : Felix (3,993ms), startup services(9,065ms), total(13,058ms)
NewHandler output - logger name: javax.enterprise.system.tools.admin.org.glassfish.server source classname: org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread message: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://naman:8686/jndi/rmi://naman:8686/jmxrmi

Wednesday Dec 15, 2010

Analyze server logs in GlassFish 3.1

How to analyze logs in GlassFish 3.1?

There are two options available:
1. Fire up GlassFish and open the admin web UI inside a browser (for example http://localhost:4848) and launch Log Viewer.
2. Use the collect-log-files subcommand in remote mode to collect log files into a ZIP archive.

In above both options, it would download log files even if your instance is down. Means, you can analyze your logs even if your instance is crashed.

How to use web UI?

1. Fire up GlassFish and open the admin web UI inside a browser (for example http://localhost:4848).
2. Click on 'Server(Admin Server)' -> Click on 'View Log Files' Button.
3. It opens new window with recent log records.
4. If you have multiple instances running then select another instance from 'Server' drop down and click on 'Search' button.
5. If you have multiple log files(rotated server log files) then select another file name from 'Log File' drop down list and click on 'Search' button.

How to use collect-log-files command?

Use the collect-log-files subcommand in remote mode to collect log files into a ZIP archive. Optionally, you can target a server name/cluster name/stand alone instance name. Default value for target is Server. For given target command would download all log files from log folder and make it zip. Default location for storing zip files under GlassFish_Home/domains/domain1/collected-logs. If user needs to store it under specific folder then specify the folder path with --retrieve option as true.

1. Run following command to get log files for Server

./asadmin collect-log-files
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/collected-logs/log_2010-12-15_15-46-23.zip.
Command collect-log-files executed successfully.

2. Run following command to get log files for Cluster having two instances running.

./asadmin collect-log-files --target cluster1
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/collected-logs/log_2010-12-15_15-54-06.zip.
Command collect-log-files executed successfully.

3. Run following command to get log files for Cluster having two instances running under /space/output directory.

./asadmin collect-log-files --target cluster1 --retrieve true /space/output
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/output/log_2010-12-15_15-55-54.zip.
Command collect-log-files executed successfully.

Unzip the generated zip file and analyze your logs. When you unzip log_2010-12-15_15-55-54.zip the directory structure looks like as below:

GlassFish_Home/domains/domain1/collected-logs/logs
	- instance1
		- server.log
		- .....
	- instance2
		- server.log
		- .....

Configure Log4J for use in GlassFish 3.1

How do I configure Log4J for use in GlassFish 3.1?

By default GlassFish does not provide Log4J support and therefore most likely any Log4J statements end up in thin air. In order to make it work the Log4J archive must be made available to GlassFish alongside with a Log4J configuration file either as properties or XML.

Installation of Log4J

1. Copy log4j.jar inside the GlassFish_Home/lib.
2. Put the Log4J configuration file inside GlassFish_Home/domains/domain1/config.
3. Fire up GlassFish and open the admin web UI inside a browser (for example http://localhost:4848).
4. Click on 'Server(Admin Server)' -> Click on 'server-config' Configuration -> JVM Settings -> JVM Options.
5. Now Add new property '-Dlog4j.configuration=file:///${com.sun.aas.instanceRoot}/config/log4j.properties', as you have copied log4j.properties under config folder in above Step 2.
6. Click on the Save button.
7. Restart the GlassFish.
8. Deploy sample app and check if the Log4J statements are now available.

Sample content of Log4J properties file (log4j.properties):

log4j.rootLogger=DEBUG
log4j.logger.myapp=DEBUG
log4j.appender.FILE=org.apache.log4j.RollingFileAppender 
log4j.appender.FILE.MaxFileSize=100KB 
log4j.appender.FILE.MaxBackupIndex=1 
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout 
log4j.appender.FILE.layout.ConversionPattern=%d{DATE} %-5p %c{1} : %m%n 

Sample App to test Log4J (HelloServlet.java):

package myapp;

import org.apache.log4j.\*;
//other required imports

public class HelloServlet extends HttpServlet {

	private Logger logger = Logger.getLogger(getClass().getName());

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {

		System.out.println("Servlet processing do get..");
		BasicConfigurator.configure();
		logger.debug("Logging Log4 Debug Statement...");
		logger.info("Logging Log4 Info Statement...");
	}
}

Now, when you run above sample you can find the log4J logging statement under server.log file as below:

[#|2010-12-14T21:18:41.436+0530|SEVERE|GlassFish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-1;|Servlet processing do get..|#]

[#|2010-12-14T21:18:41.459+0530|INFO|GlassFish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-1;|0 [http-thread-pool-8080(1)] DEBUG myapp.HelloServlet  - Logging Log4 Debug Statement...
|#]

[#|2010-12-14T21:18:41.460+0530|INFO|GlassFish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-1;|6 [http-thread-pool-8080(1)] INFO myapp.HelloServlet - Logging Log4 Info Statement...
|#]

Sometimes user needs that all log4J statements should be part of some other file apart from server.log. How could I do that?

If you need to get log4J statemetn in different file(log4j.log) configured Log4J properties file (log4j.properties) as below:

log4j.rootLogger=DEBUG, FILE
log4j.logger.myapp=DEBUG
log4j.appender.FILE=org.apache.log4j.RollingFileAppender 
log4j.appender.FILE.File=/space/gfv3/v3setup/GlassFish3/GlassFish/domains/domain1/logs/log4j.log
log4j.appender.FILE.MaxFileSize=100KB 
log4j.appender.FILE.MaxBackupIndex=1 
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout 
log4j.appender.FILE.layout.ConversionPattern=%d{DATE} %-5p %c{1} : %m%n 
Here, rootLogger is configured with FILE option and added new configuration log4j.appender.FILE.File in properties file.

Now, when you run sample new log4j.log file is created as you had configured above and all log4J logging statement goes under log4j.log file as below:

 14 Dec 2010 21:18:41,454 DEBUG HelloServlet : Logging Log4 Debug Statement...
 14 Dec 2010 21:18:41,460 INFO  HelloServlet : Logging Log4 Info Statement...

Download sample App from Here. Deploy same on GlassFish 3.1 and Access App by launching browser to http://localhost:8080/hello.


Wednesday Oct 28, 2009

Setup and Configure Diameter on SailFin

Configure Diameter on SailFin 2.0

In continuation with my previous blog about Introduction to Diameter Protocol, I am adding more details about the Configuration of Diameter on SailFin 2.0 in this blog. SailFin 2.0 is supporting Diameter protocol as the standard. SailFin 2.0 is supporting Sh, Ro and Rf Interface.

How to Setup Diameter?

Diameter is available as addon for SailFin 2.0. Download the Diameter Patch(142949-1.0.zip) from SunSolve. This patch contains Diameter Installer jar and README file.

% Extract 142949-1.0.zip location of your choice.

% Go to 'bin' directory of SailFin Install location on your System.
    cd install_location_sailfin/bin

% Stop the domain if it is running.

% ./asadmin install_addon extract_location/142949-1.0/SunDiameter_installer.jar

% Accept the license to Continue.

% Restart the Domain.

These set of commands Setup Diameter on SailFin 2.0.

How to Configure Diameter?

After restarting the Domain user needs to configure Diameter on SailFin. SailFin 2.0 supports set of CLI commands or Admin GUI to configure the same.

% Go to 'bin' directory of SailFin Install location on your System.
    cd install_location_sailfin/bin

% ./asadmin create-diameter-service
    This command adds Diameter Service on SailFin 2.0

% ./asadmin create-diameter-application
    This command creates Diameter Application for Diameter Service. It requires some mandatory parameters.
    Usage: create-diameter-application --applicationsid applicationsid [--terse=false] [--echo=false] [--interactive=true] [--host localhost]
    [--port 4848] [--secure|-s=true] [--user admin_user] [--passwordfile file_name] [--authappid authappid] [--acctappid acctappid]
    [--target target(Default server)] vendorid

% ./asadmin create-peer
    This command creates Peer for Diameter Service. It requires some mandatory parameters.
    Usage: create-peer --appref appref --connectiondefinition connectiondefinition --realm realm [--terse=false] [--echo=false] [--interactive=true]
    [--host localhost] [--port 4848] [--secure|-s=true] [--user admin_user] [--passwordfile file_name] [--pool pname] [--jndiname jndiname]
    [--peerhost localhost] [--peerport 3868] [--target target(Default server)] id

These set of commands Configure Diameter on SailFin 2.0.

Can I use SailFin 1.0 to Setup Diameter?

You CAN'T use SailFin 1.0 to Setup Diameter as all configuration commands are available as part of SailFin 2.0. User needs to upgrade from SailFin 1.0 to SailFin 2.0. User can follow these instructions to upgrade SailFin.


Tuesday Sep 29, 2009

Upgrade existing SailFin to latest Version

Upgrade Sailfin to new version.

How to upgrade on existing SailFin?

Consider user has existing setup of SailFin 1.0 under $WS/sailfin directory.

% Download SailFin v2 jar file form here. We call this new downloaded jar as v2.jar.

% Copy this v2.jar file to $WS directory.

% cd $WS

% java -jar -Xmx256m v2.jar -upgrade
    or
    java -jar -Xmx256m v2.jar -console -upgrade
    Note: To do the upgrade user have to give -upgrade option otherwise it won't overwrite existing binaries.

% cd $WS/sailfin

% lib/ant/bin/ant -f setup.xml uncompress-jars
    This command uncompress all pack.gz jars to sailfin/lib folder. It won't create any new domain.

% Start the domain now and in-place upgrade would take place. It would update exisiting domain.xml with new schema.


Friday Mar 20, 2009

Introduction to Diameter Protocol

Introduction to Diameter Protocol

What is Diameter Protocol?

Well, your ISP uses the standard Authentication, Authorization, and Accounting (AAA) before allowing you to connect to the network by using their services. So what is AAA and how does it affects you as a network user? AAA is simply a process inside an application that filters information before granting any access. It is where applications are based in order to provide a secure and reliable output. This is where RADUIS gateway takes place. There are plenty of AAA applications that we are using right now. This includes the one used when connecting for a wireless network and on some mobile phone features.

Remote Authentication Dial In User Service (RADUIS) was an older protocol used in implementing AAA standards. The protocol was also named as radius gateway for a clearer and easy to remember term. Despite its popularity and availability, radius gateway had some complications and limitations that need to be addressed. Applications relying on radius gateway were immensely limited to performing a more secured and reliable process. Thus, it gave birth to a new form of protocol called DIAMETER widely used in modern applications. The name is a pun on the RADIUS protocol, which is the predecessor (a diameter is twice the radius).

Diameter protocol came as a result of developments to eliminate limitations with the radius gateway. It serves similar purpose in AAA applications however, advanced processes and operations were added to the protocol to make it reliable. This included the addition of attribute value pairs (AVPs) and error notification which was not present on older protocols. Diameter is not directly backwards compatible, but provides an upgrade path for RADIUS. As a result, older applications designed to run on older protocols including those that were designed in conformity to radius gateway had to adapt the changes brought by the newer diameter protocol. Necessary steps were done on most application to have it run with diameter protocol, without changing the entire structure of these applications.

The design of the diameter protocol was initiated by the 3rd Generation Partnership Project (3GPP) to be used for their IP Multimedia Subsystem (IMS). By using the diameter protocol, applications are able to support interfaces such as Cx, Dh, Dx, Rf, Ro, and Sh. The Diameter protocol uses a binary header format and is capable of transporting a range of data units called AVPs. The Diameter base protocol specifies the delivery mechanisms, capability negotiation, error handling, accounting and extensibility of the protocol, whereas individual Diameter applications specify service-specific functions and AVPs.

The SailFin project is going to support Diameter protocol(Sh, Ro and Rf Interface) as the standard.

Acronyms and Main concepts

3GPP - Acronym for the 3rd Generation Partnership Project. 3GPP is a user and definer of Diameter protocols as applied to 3rd Generation Wireless Networks and the IMS.

AAA - Acronym for Authentication, Authorization, and Accounting.

Accounting - The act of collecting information on resource usage for the purpose of capacity planning, auditing, billing, or cost allocation. Diameter provides an accounting capability.

Authentication - The act of verifying the identity of an entity. Diameter provides an authentication capability.

Authorization - The act of determining whether a requesting entity will be allowed access to a resource. Diameter provides an authorization capability.

RADIUS - Acronym for Remote Authentication Dial In User Service. RADIUS is a type of AAA protocol.

Diameter - A base foundation protocol that provides transfer of Diameter messages, negotiation capabilities, routing capabilities, error handling. Diameter is a type of AAA protocol.

AVP - Acronym for Attribute Value Pair. The Diameter protocol consists of a header followed by one or more Attribute Value Pairs (AVPs). An AVP includes a header and is used to encapsulate protocol-specific data (as well as AAA information).

AVP-Code - A field in the header of a Diameter AVP that uniquely identifies the object attribute. Standardized AVP-Codes are maintained by the IANA.

IANA - Acronym for the Internet Assigned Number Authority.

IMS - Acronym for the Internet Protocol Multimedia Subsystem. Through the efforts of the 3GPP, it is one of the first functional subsystems that is a user and definer of the Diameter protocol and extensions.

TCP - Acronym for Transmission Control Protocol. A reliable transport layer protocol used for the exchange of Diameter protocols.

Rf Interface - A Diameter-based interface defined in the IMS that is used for Offline Billing functions.

Ro Interface - A Diameter-based interface defined in the IMS that is used for Online Billing functions.

Sh Interface - A Diameter-based interface defined in the IMS that is used for service layer-based AAA functions. The Sh interface allows for Download and update of transparent and non-transparent user data and Request and send notifications on changes in the user data.

Cx/Dx Interface - A Diameter-based interface defined in the IMS that is used for AAA functions.

Dh Interface - A Diameter-based interface defined in the IMS that is used for service layer AAA functions.


Thursday Feb 28, 2008

SailFin Build using Continuous Sanpshot

Why continuous snapshot?
What is continuous snapshot?
How to build using continuous snapshot?
What are the Check-In guidelines?

Why Continuous Snapshot

The current snapshot is generated once in 24 hrs and this makes it difficult for developers to use bootstrap command and work on top of that.

Continuous Snapshot

We now have a continuous snapshot for Sailfin being generated every 1 hr. This Image snapshot is a good stable base for the general developer community to work on. We are posting that Snapshot on external machine so user can work on top of that Snapshot. We are using Hudson to generate this snapshots. It takes 50 mins to build and 10mins to upload. This is available only for Linux and Windows.

Each Generated snapshot have different timestamp attached with name like 'sailfin-image-SNAPSHOT-(timestamp).jar' (e.g. sailfin-image-SNAPSHOT-200802181619.jar). Also, timestamp of the latest snapshot is stored in the sailfin/bootstrap/{os.name}.timestamp file. The contents of this timestamp file in your workspace would get you the appropriate snapshot version during build.

Build using continuous snapshot.

Note: This works on Linux and Windows OS only.
Commands to checkout SailFin Latest Snapshot and Doing build on top of that

  1. % cvs -d:pserver:naman_mehta@cvs.dev.java.net:/cvs co sailfin/bootstrap
  2. % cd sailfin/bootstrap
  3. % maven bootstrap-latest
    These commands checks out the sailfin dependency and latest sailfin image snapshot based on content stored in sailfin/bootstrap/{os.name}.timestamp file.
  4. % maven -Dmodules={module-name} checkout-sailfin
    These commands checks out the sailfin module that you wish to work on. Now you can make required changes in your module.
    or
    % maven -Dmodules={module-name} checkout-glassfish
    These commands checks out the glassfish module that you wish to work on. Now you can make required changes in your module.
  5. % maven -Dmodules={module-name} build-sailfin
    These commands builds your sailfin module. If any fails you need to fix them.
    or
    % maven -Dmodules={module-name} build-glassfish
    These commands builds your glassfish module. If any fails you need to fix them.
  6. % maven configure-runtime
    This command creates the domain. Now you can run the mandated tests on your module.

Check-In Guidelines

  1. Check if the build is broken or if the QLs do not have a 100% pass rate. You can verify this by looking mails from Hudson A or Hudson B also you can find build status on (URL: http://70.42.188.20:8280/hudson/job/SailFinBuild/). If the build is broken or OL is failfing then wait for the build to become normal again. If not go ahead to step 2.
  2. % cd $WS/sailfin/bootstrap
  3. % maven clobber
    These commands removes publish/glassfish folder from your workspace.
  4. % maven bootstrap-latest
    These commands checks out latest sailfin image snapshot based on content stored in sailfin/bootstrap/{os.nam}.timestamp file.
  5. % cd $WS/sailfin/{module-name}
  6. % cvs -nq update
    Resolves the conflicts if it is generated by CVS.
  7. % maven -Dmodules={module-name} build-sailfin or maven -Dmodules={module-name} build-glassfish
    Resolve the issue if build fails.
  8. % Run the mandated tests for your module. If there are test failures, you need to fix them else you can check-in your code.

Monday Feb 18, 2008

SailFin IzPack Installer

SailFin IzPack Installer Introduction about IzPack
Download SailFin IzPack Installer
How to install SailFin IzPack Installer?
How to uninstall SailFin?

Introduction about IzPack

IzPack is an installer generator for the Java platform. It produces lightweight installer that can be run on any operating system where a Java virtual machine is available. IzPack is licensed under the terms of the liberal opensource Apache Software License version 2.0.

Home Page for IzPack: Click Here

Download SailFin IzPack Installer

I took the SailFin Alpha 1.0 and prepared the installer for Linux, Windows, Mac OS and Solaris. The installer is pure "java - based" installer.

The "SailFin Installer" is publicly available @ Download From Here. The same jar is going to work on all the platforms (Linux, Windows, Mac OS and Solaris).

How to install SailFin IzPack Installer?

Prerequisite for Install:
Your system must have "Java virtual machine" available. And you must have set JAVA_HOME in your system. If JAVA_HOME is not found, it would install the Server but fail during Domain creation.

Run following command to Install:
% java -jar sailfin-izpack-installer.jar

After running above command, it would pop up the installation dialog. It is just a click-click installer. It has 10 steps to complete the SailFin installation.

1. Ask for the language selection. In which language user needs to start installer interaction. User can select either eng or fra. Click OK after the language selection.



2. Display welcome screen. Click Next.

3. Display README details. Click Next.

4. Display license Agreement. To continue with the installation user needs to Accept the license Agreement. Click Next.



5. Select Installation Path. User can select the installation directory for SailFin. If directory doesn't exist it would create the directory. Click Next.



6. Select the package you need to install. Docs and Samples are the optional package. Click Next.



7. Select inputs for Domain information and Domain network ports. User can give the port details and domain details. User can also gives input to setup server in cluster mode. Click Next.



8. Installation progress window. Wait for installation. Click Next.



9. Processing for creating domain. Installer would create domain as user given inputs in step 7. Click Next.



10. Installation completion window. Click Done.



How to uninstall SailFin?

Run following command to Uninstall:
% cd (your installation directory)/Uninstaller

% java -jar uninstaller.jar


Sailfin Build Monitoring on Hudson.

Introduction
Building and Monitoring SailFin Builds
Hudson Details

Introduction

SailFin is the name for the open source development project having full-featured Telco Application Server with load balancing, clustering and failover and administration features. SailFin adds SIP and Telco related capabilities on top of Sun Java System Application Server (SJS AS). SJS AS is developed as project GlassFish (http://glassfish.dev.java.net). SailFin is an affiliated member of GlassFish community in java.net.

You can find SailFin Project home page here - https://sailfin.dev.java.net/
You can find complete build instructions here - How to build SailFin?

We have deployed Web Application Hudson, which is open source java.net project by itself. Hudson is deployed on Glassfish Server for SailFin build monitoring. Hudson application monitors executions of repeated jobs, such as building a software project or jobs run by cron.


Building and Monitoring SailFin Builds

The job "SailFinBuild" is created on the publicly available host : http://70.42.188.20:8280/hudson/job/SailFinBuild/

Essentially, it executes following shell commands configured in hudson application.

Commands to checkout SailFind and doing build

% cvs -d:pserver:naman_mehta@cvs.dev.java.net:/cvs co sailfin/bootstrap
% cd sailfin/bootstrap
% maven checkout bootstrap-all build configure-runtime

These commands above checks out the sources using maven tool, which is build tool for SailFin workspace, downloads all binary components and builds all source modules and finally it configures the server image to be able to run and deploy applications on SailFin Server.

Commands to run glassfish QL Tests

% APS_HOME="$WORKSPACE/glassfish/appserv-tests"
% export APS_HOME
% S1AS_HOME="$WORKSPACE/publish/glassfish"
% export S1AS_HOME
% maven run-telco-quicklook

These commands above checks out Quicklook test for glassfish which covers most of the component level tests, and sets required variables like APS_HOME, S1AS_HOME and runs the tests using "maven run-telco-quicklook".

Commands to run SailFin QL Tests

% cd $WORKSPACE
% cvs -d :pserver:naman_mehta@sailfin.dev.java.net:/cvs co sailfin/sailfin-tests
% SF_HOME="$WORKSPACE/publish/glassfish"
% export SF_HOME
% WS_HOME="$WORKSPACE/sailfin/sailfin-tests"
% export WS_HOME
% HOST_IP_ADDRESS="70.42.188.20"
% export HOST_IP_ADDRESS
% ANT_OPTS="-Xmx1024m"
% export ANT_OPTS
% cd $WS_HOME
% ant setup
% ant setup-jain-sip
% ant start-domain
% ant all

These commands above checks out Quicklook test for SailFin which covers most of the component level tests, and sets required variables like SF_HOME, WS_HOME, HOST_IP_ADDRESS and runs the tests using "ant all".

After each successful build Hudson would archieve glassfish and SailFin QL reports. User can find those reports in the Latest Artifacts, Glassfish QL as gf_ql_results.html and SailFin QL as sf_ql_results.txt.


Hudson Details

We can find most of the Features and Benefits of Hudson application from its project home page, Hudson on java.net. But main features that I wanted to specify here are "Build Monitoring" and "Console Output".

On Hudson home page, user can find summary of the build. Which build is currently running? What is the last success and last duration? What is the last failure? On the left pannel user can find which build number is running currently.


Hudson Home Page


On Hudson homepage click on the current running build and click on "Console Output" to see the complete build log.



Console Output for Build


The output of the last build can be found from its "Build History" by going "SailFinBuild" home page.



SailFinBuild Home Page


About

Naman

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today