Wednesday, November 24, 2010

Debug Carbon server when it is started as a daemon

Written by Heshan Suriyaarachchi

WSO2 Carbon Server can be run as a daemon on Unix/Linux systems. Say for instance that you need to remote debug the server when it is started as a daemon. This blogpost will be discussing $subject.

1) Open up the wrapper.conf file.

heshan@heshan-ThinkPad:~/Dev/customer/wso2esb-3.0.1/bin$ vim ../repository/conf/wrapper.conf

2) Add following entries to the wrapper.conf.,server=y,suspend=y,address=5005

3) Start the ESB as a daemon.

heshan@heshan-ThinkPad:~/Dev/customer/wso2esb-3.0.1/bin$ ./ start
Starting WSO2 ESB v3.0.1...

4) Start the debugger.

5) Monitor the log.

heshan@heshan-ThinkPad:~/Dev/customer/wso2esb-3.0.1/bin$ tail -f ../repository/logs/wrapper.log
INFO | jvm 1 | 2010/11/24 11:35:09 | object space 84224K, 76% used [0x00007fbfcff20000,0x00007fbfd3e0dff0,0x00007fbfd5160000)
STATUS | wrapper | 2010/11/24 11:35:09 | <-- Wrapper Stopped STATUS | wrapper | 2010/11/24 11:45:46 | --> Wrapper Started as Daemon
WARN | wrapper | 2010/11/24 11:45:46 | ------------------------------------------------------------------------
WARN | wrapper | 2010/11/24 11:45:46 | The JVM is being launched with a debugger enabled and could possibly be
WARN | wrapper | 2010/11/24 11:45:46 | suspended. To avoid unwanted shutdowns, timeouts will be disabled,
WARN | wrapper | 2010/11/24 11:45:46 | removing the ability to detect and restart frozen JVMs.
WARN | wrapper | 2010/11/24 11:45:46 | ------------------------------------------------------------------------
STATUS | wrapper | 2010/11/24 11:45:46 | Launching a JVM...
INFO | jvm 1 | 2010/11/24 11:45:46 | Listening for transport dt_socket at address: 5005
INFO | jvm 1 | 2010/11/24 11:45:56 | Wrapper (Version 3.2.3)
INFO | jvm 1 | 2010/11/24 11:45:56 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2010/11/24 11:45:56 |
INFO | jvm 1 | 2010/11/24 11:45:56 | [2010-11-24 11:45:56,845] INFO - Main Initializing system...

Now you have successfully debugged the Carbon Server, when it is started as a daemon.

See original post

Monday, November 22, 2010

SSL Debugging - Part - II - Intercepting traffic between WSO2 Carbon FE and BE

All WSO2 products are based on WSO2 Carbon, which sits as the core for all of them.

We do have a clear Front-End [FE], Back-End [BE] separation - where the FE web application talks to the BE, via web service calls.

This benefits the end user - which adds the flexibility of developing his own client to the corresponding back end functionality in a language independent manner.

All UI components you see in the default distribution talk to the BE services via SOAP over HTTPS.

In case of digging in to an issue - since this is on HTTPS - it's hard to intercept the communication channel and figure what exact messages being passed from FE to BE.

This is how you can do it - to intercept messages flowing over SSL.

1. ssldump
2. The private key of WSO2 Carbon, in PEM format - you can download it from here.

Run the following command from where you have the private key, and start any WSO2 Carbon based product - say on HTTPS port 9443

:\> sudo ssldump -Ad -k wso2carbon.pem -p wso2carbon -i lo0 host localhost and port 9443

Make sure to have the correct interface set as per your system.[-i lo0] and start the ssldump before you start the server.

Now you can track all the messages between FE and BE in clear text.
1 8 0.0621 (0.0007) C>SV3.1(203) application_data
POST /services/AuthenticationAdmin HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:login"
User-Agent: Axis2
Host: localhost:9443
Transfer-Encoding: chunked

1 9 0.0626 (0.0005) C>SV3.1(399) application_data
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="">
<ns1:login xmlns:ns1="">

1 10 0.2071 (0.1445) S>CV3.1(544) application_data
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=37FC902E5E7C6C0D081E28B4DF067A76; Path=/; Secure
Content-Type: application/soap+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 19 Nov 2010 02:44:26 GMT

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="">

See original post

Setting up WSO2 P2 Repo Locally

Currently WSO2 doesn't host the P2 repository as a single distribution to download - so whenever you want to add a new Feature, you need to point your Carbon instance to the online p2 repo hosted at

This is how you can download the entire repository and set it up locally..

$ pwd


$ wget -r -l inf

The above will download the entire P2 repo to the local machine.

Once that is done, go to the running carbon instance, Configure --> Features --> Settings --> Add Repository --> Select Location as Local and set it as, /Users/prabath/p2_repo/

That's it...

See original post

Monday, November 15, 2010

WSO2 Stratos 1.0.0 Released!

Written by Sami

WSO2 Stratos team is pleased to announce the release of version 1.0.0 WSO2 Stratos.

WSO2 Stratos is a complete middleware platform-as-a-service for implementing an enterprise service-oriented architecture (SOA). WSO2 Stratos is 100% open source and is available under Apache License v2.0. It is built on top of, and extends, WSO2 Carbon, the award-winning, comprehensive, concise, lean enterprise middleware platform.

WSO2 Stratos 1.0.0 release is available for download at

WSO2 Platform as a Service 1.0.0 Beta is readily available for access at This is a hosted version of WSO2 Stratos 1.0.0 currently in beta status where customers can register and use all the middleware services without having to deploy any software.

With WSO2 Stratos, IT professionals have a fully hosted platform-as-a-service (PaaS) for rapidly building and deploying services and composite applications, with instant provisioning capability. WSO2 Stratos delivers on the promise of cloud computing with a complete, enterprise middleware platform for delivering applications that can run on, and integrate with, any combination of private clouds, public clouds and on-premise systems. WSO2 Stratos is equipped with features for auto-scaling and single sign-on, as well as enhanced functionality for automatic activity monitoring, usage metering, centralized governance and identity management.

WSO2 Stratos offers all the benefits of the cloud without the complexity or fear of vendor lock-in.
  • It is integrated across multiple middleware platform services and provides unified interfaces across services; hence facilitate shorter project times
  • Metering reduce costs by allowing monitoring that lead to optimizing data center utilization and allowing companies to pay only for what they use
  • Auto-scaling provides the ability to scale up or down based on the demand for services and usage capacity, eliminating both resource starvation as well as resource slack
  • Multi-tenancy means applications supporting different organizations, business units or regional offices can be delivered cost-effectively from a single location sharing the same platform and resources, yet run fully independently
  • Built-in automated governance and centralized identity management facilitates control over applications and services across different tenants.
  • WSO2 Stratos is based on the comprehensive WSO2 Carbon middleware platform, hence, applications can be migrated smoothly and safely on premise, to a private cloud, to the public cloud, or to a hybrid environment.providing unprecedented deployment flexibility.

WSO2 Stratos comes with all of the production-quality runtime engines in WSO2 Carbon available as cloud services:
  • WSO2 Enterprise Service Bus as a Service
  • WSO2 Application Server as a Service
  • WSO2 Data as a Service
  • WSO2 Governance as a Service
  • WSO2 Identity as a Service
  • WSO2 Business Activity Monitoring as a Service
  • WSO2 Business Processes as a Service
  • WSO2 Business Rules as a Service
  • WSO2 Mashups as a Service
  • WSO2 Gadgets as a Service

WSO2 Stratos Features

At the heart of the WSO2 Stratos Platform as a Service is a cloud manager. This PaaS home service provides management and monitoring capabilities and offers a Web portal where users can register their domains (tenants), log in, manage their accounts, manage users and roles, and activate/deactivate the middleware services that are available for their users.

The PaaS home offers point-and-click simplicity for provisioning middleware services, so developers can get started immediately and focus on the business logic, rather than configuring and deploying software systems.

The platform integration layer within WSO2 Stratos allows it to install onto any existing cloud infrastructure such as Eucalyptus, Ubuntu Enterprise Cloud, Amazon EC2, and VMware ESX. Enterprises are never locked into a specific infrastructure provider or platform.

Once WSO2 Stratos is installed, a Web-based management portal lets users configure, manage and govern independent-but-consistent services for each department, or for each stage of a system's lifecycle. Each server is completely virtual, scaling up automatically to handle the required load, metered and billed according to use.

Noteworthy WSO2 Stratos features include:
  • Auto-scaling capabilities: WSO2 Stratos automatically adjusts the use of cloud resources to meet increased or decreased demand.
  • Single sign-on functionality: Users only need to sign on once to access all WSO2 Stratos services that they are authorized to use.
  • Enhanced automatic activity monitoring: Activity monitoring is available in real time, so there is no time gap between data collection and the availability of data for monitoring.
  • Enhanced usage metering: Metering is automated so that every operation by tenant users will be monitored and recorded. The metering information can be used for billing and for offering constrained access for certain services.
  • Enhanced centralized governance and identity management: All the resources of all Stratos services can be monitored and governed from a single point - from WSO2 Stratos Governance as a Service. When a modification, such as changing a security policy, or changing the keystore, is done from a single place, it is immediately visible to all other services. In addition, all services share a single user store. When a user is added from a service, that new user can immediately access all other services available for the tenant.


As a fully open source solution WSO2 Stratos does not require any licensing fees.

WSO2 offers a range of service and support options, including evaluation support, CloudStart(SM) consulting program, development support and production support.

For additional support information please visit .

WSO2 Stratos Team

See original post

Wednesday, November 3, 2010

Rediscover SOA with WSO2 Carbon & WS-Discovery

Written by Hiranya Jayathilaka

One of the hottest features of new WSO2 Carbon 3.0 based releases is the out-of-the-box WS-Discovery support. WS-Discovery is a standard protocol for discovering services and service endpoints. This enables service clients to search for services based on a given criteria and bind with the discovered services. The WS-Discovery specification defines two modes of operation:
1. Adhoc mode
In the adhoc mode, servers advertise the services they have using a UDP multicast protocol. Similarly client applications can search for available services by sending out probe requests over UDP multicast. Servers listening for such probe requests can then send the service information to the client over a unicast channel.
2. Managed mode
In the managed mode, servers and clients use an intermediary known as the discovery proxy for all service discovery purposes. Servers will register the available services with the discovery proxy by sending notifications over HTTP. Then clients can directly probe the discovery proxy to discover the registered services. This mode of operation does not use UDP multicast for any sort of communication. All interactions take place over regular HTTP channels and if needed, HTTPS can be used to provide transport level security.
Starting from version 3.0, WSO2 Carbon framework has full support for WS-Discovery managed mode. The following products ship the necessary WS-Discovery libraries with them by default:
WSO2 G-Reg has the ability to act as a discovery proxy. This mode is enabled by default and user doesn't have to configure anything in the G-Reg side. In products like WSAS and DSS, WS-Discovery support should be manually enabled by pointing them to an already existing discovery proxy. Once configured, these server applications will automatically register the services they have with the discovery proxy. Service information will be synchronized with the discovery proxy at server start up, shutdown and service level updates. This ensures that the information in the discovery proxy are always up-to-date. WSO2 ESB can query one or more discovery proxy instances to find the necessary services and service endpoints. The ESB UI also enables creating proxy services and mediation endpoints using the discovered endpoints.
There are lot of other cool things you can do in Carbon platform with WS-Discovery. There are several plug-ins and extensions available to download and try out as well. I'm planning to post a series of blogs addressing various aspects of WS-Discovery in the next few months. So stay tuned! In the meantime read this article to learn how Jos Dirksen integrated Mule with WSO2 G-Reg using the WS-Discovery capabilities of Carbon framework.

See original post


Copyright 2009 All Rights Reserved Revolution Two Church theme modified by Milinda Pathirage