Hi folks,
Guess I managed to fix this weird issue at long last! The issue was that
some of these stratos components takes a while since they require multiple
osgi services. So while some of these bundle are in the process of
acquiring the necessary services, the server starts-up. The solution was to
go through all these bundles individually and figure out which of the
required services takes long to register, and then mark them as
ListnerManager-RequiredServices, as Azeez mentioned. I will commit the
changes after cleaning up the code and doing a build.
Many thanks to DimuthuL who offered a helping hand in fixing this issue.
Also thanks to Sameera and Pradeep for helping out with the gory osgi
specifics .. (:D)
Here is how the debug logs look now ;)
*[2012-04-05 15:56:06,026] DEBUG
{org.wso2.carbon.tenant.mgt.internal.TenantMgtServiceComponent} - *******
Governance Tenant Config bundle is activated ******* *
*[2012-04-05 15:56:06,027] DEBUG
{org.wso2.carbon.billing.mgt.internal.MultitenancyBillingServiceComponent}
- ******* Multitenancy Billing bundle is activated ******* *
*[2012-04-05 15:56:06,027] DEBUG
{org.wso2.carbon.usage.internal.UsageServiceComponent} - ******* Usage
bundle is activated ******* *
[2012-04-05 15:56:06,073] INFO
{org.wso2.carbon.core.transports.http.HttpsTransportListener} - HTTPS port
: 9443
[2012-04-05 15:56:06,073] INFO
{org.wso2.carbon.core.transports.http.HttpTransportListener} - HTTP port
: 9763
[2012-04-05 15:56:06,693] INFO
{org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Started
Transport Listener Manager
[2012-04-05 15:56:06,695] INFO
{org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server
: WSO2 Stratos Manager-3.2.0
[2012-04-05 15:56:06,696] INFO
{org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2
Carbon started in 47 sec
On Tue, Apr 3, 2012 at 11:05 AM, Amila Maha Arachchi <[email protected]>wrote:
> Hi Sameera,
>
> I had a chat with DimuthuL, defining cardinality as 1..1 was done by
> mistake. Ideally it should be 0..1, But, AFAIK Shariq has tested with 0..1
> cardinality and still the problem is there.
>
> Thanks,
> AmilaM.
>
>
> On Tue, Apr 3, 2012 at 10:23 AM, Sameera Jayasoma <[email protected]>wrote:
>
>> Hi Shariq/AmilaM,
>>
>> As per the discussions we had, the root cause of this problem is the
>> introduction of the new interface. That design will not work. Either we
>> have to make the service dependency optional by configuring the cardinality
>> properly (1..1 --> 0..1).
>>
>> Thanks,
>> Sameera.
>>
>> On Tue, Apr 3, 2012 at 8:51 AM, Amila Maha Arachchi <[email protected]>wrote:
>>
>>> Hi Shariq,
>>>
>>> I gave some thought into this. Following were our observations.
>>>
>>> 1. At the moment it seems like the scr.reference to TenantBillingService
>>> (which is used to deal with subscriptions at the time of tenant-mgt
>>> activities) is causing this delay. As you mentioned, once you remove this
>>> reference, all the services starts before the server. Can you confirm this?
>>> But, when we set the cardinality to 0..1, behaviour is not like that,
>>> right?
>>>
>>> 2. I have a doubt that there is some delay taking place when registering
>>> this service (which is done by the Billing.Mgt component). Shall we put
>>> some timestamps to check when this is registered and try with the two
>>> scenarios in 1).
>>>
>>> Thanks,
>>> AmilaM.
>>>
>>>
>>> On Mon, Apr 2, 2012 at 7:56 PM, Muhammed Shariq <[email protected]> wrote:
>>>
>>>> On Mon, Apr 2, 2012 at 12:20 PM, Amila Maha Arachchi
>>>> <[email protected]>wrote:
>>>>
>>>>> Hi Shariq,
>>>>>
>>>>> This is not the behaviour we see in a 1.5.2 released pack. In that
>>>>> pack, Billing bundle gets started before the server starts up. I checked a
>>>>> 1.5.2 pack with DEBUG logs and confirmed.
>>>>>
>>>>> So, is this due to a change in one of those bundles? Billing
>>>>> components has the same code as the 1.5.2 branch (I copied from branch to
>>>>> trunk).
>>>>>
>>>>
>>>> Yup I also checked in the previous release pack and this issue isn't
>>>> present. The most significant change the billing and tenant-mgt component
>>>> went through since was decoupling billing features from tenant management
>>>> as per STRATOS-1991 <https://wso2.org/jira/browse/STRATOS-1991>.
>>>>
>>>> I tried using ListnerManager-RequiredServices as well as
>>>> Axis2RequiredServices, but couldn't quite fix the issue yet. Will look into
>>>> this further with Sameera ...
>>>>
>>>>
>>>>> Thanks,
>>>>> AmilaM.
>>>>>
>>>>> On Mon, Apr 2, 2012 at 11:50 AM, Muhammed Shariq <[email protected]>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Since starting to write integration test for Manager I am facing an
>>>>>> issue in that, even though the server starts up and the ports are open
>>>>>> some
>>>>>> bundles are not even activated. Initially the idea was that the ther
>>>>>> server
>>>>>> getting started up before the relevant admin services gets deployed, so I
>>>>>> tried marking that service as an Axis2RequiredService, with this change
>>>>>> the
>>>>>> server never starts up at all (presumably due to deadlock). Next I
>>>>>> enabled
>>>>>> debug logs in tennat-mgt, billing, usage bundles and noticed that some
>>>>>> bundles only get activated after the server start up. However adding a 30
>>>>>> sec sleep solves the issue, meaning within that interval all the bundles
>>>>>> get activated ...
>>>>>>
>>>>>> I tried many ways like figure out what causes this delay, but still
>>>>>> haven't managed to pinpoint which bundle+reference is causing the issue.
>>>>>> Any tips on sorting this issue out if highly appreciated. Some logs
>>>>>> extracted with some sysouts are as follows,
>>>>>>
>>>>>>
>>>>>> [2012-04-02 11:28:58,826] INFO
>>>>>> {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -
>>>>>> Initialized Identity Persistence Store.
>>>>>> [2012-04-02 11:28:58,872] INFO
>>>>>> {org.wso2.carbon.core.transports.http.HttpsTransportListener} - HTTPS
>>>>>> port
>>>>>> : 9443
>>>>>> [2012-04-02 11:28:58,872] INFO
>>>>>> {org.wso2.carbon.core.transports.http.HttpTransportListener} - HTTP port
>>>>>> : 9763
>>>>>> [2012-04-02 11:28:59,443] INFO
>>>>>> {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -
>>>>>> Started
>>>>>> Transport Listener Manager
>>>>>> [2012-04-02 11:28:59,443] INFO
>>>>>> {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -
>>>>>> Server
>>>>>> : WSO2 Stratos Manager-3.2.0
>>>>>> [2012-04-02 11:28:59,444] INFO
>>>>>> {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2
>>>>>> Carbon started in 33 sec
>>>>>> [2012-04-02 11:28:59,457] DEBUG
>>>>>> {org.wso2.carbon.tenant.activity.internal.TenantActivityServiceComponent}
>>>>>> -
>>>>>> ******* Tenant Activity bundle is activated *******
>>>>>> [2012-04-02 11:28:59,459] ERROR
>>>>>> {org.wso2.carbon.tenant.activity.ui.internal.TenantActivityUIServiceComponent}
>>>>>> - ******* Tenant Activity UI bundle is activated *******
>>>>>> [2012-04-02 11:28:59,481] INFO
>>>>>> {org.wso2.carbon.tenant.dispatcher.internal.TenantDispatcherServiceComponent}
>>>>>> - Deployed __MultitenantDispatcherService
>>>>>> [2012-04-02 11:28:59,482] INFO
>>>>>> {org.wso2.carbon.tenant.dispatcher.internal.TenantDispatcherServiceComponent}
>>>>>> - Added multitenant dispatchers
>>>>>> [2012-04-02 11:29:00,301] DEBUG
>>>>>> {org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent}
>>>>>> - ******* Multitenancy Throttling Agent bundle is activated *******
>>>>>> *[2012-04-02 11:29:00,636] INFO
>>>>>> {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - Mgt Console URL
>>>>>> : https://172.16.172.1:9443/carbon/*
>>>>>> [2012-04-02 11:29:00,649] WARN
>>>>>> {org.wso2.carbon.identity.authenticator.saml2.sso.ui.internal.SAML2SSOAuthenticatorUIDSComponent}
>>>>>> - Initialization failed for SSO Authenticator. Starting with the default
>>>>>> authenticator
>>>>>> [2012-04-02 11:29:00,677] DEBUG
>>>>>> {org.wso2.carbon.billing.mgt.internal.MultitenancyBillingServiceComponent}
>>>>>> - Receiving billingManager service
>>>>>> [2012-04-02 11:29:00,678] DEBUG
>>>>>> {org.wso2.carbon.billing.mgt.internal.MultitenancyBillingServiceComponent}
>>>>>> - Setting Tenant Usage Retriever service
>>>>>> [2012-04-02 11:29:00,720] DEBUG
>>>>>> {org.wso2.carbon.throttling.manager.internal.ThrottlingManagerServiceComponent}
>>>>>> - Setting MT billing info service
>>>>>> [2012-04-02 11:29:00,723] DEBUG
>>>>>> {org.wso2.carbon.throttling.manager.internal.ThrottlingManagerServiceComponent}
>>>>>> - Receiving billingManager service
>>>>>> [2012-04-02 11:29:00,729] DEBUG
>>>>>> {org.wso2.carbon.throttling.manager.internal.ThrottlingManagerServiceComponent}
>>>>>> - Setting Tenant Usage Retriever service
>>>>>> [2012-04-02 11:29:04,055] DEBUG
>>>>>> {org.wso2.carbon.throttling.manager.internal.ThrottlingManagerServiceComponent}
>>>>>> - Multitenancy Throttling Manager bundle is activated
>>>>>> [2012-04-02 11:29:04,106] DEBUG
>>>>>> {org.wso2.carbon.tenant.mgt.internal.TenantMgtServiceComponent} -
>>>>>> Receiving ConfigurationContext Service
>>>>>> *[2012-04-02 11:29:04,123] DEBUG
>>>>>> {org.wso2.carbon.tenant.mgt.internal.TenantMgtServiceComponent} -
>>>>>> *******
>>>>>> Governance Tenant Config bundle is activated ******* *
>>>>>> *[2012-04-02 11:29:04,123] DEBUG
>>>>>> {org.wso2.carbon.billing.mgt.internal.MultitenancyBillingServiceComponent}
>>>>>> - ******* Multitenancy Billing bundle is activated ******* *
>>>>>> *[2012-04-02 11:29:04,124] DEBUG
>>>>>> {org.wso2.carbon.usage.internal.UsageServiceComponent} - ******* Usage
>>>>>> bundle is activated ******* *
>>>>>> [2012-04-02 11:29:04,165] INFO
>>>>>> {org.wso2.carbon.usage.summary.generator.internal.UsageSummaryGeneratorServiceComponent}
>>>>>> - Stratos Usage Summary Generation Enabled.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks,
>>>>>> Shariq.
>>>>>> Phone: +94 777 202 225
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dev mailing list
>>>>>> [email protected]
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Amila Maharachchi*
>>>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>>>>
>>>>> Blog: http://maharachchi.blogspot.com
>>>>> Mobile: +94719371446
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Shariq.
>>>> Phone: +94 777 202 225
>>>>
>>>>
>>>
>>>
>>> --
>>> *Amila Maharachchi*
>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>>
>>> Blog: http://maharachchi.blogspot.com
>>> Mobile: +94719371446
>>>
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma
>> Technical Lead and Product Manager, WSO2 Carbon
>>
>> WSO2, Inc. (http://wso2.com)
>> email: [email protected]
>> blog: http://tech.jayasoma.org
>>
>>
>> Lean . Enterprise . Middleware
>>
>
>
>
> --
> *Amila Maharachchi*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>
>
--
Thanks,
Shariq.
Phone: +94 777 202 225
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev