FAQs

A list of FAQs for developers by developers

Q3. What are the tools which make development effortless?

A. Jsonformatter.org is a lightweight tool which is quite handy when it comes to working with sending postman requests and putting objects to Kafka topics. Another such site is editor.swagger.io which makes reading/designing APIs a lot easier and understandable. Use Postman to test APIs. Use k9s to work with your Kubernetes clusters.

Q4. Is it necessary to get a new auth token every few hours?

A. Auth tokens come with an expire period after which you will have to refresh it by hitting the oauth2 APIs.

If you donโ€™t want to refresh auth now and again you can port-forward services and get the same result. There are a couple of things to keep in mind though.

  1. As there are many services to port forward, you must not mix up port numbers while port forwarding.

  2. Port forwarding by-passes the zuul api gateway, hence in this case, when accessing a service directly, for a request to be valid, a user has to send the userInfo JSON inside the RequestInfo object.

Sample

"userInfo": {
"id": 24226, 
"uuid": "11b0e02b-0145-4de2-bc42-c97b96264807", 
"userName": "sample_user", 
"roles": [
             {
                 "name": "Citizen", 
                 "code": "CITIZEN"
             }
         ]
}
Q5. What are our options when we get a bad request response in postman?

Answer

You can disconnect the forwarded port and start port forwarding again with recheck on port numbers. If this doesnโ€™t solve the error, in some cases like adding mdms configuration, you can restart the pod to get the desired output.

Q6. I deployed the service in a DIGIT environment. But I am getting a 400 or 500 from Zuul.

Check whether the service is up. Insert appropriate namespace in the commands below.

kubectl describe service -n <namespace>

Check whether the pod is up.

kubectl describe pod -n egov

Check the ingress and make sure the context path is right.

kubectl describe ingress <service name> -n egov

Q7. My service, pod, ingress are all looking good. But I am still getting a ZuulRuntimeException. What do I do?

This could be a forwarding issue from Zuul to services. Restart Zuul and restart your service.

Q8. I made a change to the role action mapping in MDMS. But I am unable to access the APIs. Getting a 403 unauthorized error.

Restart MDMS so it picks up the role action mapping. Also restart the access control service. Access control caches the role action mappings for 15 minutes. Hence a hard restart will force the cache to reset.

Q9. My pod is in CrashLoopBackOff. What do I do?

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.