Zend certified PHP/Magento developer

Could not connect to host Magento2

I have configured the FedEx Shipping Method in a Sandbox mode for my Magento2 site. I have checked all the details are fine and confirmed by using Postman. Now when I try to check the rates from the frontend I am not getting any rates but getting below error in the log file.

2021-10-26 16:33:27] main.CRITICAL: Could not connect to host {“exception”:”[object] (SoapFault(code: 0): Could not connect to host at /var/www/vendor/magento/module-fedex/Model/Carrier.php:520)”} []