magento2.4 – Unable to invoice the order in testing environment

While running it in local I am able to create shipment and invoice. And the same is getting updated in Magento UI as well. But while running it testing environment, we are not able to create invoice. Its giving the following error.

I/O error on POST request for “http://magento-qa.xxxx.com/rest/V1/order/17/invoice”: Connection reset; nested exception is java.net.SocketException: Connection reset”.

Can someone suggest or know what could have gone wrong?

Magento version: 2.4.

PS: magento-qa.xxxx.com is my testing env domine name.