UnknownHostException: order-management: Name or service not known
Modified on: Fri, 17 Nov 2023 1:14 PM2023-05-19
Symptoms
Received below error when trying to place an order via API or CP:
Could not invoke endpoint url 'https://order-management:8081/rest/order-management/3c0d0ab8-4466-422b-845c-2471e3af534a/orders' of application instance with UUID '15000493-c7a5-481d-94fd-f47e2a6b6e51'. RESTEASY004655: Unable to invoke request: java.net.UnknownHostException: order-management: Name or service not known: order-management: Name or service not known
Cause
order-management pod is not available or accessible from MN node.
Resolution
Please check if order-management pod is running:
[root@ooamn ~]# kubectl get pod | grep order-management order-management-d4f44d686-mt9fr 1/1 Running 2426 (76m ago) 106d
If it is running, please make sure connection from MN node is available by testing using telnet:
[root@ooamn ~]# telnet order-management 8081 Trying 10.107.1.32... Connected to order-management. Escape character is '^]'.
If kubectl command produce output that is similar as below snippet, it means that your kubernetes cluster is not reachable. Please check and rectifty any issue with kubernetes cluster networking:
[root@ooamn ~]# kubectl get pod Unable to connect to the server: dial tcp 192.168.0.1:6443: i/o timeout
If kubectl command doesn't show any output, you need to deploy order-management pod as per the official documentation here: Deploying Order Management
If you need further assistance of error that is not mentioned above, please contact Cloudblue Technical Support.