问题
I started wso2 elb server and it is not auto scaling and showing the following error,
[2015-07-01 18:55:35,653] INFO - CarbonUIServiceComponent Mgt Console URL : ht
tps://10.167.46.154:9443/carbon/
[2015-07-01 18:57:35,259] DEBUG - ServiceRequestsInFlightAutoscaler This is the
primary load balancer, starting to perform sanity checks.
[2015-07-01 18:57:35,260] DEBUG - ServiceRequestsInFlightAutoscaler Values in Ap
p domain context: 0 - 0 - Ctxt: 996465500
[2015-07-01 18:57:35,262] DEBUG - ServiceRequestsInFlightAutoscaler Values in Ap
p domain context: 0 - 0 - Ctxt: 3907204
[2015-07-01 18:57:35,268] DEBUG - ServiceRequestsInFlightAutoscaler Load Balance
r members of domain: wso2.carbon.lb.domain and sub domain: null running instance
s (including this): 2 - pending instances: 0
[2015-07-01 18:57:35,268] DEBUG - ServiceRequestsInFlightAutoscaler Load balance
r sanity check has started.
[2015-07-01 18:57:35,269] DEBUG - ServiceRequestsInFlightAutoscaler Sanity check
has started for: Domain: wso2.esb.domain - Sub Domain: worker
[2015-07-01 18:57:35,270] DEBUG - ServiceRequestsInFlightAutoscaler Sanity check
has started for: Domain: wso2.esb.domain - Sub Domain: mgt
[2015-07-01 18:57:35,287] ERROR - ClientUtils Address information does not exist
in the Endpoint Reference (EPR).The system cannot infer the transport mechanism
.
[2015-07-01 18:57:35,287] ERROR - ClientUtils Address information does not exist
in the Endpoint Reference (EPR).The system cannot infer the transport mechanism
.
[2015-07-01 18:57:35,289] ERROR - AutoscaleUtil Failed to start an instance of D
omain: wso2.esb.domain - Sub Domain: mgt.
org.apache.axis2.AxisFault: Address information does not exist in the Endpoint R
eference (EPR).The system cannot infer the transport mechanism.
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtil
s.java:73)
at org.apache.axis2.client.OperationClient.prepareMessageContext(Operati
onClient.java:288)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:176)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
149)
at org.wso2.carbon.stratos.cloud.controller.stub.CloudControllerServiceS
tub.startInstance(CloudControllerServiceStub.java:572)
at org.wso2.carbon.mediator.autoscale.lbautoscale.clients.CloudControlle
rStubClient.startInstance(CloudControllerStubClient.java:58)
at org.wso2.carbon.mediator.autoscale.lbautoscale.util.AutoscaleUtil.run
Instances(AutoscaleUtil.java:319)
at org.wso2.carbon.mediator.autoscale.lbautoscale.callables.AppNodeSanit
yCheckCallable.call(AppNodeSanityCheckCallable.java:81)
at org.wso2.carbon.mediator.autoscale.lbautoscale.callables.AppNodeSanit
yCheckCallable.call(AppNodeSanityCheckCallable.java:31)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603)
at java.lang.Thread.run(Thread.java:722)
[2015-07-01 18:57:35,289] ERROR - AutoscaleUtil Failed to start an instance of D
omain: wso2.esb.domain - Sub Domain: worker.
org.apache.axis2.AxisFault: Address information does not exist in the Endpoint R
eference (EPR).The system cannot infer the transport mechanism.
at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtil
s.java:73)
at org.apache.axis2.client.OperationClient.prepareMessageContext(Operati
onClient.java:288)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:176)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
149)
at org.wso2.carbon.stratos.cloud.controller.stub.CloudControllerServiceS
tub.startInstance(CloudControllerServiceStub.java:572)
at org.wso2.carbon.mediator.autoscale.lbautoscale.clients.CloudControlle
rStubClient.startInstance(CloudControllerStubClient.java:58)
at org.wso2.carbon.mediator.autoscale.lbautoscale.util.AutoscaleUtil.run
Instances(AutoscaleUtil.java:319)
at org.wso2.carbon.mediator.autoscale.lbautoscale.callables.AppNodeSanit
yCheckCallable.call(AppNodeSanityCheckCallable.java:81)
at org.wso2.carbon.mediator.autoscale.lbautoscale.callables.AppNodeSanit
yCheckCallable.call(AppNodeSanityCheckCallable.java:31)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603)
at java.lang.Thread.run(Thread.java:722)
[2015-07-01 18:57:35,296] DEBUG - ServiceRequestsInFlightAutoscaler Autoscaling
analysis is starting to run for domain: wso2.esb.domain and sub domain: worker
[2015-07-01 18:57:35,298] DEBUG - ServiceRequestsInFlightAutoscaler Autoscaling
analysis is starting to run for domain: wso2.esb.domain and sub domain: mgt
[2015-07-01 18:57:35,298] DEBUG - ServiceRequestsInFlightAutoscaler Task finishe
d a cycle.
My loadbalancer.conf file:
loadbalancer {
# minimum number of load balancer instances
instances 1;
# fully qualified class name of load balancer enpoint which is extended from org.apache.synapse.endpoints.LoadbalanceEndpoint
lb_endpoint_class org.wso2.carbon.lb.endpoint.endpoint.TenantAwareLoadBalanceEndpoint;
# whether autoscaling should be enabled or not.
enable_autoscaler true;
# autoscaling decision making task
autoscaler_task org.wso2.carbon.mediator.autoscale.lbautoscale.task.ServiceRequestsInFlightAutoscaler;
# whether to use embedded autoscaler or not. By default, we use embedded autoscaler.
use_embedded_autoscaler false;
#please use this whenever url-mapping is used through LB.
#size_of_cache 100;
# End point reference of the Autoscaler Service. This should be present, if you disabled embedded autoscaling.
#autoscaler_service_epr https://host_address:https_port/services/AutoscalerService/;
# interval between two task executions in milliseconds
autoscaler_task_interval 60000;
# after an instance booted up, task will wait maximum till this much of time and let the server started up
server_startup_delay 6000; #default will be 60000ms
# session time out
session_timeout 900000;
# enable fail over
fail_over true;
#mb_server_url localhost:5672;
# whether domain mapping should be enabled or not.
enable_domain_mapping false;
}
# services' details which are fronted by this WSO2 Elastic Load Balancer
services {
# default parameter values to be used in all services
defaults {
# minimum number of service instances required. WSO2 ELB will make sure that this much of instances
# are maintained in the system all the time, of course only when autoscaling is enabled.
min_app_instances 1;
# maximum number of service instances that will be load balanced by this ELB.
max_app_instances 5;
# you need to calibrate autoscaling parameters before start using. Please go through following blog post
# http://nirmalfdo.blogspot.com/2013/01/scale-up-early-scale-down-slowly.html
max_requests_per_second 1;
alarming_upper_rate 0.1;
alarming_lower_rate 0.9;
scale_down_factor 0.25;
rounds_to_average 1;
message_expiry_time 60000;
}
esb {
domains{
wso2.esb.domain {
tenant_range *;
group_mgt_port 4500;
min_app_instances 1;
alarming_upper_rate 0.1;
alarming_lower_rate 0.9;
max_requests_per_second 1;
mgt {
hosts mgt.esb.wso2.com;
}
worker {
hosts esb.wso2.com;
}
worker {
hosts esb1.wso2.com;
}
}
}
}
}
Thanks.
回答1:
You cannot auto scale just by changing the configurations in WSO2 ELB. See Auto-Scaling in Load Balancer .
You need to configure cartridges for your preferred IaaS. ELB supports Amazon EC2 and OpenStack. Cartidge is basically an image (for example an AMI in EC2) and ELB can spawn instances from the configured image. In the image, you need to configure how to connect to existing WSO2 product cluster and do other required configurations.
However as I mentioned in other Stack Overflow answer, WSO2 ELB is no longer recommended and it has been discontinued.
We recommend WSO2 Private PaaS if you need an auto-scaling platform with WSO2 products. With WSO2 Private PaaS, You will get most of the frequently used WSO2 products as cartridges.
来源:https://stackoverflow.com/questions/31162981/wso2-elb-2-1-1-not-auto-scaling