wso2 / product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
849 stars 786 forks source link

-Dtenant.idle.time= did not seem to work after the time has elapsed #4809

Open tgtshanika opened 5 years ago

tgtshanika commented 5 years ago

Description:

even though tenant idle was passed on api manager startup the tenant cleanup didnt seem to happen steps 1.start the server as sh wso2server.sh -Dtenant.idle.time=1 -DportOffset=2

Note: ideally after 1 minute of idel time the tenant should be unloaded logs

[2016-06-07 18:57:12,865]  INFO - MessagingEngine Starting SlotDelivery Workers.
[2016-06-07 18:57:13,554]  INFO - MessagingEngine Start Disruptor writing messages to store.
[2016-06-07 18:57:13,555]  INFO - QpidServiceComponent AMQP Host Address : 0.0.0.0 Port : 5674
[2016-06-07 18:57:13,555]  INFO - QpidServiceComponent Successfully connected to AMQP server on port 5674
[2016-06-07 18:57:13,556]  WARN - QpidServiceComponent MQTT Transport is disabled as per configuration.
[2016-06-07 18:57:13,556]  INFO - QpidServiceComponent WSO2 Message Broker is started.
[2016-06-07 18:57:13,772]  INFO - PassThroughHttpListener Starting Pass-through HTTP Listener...
[2016-06-07 18:57:13,779]  INFO - PassThroughListeningIOReactorManager Pass-through HTTP Listener started on 0.0.0.0:8282
[2016-06-07 18:57:13,780]  INFO - PassThroughHttpSSLListener Starting Pass-through HTTPS Listener...
[2016-06-07 18:57:13,783]  INFO - PassThroughListeningIOReactorManager Pass-through HTTPS Listener started on 0.0.0.0:8245
[2016-06-07 18:57:13,895]  INFO - ThriftDataReceiver Thrift Server started at 0.0.0.0
[2016-06-07 18:57:13,904]  INFO - ThriftDataReceiver Thrift SSL port : 7713
[2016-06-07 18:57:13,908]  INFO - ThriftDataReceiver Thrift port : 7613
[2016-06-07 18:57:13,928]  INFO - NioSelectorPool Using a shared selector for servlet write/read
[2016-06-07 18:57:13,957]  INFO - NioSelectorPool Using a shared selector for servlet write/read
[2016-06-07 18:57:14,026]  INFO - TaskServiceImpl Task service starting in STANDALONE mode...
[2016-06-07 18:57:14,105]  INFO - RegistryEventingServiceComponent Successfully Initialized Eventing on Registry
[2016-06-07 18:57:14,211]  INFO - JMXServerManager JMX Service URL  : service:jmx:rmi://localhost:11113/jndi/rmi://localhost:10001/jmxrmi
[2016-06-07 18:57:14,212]  INFO - StartupFinalizerServiceComponent Server           :  WSO2 API Manager-2.0.0
[2016-06-07 18:57:14,213]  INFO - StartupFinalizerServiceComponent WSO2 Carbon started in 39 sec
[2016-06-07 18:57:14,524]  INFO - CarbonUIServiceComponent Mgt Console URL  : https://172.17.0.1:9445/carbon/
[2016-06-07 18:57:14,524]  INFO - CarbonUIServiceComponent API Publisher Default Context : https://172.17.0.1:9445/publisher
[2016-06-07 18:57:14,524]  INFO - CarbonUIServiceComponent API Store Default Context : https://172.17.0.1:9445/store
[2016-06-07 18:57:34,178]  INFO - CarbonEventManagementService Starting polling event receivers
[2016-06-07 18:57:54,444]  INFO - JMSConnectionFactory JMS ConnectionFactory : Siddhi-JMS-Consumer initialized
[2016-06-07 18:57:54,450]  INFO - JMSThrottleDataRetriever Starting jms topic consumer thread...
[2016-06-07 18:57:56,456]  INFO - CarbonAuthenticationUtil 'admin@tenant.com [1]' logged in at [2016-06-07 18:57:56,454+0530]
[2016-06-07 18:57:56,469]  INFO - TenantAxisConfigurator Creating tenant AxisConfiguration for tenant: tenant.com[1]
[2016-06-07 18:57:56,504]  INFO - UserStoreConfigurationDeployer User Store Configuration Deployer initiated.
[2016-06-07 18:57:56,505]  INFO - UserStoreConfigurationDeployer User Store Configuration Deployer initiated.
[2016-06-07 18:57:56,518]  INFO - TenantServiceCreator Initializing APIM TenantServiceCreator for the tenant domain : tenant.com
[2016-06-07 18:57:56,589]  INFO - TenantServiceBusInitializer Intializing the ESB Configuration for the tenant domain : tenant.com
[2016-06-07 18:57:56,592]  INFO - SynapseControllerFactory Using Synapse home : /home/shavantha/products/apimanager/beta/wso2am-2.0.0-SNAPSHOT/repository/tenants/1
[2016-06-07 18:57:56,594]  INFO - SynapseControllerFactory Using synapse.xml location : /home/shavantha/products/apimanager/beta/wso2am-2.0.0-SNAPSHOT/repository/tenants/1/synapse-configs/default
[2016-06-07 18:57:56,594]  INFO - SynapseControllerFactory Using server name : synapse.tenant.com
[2016-06-07 18:57:56,594]  INFO - SynapseControllerFactory The timeout handler will run every : 15s
[2016-06-07 18:57:56,596]  INFO - Axis2SynapseController Initializing Synapse at : Tue Jun 07 18:57:56 IST 2016
[2016-06-07 18:57:56,606]  INFO - CarbonSynapseController Loading the mediation configuration from the file system
[2016-06-07 18:57:56,607]  INFO - MultiXMLConfigurationBuilder Building synapse configuration from the synapse artifact repository at : /home/shavantha/products/apimanager/beta/wso2am-2.0.0-SNAPSHOT/repository/tenants/1/synapse-configs/default
[2016-06-07 18:57:56,608]  INFO - XMLConfigurationBuilder Generating the Synapse configuration model by parsing the XML configuration
[2016-06-07 18:57:56,620]  INFO - NTaskTaskManager Initialized task manager. Tenant [1]
[2016-06-07 18:57:56,965]  INFO - SynapseConfigurationBuilder Loaded Synapse configuration from the artifact repository at : /home/shavantha/products/apimanager/beta/wso2am-2.0.0-SNAPSHOT/repository/tenants/1/synapse-configs/default
[2016-06-07 18:57:56,966]  INFO - Axis2SynapseController Loading mediator extensions...
[2016-06-07 18:57:56,966]  INFO - Axis2SynapseController Deploying the Synapse service...
[2016-06-07 18:57:56,966]  INFO - Axis2SynapseController Deploying Proxy services...
[2016-06-07 18:57:56,966]  INFO - Axis2SynapseController Deploying EventSources...
[2016-06-07 18:57:56,968]  INFO - ServerManager Server ready for processing...
[2016-06-07 18:57:56,982]  WARN - MediationStatisticsServiceComponent Couldn't find the mediation statistics store for tenant id: 1
[2016-06-07 18:57:57,020]  INFO - PermissionUpdater Permission cache updated for tenant 1
[2016-06-07 18:57:57,025]  INFO - TenantAxisUtils Loaded tenant tenant.com in 567 ms
[2016-06-07 18:57:59,715]  INFO - DynamicSaslRegistrar Additional SASL providers successfully registered.
[2016-06-07 18:57:59,717]  INFO - CallbackHandlerRegistry Callback handlers available for SASL mechanisms: CRAM-MD5 CRAM-MD5-HASHED AMQPLAIN PLAIN
[2016-06-07 18:57:59,729]  INFO - ConnectionStartOkMethodHandler SASL Mechanism selected: PLAIN
[2016-06-07 18:57:59,730]  INFO - ConnectionStartOkMethodHandler Locale selected: en_US
[2016-06-07 18:57:59,738]  INFO - ConnectionStartOkMethodHandler Connected as: admin
[2016-06-07 18:57:59,739]  INFO - ConnectionStartOkMethodHandler Framesize set to 65535
[2016-06-07 18:57:59,770]  INFO - JMSListener Connection attempt: 1 for JMS Provider for listener: Siddhi-JMS-Consumer#throttleData was successful!
[2016-06-07 18:57:59,773]  INFO - JMSTaskManager Task manager for Siddhi-JMS-Consumer [re-]initialized
[2016-06-07 18:57:59,791]  INFO - ConnectionStartOkMethodHandler SASL Mechanism selected: PLAIN
[2016-06-07 18:57:59,791]  INFO - ConnectionStartOkMethodHandler Locale selected: en_US
[2016-06-07 18:57:59,795]  INFO - ConnectionStartOkMethodHandler Connected as: admin
[2016-06-07 18:57:59,795]  INFO - ConnectionStartOkMethodHandler Framesize set to 65535
[2016-06-07 18:57:59,824]  INFO - ChannelOpenHandler Connecting to: carbon
[2016-06-07 18:57:59,832]  INFO - AndesChannel Channel created (ID: 10.100.0.230:46628)
[2016-06-07 18:57:59,839]  WARN - JMSUtils Cannot locate destination : throttleData
[2016-06-07 18:57:59,915]  INFO - QueueDeclareHandler Queue tmp_172_17_0_1_46628_1 bound to default exchange(<<default>>)
[2016-06-07 18:57:59,916]  INFO - QueueDeclareHandler Queue tmp_172_17_0_1_46628_1 declared successfully
[2016-06-07 18:57:59,956]  INFO - QueueBindHandler Binding queue tmp_172_17_0_1_46628_1 to exchange TopicExchange[amq.topic] with routing key throttleData
[2016-06-07 18:57:59,994]  INFO - SubscriptionEngine Local subscription ADDED [throttleData]ID=0@NODEshavantha-ThinkPad-X1-Carbon-4th/127.0.1.1/T=1465306079978/D=false/X=true/O=clientid/E=amq.topic/ET=org.wso2.andes.server.exchange.TopicExchange$1@5317a75c/EUD=0/S=true
[2016-06-07 18:58:00,774]  INFO - JMSListener Started to listen on destination : throttleData of type topic for listener Siddhi-JMS-Consumer#throttleData

By @malinthaprasan from https://wso2.org/jira/browse/APIMANAGER-4982

tgtshanika commented 5 years ago

The problem is the -Dtenant.idle.time property is overridden with IdleTime defined in carbon.xml. If you commentout IdleTime configuration in carbon.xml, this will work. Created [1] in kernel repo.

[1] https://github.com/wso2/carbon-kernel/issues/1512

By @malinthaprasan