A list of FAQs for developers by developers
A. Git - 2.38.1 (latest version)
Java - JDK 8
Intellij - 2022.2.3(latest version)
Kafka - 3.2.0(latest version)
Postman - v9.4(latest version)
Kubectl - 1.25.3(latest version)
Postgres - v10
A. Intellij, Eclipse, VS Code or any other preferred IDE can be used. Make sure that it supports Java development and install the Lombok plugin for the IDE.
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.
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.
As there are many services to port forward, you must not mix up port numbers while port forwarding.
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"
}
]
}
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.
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
This could be a forwarding issue from Zuul to services. Restart Zuul and restart your service.
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.
\