Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

Knowledge Base

What should I do when the EUM Server fails to start due to unassigned shards?


EUM Server will fail to start if the sync between EUM and Events Service or Analytics Server fails during the startup process.


Users should check the EUM Server and Events Service logs for the following error messages:


EUM Server log snippet

------start synchronize eum acct to analytics acct!---------
24 Mar 2017 11:25:50.112 +0100  main                  AD.AnalyticsAccountManage  INFO    ************** Starting Registration of Analytics Account for EUM account="xyz" **************
24 Mar 2017 11:25:50.476 +0100  main                  AD.AnalyticsAccountManage  ERROR   
 |    CreateAccount : account="xyz", Error Code [500], Exception [RestException(statusCode=500, code=Unexpected.Exception, HttpResponseProxy{HTTP/1.1 500 Internal Server Error [Date: Fri, 24 Mar 2017 10:25:50 GMT, X-Content-Security-Policy: default-src 'self', X-XSS-Protection: 0, X-Content-Type-Options: nosniff, Frame-Options: DENY, X-Frame-Options: DENY, Content-Type: application/json, Transfer-Encoding: chunked] ResponseEntityProxy{[Content-Type: application/json,Chunked: true]}}
24 Mar 2017 11:25:50.551 +0100  main                  AD.AnalyticsAccountManage  ERROR   
 |    failed bulk updating BrowserRecord
 |    java.lang.RuntimeException: bulk update event type=BrowserRecord failed!!!  url=http:/xyz:9080/v2/events/BrowserRecord/_bulk, key=...
 |    {"statusCode":500,"code":"Unexpected.Exception",

 Events Service logs:

[2017-03-24T11:12:59,937+01:00]  [INFO ]  [dw-83 - POST /v1/account]  [c.a.a.p.a.resource.AccountResource]  Account Service Request: [POST v1/account] - request [[{"accountName":"customer1""accessKey":"REDACTED","expirationDate":"2017-05-20T23:59Z","eumAccountName":"XYZ","licensingConfigurations":[]}]]
[2017-03-24T11:12:59,941+01:00]  [ERROR]  [dw-83 - POST /v1/account]  [c.a.a.p.a.ElasticsearchAccountManager]  Error occurred while upserting account configuration for accounts [customer1] Failed to find accounts [customer1]



Review the output of the following health check commands to find if the shards are in an unassigned state.


curl http://<events_service_machine>:9081/healthcheck?pretty=true
curl http://<events_service_machine>:9200/_cat/shards?v
curl http://<events_service_machine>:9200/_cat/indices?v
curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED


Output from the above health check commands:


"events-service-api-store / elasticsearch-singlenode-module" : {
    "healthy" : false,
    "message" : "Current [appdynamics-events-service-cluster] cluster state: [RED], data nodes: [1], nodes: [1], active shards: [3], relocating shards: [0], initializing shards: [0], unassigned shards: [12], timed out: [false]"

curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED

appdynamics_meters_v2                0 p UNASSIGNED CLUSTER_RECOVERED 
appdynamics_meters_v2                1 p UNASSIGNED CLUSTER_RECOVERED 
appdynamics_api_keys_v1              0 p UNASSIGNED CLUSTER_RECOVERED 
appdynamics_api_keys_v1              1 p UNASSIGNED CLUSTER_RECOVERED 
appdynamics_accounts                 0 p UNASSIGNED CLUSTER_RECOVERED 
appdynamics_accounts                 1 p UNASSIGNED CLUSTER_RECOVERED 
event_type_metadata                  0 p UNASSIGNED CLUSTER_RECOVERED 
event_type_metadata                  1 p UNASSIGNED CLUSTER_RECOVERED 
event_type_extracted_fields          0 p UNASSIGNED CLUSTER_RECOVERED 
event_type_extracted_fields          1 p UNASSIGNED CLUSTER_RECOVERED 
event_type_metadata_hidden_fields_v1 0 p UNASSIGNED CLUSTER_RECOVERED 
event_type_metadata_hidden_fields_v1 1 p UNASSIGNED CLUSTER_RECOVERED 


Check the events-service-api-store.log file (found in <Events Service home directory>/logs) for an error message that includes: Failed to execute phase [query], all shards failed. 


[2017-03-24T10:33:00,445+01:00]  [ERROR]  [dw-83 - POST /v1/account]  [c.a.a.p.a.ElasticsearchAccountManager]  Error occurred while upserting account configuration for accounts [] Failed to find accounts ]
at ~[analytics-processor.jar:na]
at ~[analytics-processor.jar:na]
at ~[analytics-processor.jar:na]

Caused by: Failed to execute phase [query], all shards failed
at$BaseAsyncAction.onFirstPhaseResult( ~[elasticsearch-1.7.3.jar:na]
at$BaseAsyncAction.start( ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at org.elasticsearch.client.node.NodeClient.execute( ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at ~[elasticsearch-1.7.3.jar:na]
at org.elasticsearch.action.ActionRequestBuilder.execute( ~[elasticsearch-1.7.3.jar:na]
at org.elasticsearch.action.ActionRequestBuilder.execute( ~[elasticsearch-1.7.3.jar:na]
at ~[analytics-processor.jar:na]
at ~[analytics-processor.jar:na]
... 54 common frames omitted


1. Manually allocate the unassigned shards using the reroute API.


In the following example, there are 12 unassigned shards so each shard must be separately allocated.


curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ 
"commands" : [ { 
"allocate" : { 
"index" : "appdynamics_meters_v2", 
"shard" : 1, 
"node" : "node-12345798-7867-4ea1-b546-557a6bc546afg", 
"allow_primary" : true 


2. Verify if the cluster health state is now a green state using the following curl commands. 


curl http://<events_service_machine>:9081/healthcheck?pretty=true
curl http://<events_service_machine>:9200/_cat/shards?v
curl http://<events_service_machine>:9200/_cat/indices?v


 3. Start the EUM Server to sync with the Events Service or Analytics Server.

Version history
Last update:
‎09-05-2018 04:20 PM
Updated by:
Labels (1)
By replying you agree to the Terms and Conditions of the AppDynamics Community.