cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Error making post request to Dynatrace API: Post"

kwatatsh
Frequent Guest

I'm trying to setup Dynatrace for my EKS Fargate, all 3 Dyntrace pods are in running state, but when I try to apply the OneAgent manifest and describe Dynakube, I notice this error. Does anyone know how to fix this please?

 

Last Transition Time:  2023-05-24T19:32:56Z
    Message:               error making post request to dynatrace api: Post "https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup": read tcp 10.xx.xxx.xxx:55736->34.xx.5.xxx.28:443: read: connection reset by peer
    Reason:                TokenError
    Status:                False
    Type:                  Tokens
  Dynatrace API:
    Last Token Scope Request:  2023-05-24T19:32:56Z
  One Agent:
  Phase:  Error
  Synthetic:

13 REPLIES 13

mark_bley
Dynatrace Champion
Dynatrace Champion

Looks like the token lookup is failing, it is checking the token for necessary permissions.

You can try this check manually with this call

curl -X 'POST' \
  'https://{your_endpoint}/api/v2/apiTokens/lookup' \
  -H 'accept: application/json; charset=utf-8' \
  -H 'Authorization: Api-Token dt0c01.5VXCARPRP52BZNJVBUDSMQA5...' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
  "token": "dt0c01.5VXCARPRP52BZNJVBUDSMQA5..."
}'

Check for necessary permissions here

We are good from token perspective, it has all necessary permissions but somehow it still get failed 

mark_bley
Dynatrace Champion
Dynatrace Champion

Please try following steps and check for any errors in the output.

Network zones.PNGIAG.PNG

Is it normal to not have OneAgent here? as you can in my network zone i have 1 ActiveGate but not OneAgent.

I'm trying to set up dynatrace for eks cluster with fargate

mark_bley
Dynatrace Champion
Dynatrace Champion

If token check fails there will be some communication issues, please check troubleshoot output command.

PeterR
Helper

Open https://{environmentid}.live.dynatrace.com/rest-api-doc/  Maybe that makes it easier to test API calls and observe the output? It's sort of swagger

PeterR
Helper

What deployment method did you use? We use Argo with to deploy the dynatrace operator (helm chart) and a self made helm chart for the dynakube.yaml custom object. This should autoconfigure at least 1 Activegate and for each node there should be a oneagent.

I do have Argocd but i didnt use it for dynatrace manifests deployment. Could you please share all your dynatrace manifests to be deployed with Argocd?

PeterR
Helper

Yes; I can share some info in a few days I think

 

PeterR
Helper

I have shared some details with manifests to give you an impression how to do it. 

Thanks

mohan1
Frequent Guest

Hi kwatatsh

 

How you fixed the "https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup": read tcp 10.xx.xxx.xxx:55736->34.xx.5.xxx.28:443: read: connection reset by peer" error. 

 

We also having same issue. 

Could you suggest pls

You have to set a proxy for your dynakube (ref applicationMonitoring.yaml)

Just uncomment proxy and skipCertCheck

proxy:
value: http://<put your proxy here>:port 

and set

skipCertCheck: true

 

Featured Posts