Splunk AppDynamics

Analytic service is unavailable

deepanshu_arya
Engager

Hi,

We have installed the AppD 4.4 & event service and EUM on different hosts, now we are getting the error that analytic service is unavailable status code error 401.

Please help.

Labels (1)
0 Karma
1 Solution

Mohammed_Rayan
Contributor

Deepanshu,

You need to make sure the keys are matching 

Refer the below doc link

https://docs.appdynamics.com/display/PRO44/Connect+to+the+Events+Service#ConnecttotheEventsService-e...

Follow the below steps to fix this.

Copy the value of “appdynamics.es.eum.key" from admin console controller's settings.
 
Then make sure the copied value is set in the below properties file. if not, Please update the same and restart events-service followed by eum server
 
<EUM_HOME>/bin/eum.properties -> analytics.accountAccessKey
<ES_HOME>/conf/events-service-api-store .properties ---> ad.accountmanager.key.eum
 
Bottom line is that the key must match at all three places
 
analytics.accountAccessKey == ad.accountmanager.key.eum ==appdynamics.es.eum.key
 
 
Regards,
Mohammed Rayan
 
 
 
analytics.accountAccessKey == ad.accountmanager.key.eum ==appdynamics.es.eum.key

View solution in original post

Nour_Alghamdi
Explorer

Hi team,

I have the same issue and I make sure all keys are correct

0 Karma

iamryan
Community Manager
Community Manager

Hi @Abdulrahman.Kazamel,

Thanks for sharing your solution!

Abdulrahman_Ka2
Engager

I got the same issue and after restarting the whole environment it didn't work,
the issue in my case was the EUM database not working properly.

the error was 

Analytics service unavailable: Host 'nginx:9080' returned code 401 with message 'Status code: [401], Message: HTTP 401 Unauthorized'. Please contact support if this error persists.

FYI: I'm sure it was working well but I was testing stoping EUM and going in the upgrade process before this case.

my solution is 

ps -ef | grep -i eum | grep -v grep
kill -9 eum-PID
ps -ef | grep -i database | grep -v grep
kill -9 eum-database-PID
cd /opt/appdynamics/eum/mysql
bin/mysqld_safe --defaults-file=/opt/appdynamics/eum/mysql/db.cnf
cd /opt/appdynamics/eum/eum-processor
./bin/eum.sh start

You need to make sure no errors go out from the eum start command and run ps command again to make sure the process is running well and sure  analytics.accountAccessKey == ad.accountmanager.key.eum ==appdynamics.es.eum.key as Rayan has mentioned above

also, this could happen if the event service is not in a healthy state 
in this scenario, you should go 

cd /opt/appdynamics/platform/platform-admin/
bin/platform-admin.sh show-events-service-health  
#in case it's not healthy but every node is running
curl http://localhost:9200/_cat/shards?v
curl http://localhost:9200/_cat/indices?v

#Note to make sure port 9200 is enabled in each event service node by enabling it from each node
vi /opt/appdynamics/platform/product/events-service/processor/conf/events-service-api-store.properties
ad.es.node.http.enabled=true

curl http://localhost:9081/healthcheck?pretty=true
# to grep Un Assingned indexes
curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED



#Manually assign each node by
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ 
"commands" : [ { 
"allocate" : { 
"index" : "manually-add-each-index-name", 
"shard" : 0, 
"node" : "event-service-ip", 
"allow_primary" : true 
} 
}
]}'

 

Mohammed_Rayan
Contributor

Deepanshu,

You need to make sure the keys are matching 

Refer the below doc link

https://docs.appdynamics.com/display/PRO44/Connect+to+the+Events+Service#ConnecttotheEventsService-e...

Follow the below steps to fix this.

Copy the value of “appdynamics.es.eum.key" from admin console controller's settings.
 
Then make sure the copied value is set in the below properties file. if not, Please update the same and restart events-service followed by eum server
 
<EUM_HOME>/bin/eum.properties -> analytics.accountAccessKey
<ES_HOME>/conf/events-service-api-store .properties ---> ad.accountmanager.key.eum
 
Bottom line is that the key must match at all three places
 
analytics.accountAccessKey == ad.accountmanager.key.eum ==appdynamics.es.eum.key
 
 
Regards,
Mohammed Rayan
 
 
 
analytics.accountAccessKey == ad.accountmanager.key.eum ==appdynamics.es.eum.key

Febriyanto_Eko_
New Member

Hi, I am experiencing this 401 issue.
I have verified that my key matches in all three places & verified that there are no trailing/whitespace in the key.
I have controller & EUM server on the same node and Event Service on different node.
In eum-processor.log I get an error "com.appdynamics.eum.rest.exception.ApiException: Resource Timing is not enabled for..."

The software version that I use:
Controller Version: 4.5.11.2
Event Service Version: 4.5.2.20201
EUM Server Version: 4.5.12.28810

Any ideas to fix this problem?
Thank you.

0 Karma

Marco_Antonio_M
Explorer

Hi.

I have the same problems with the EUM, Analytics on-premise install.

First, I received 401 errors, and in this week, the controller and the events servers were upgraded to the las version 4.5.15, also the EUM... but now the error:

com.appdynamics.eum.rest.exception.ApiException: Resource Timing is not enabled for accountName XXX

happen's.

Can you solve this and say me what's happening?

Note: check the coincidence of the license as you recommended, and is the same in the 3 places.

0 Karma

millerep
Contributor

When you did your upgrade, did you re-provision the license.lic file on your EUM server seperately from your Controller, as per this documentation? https://docs.appdynamics.com/display/PRO45/Provision+EUM+Licenses

Marco_Antonio_M
Explorer

Yes,

The aprovision license was realized again.

Certainly, while I do test EUM with a system, this working in almost metrics, not all work showing that errors.

In a widgets like Resource Performance, I see another error (image attached)

"Event type does not exist for account ..."

image.jpeg

0 Karma

millerep
Contributor

Interesting. Could it be an error with the eum_db mySQL database? What does the server.log say? I see the Internal Error in the top-right hand corner. You can usually click the cog wheel in the top right and then click on "Export Controller logs" and just unzip and pull out the server.log account.

0 Karma

Marco_Antonio_M
Explorer

When "Internal Server Error" shows, in EUM logs write:

com.appdynamics.eum.rest.exception.ApiException: Resource Timing is not enabled for accountName XXX

I Believe that the other error in widget, is not related... Is very strange

0 Karma

millerep
Contributor

Can you check server.log, not the EUM log?

0 Karma

iamryan
Community Manager
Community Manager

Hi @Febriyanto Eko.Prasetya  did you try restarting the the controller and components like @Anonymous  did?

0 Karma

Febriyanto_Eko_
New Member
Yes, but that doesn’t help.
0 Karma

iamryan
Community Manager
Community Manager

Thanks for trying that out. 

@Mohammed.Rayan do you think you can jump back in here and help @Febriyanto Eko.Prasetya out please. 

0 Karma

Andy_Gann
New Member

I am experiencing the same issue.  I have verified that my key matches in all three places.

Here is a screen cap of the error I am seeing in browser rum:

0 Karma

Mike_Rizek1
Engager

https://docs.appdynamics.com/display/PRO45/Connect+to+the+Events+Service

in my on-premise case, In admin.jsp - I changed the value from analytics.api.appdynamics.com to myproxyiptoeventsservice:9080

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I'm have this issue as well. The key matches in all three places but still got 401 error. How do you resolve this?

0 Karma

Mohammed_Rayan
Contributor

Hendra,

Can you check if there's any trailing/whitespace exist in any of the properties file.

I would suggest you to delete the value and type it manually and then verify

Make the changes to events-service first and restart it followed by eum server

Hope this helps

Regards,

Mohammed Rayan

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
I've solved the issue by restarting all appdynamics controller and components.

Thanks
Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...