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

Dynakube failed with Error: error making post request to dynatrace api:

mohan1
Frequent Guest

We trying to deploy Dynatrace in our Azure OpenShift Platform (ARO). 

Based on https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup\ ": read tcp XXX.XXX.XX.XX:46776->XX.XXX.XX.XX:443: read: connection reset by peer

Then we added proxy in Dynakube,
Now getting the error:

{"level":"info","ts":"2023-05-04T15:32:30.459Z","logger":"dynakube-controller","msg":"problem with token detected","dynakube":"dynakube","token":"APIToken","msg":"error when querying token on secret dynatrace:aro-centralus-dev-aro-nebula: error making post request to dynatrace api: Post \"https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup\ ": Not Found"}
 

And, tried troubleshooting command,

➤ oc exec deploy/dynatrace-operator -n dynatrace -- dynatrace-operator troubleshoot
{"level":"info","ts":"2023-05-04T15:15:20.503Z","logger":"dynatrace-operator-version","msg":"dynatrace-operator","version":"v0.9.1","gitCommit":"d48183aa96b0aa430b88246d511600d4ed1de0f9","buildDate":"2022-10-19T11:20:38+00:00","goVersion":"go1.19.1","platform":"linux/amd64"}
I0504 15:15:21.605129 58 request.go:682] Waited for 1.004504421s due to client-side throttling, not priority and fairness, request: GET:https://{environmentid}.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest/metainfo?bitness=64&flavor=default&arch=x86 ": Not Found}
[dtcluster ] × tenant isn't accessible

 

Please suggest what we missing here, 

1. Network issue - we tested we able to connect https://{environmentid}.live.dynatrace.com from  our Cluster.

2. Token issue: we tested curl command - able to connect https://{environmentid}.live.dynatrace.com with  token.

 

Thanks 

Mohan

3 REPLIES 3

DanielS
DynaMight Guru
DynaMight Guru

Hi @mohan1 can you check if the token has the following scopes assigned:

DanielS_0-1683748171833.png

 

The true delight is in the finding out rather than in the knowing.

Thanks Daniels.

We created the token API v2 scope with following scope: 

  1. Access problem and event feed, metrics, and topology (DataExport)
  2. PaaS integration - Installer download (InstallerDownload)
  3. Create ActiveGate tokens1 (activeGateTokenManagement.create)
  4. Read entities2 (entities.read)
  5. Read settings2 (settings.read)
  6. Write settings2 (settings.write)

Is the Dynakube using API v2 scope or v1?

 

 /api/v1/tokens/lookup'  - is this using API or v2 v1 scope?

error making post request to dynatrace api: Post "https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup": Not Found

Tried to curl

curl --request GET --url https://{environmentid}.live.dynatrace.com/api/v1/tokens/lookup --header 'Authorization: Api-Token XXXXXXXXXX' -v -k

We go this response: 

{"error":{"code":403,"message":"Token is missing required scope. Use one of: TenantTokenManagement (Token management)"}}

TenantTokenManagement <-- is related to API v1 scope? 

Are we missing any scope to create Token?

Please suggest.

 

Hi @mohan1, did you manage to solve your issue? 

The only constant is change. Finding ways for great things to happen!

Featured Posts