CloudNativeSDWAN / egress-watcher

Monitor Egress-like resources in Kubernetes and send the information to an SD-WAN controller
Apache License 2.0
7 stars 3 forks source link

SDWAN authentication error when adding a new ServiceEntry? #1

Closed arnatal closed 2 years ago

arnatal commented 2 years ago

I tried adding a new MESH_EXTERNAL ServiceEntry but the service info didn't showed up in the SDWAN. Egress-Watcher pod logs show that there might be some issue with the Egress-Watcher authentication against vManage (see below).

{"level":"info","event-handler":"Create","hosts":["kubecon.cisco.com"],"time":"2022-05-06T10:14:45Z","message":"reconciling service entry..."}
{"level":"info","type":"add","name":"kubecon-demo","hosts":["kubecon.cisco.com"],"time":"2022-05-06T10:14:45Z","message":"received operation request"}
{"level":"info","waiting-duration":"1m0s","time":"2022-05-06T10:14:45Z","message":"starting waiting mode"}
{"level":"info","time":"2022-05-06T10:15:45Z","message":"busy mode activated"}
{"level":"debug","time":"2022-05-06T10:15:45Z","message":"checking authentication..."}
{"level":"error","error":"cannot check token validity: could not perform request: cannot unmarshal error response: invalid character '<' looking for beginning of value","time":"2022-05-06T10:15:46Z","message":"can't check if tokens are still valid: next operations may fail"}
{"level":"info","worker":"adder","names":["kubecon-demo"],"time":"2022-05-06T10:15:46Z","message":"adding custom applications, this may take a while..."}
{"level":"error","error":"could not create custom application with name kubecon-demo: could not unmarshal response body: invalid character '<' looking for beginning of value","time":"2022-05-06T10:15:46Z","message":"error while adding custom applications"}
{"level":"info","time":"2022-05-06T10:15:46Z","message":"back in free mode"} 
asimpleidea commented 2 years ago

Thank you for posting this issue, @arnatal! This happens because of an unexpected body response while checking if the session token is still valid or expired.

I am testing a solution and will create a PR as soon as I know it is working.

asimpleidea commented 2 years ago

Addressed by #24.