Having the exact same issue on 2.1.5 and 2.1.17. Our last UPS order came through April 15th at 9pm. With no configuration change, it stopped working on April 16th.
You can possibly fix it by changing the gateway url to https rather than http So change
http://www.ups.com/using/services/rave/qcostcgi.cgi
to
https://www.ups.com/using/services/rave/qcostcgi.cgi
This fixed things on my local 2.1.5 instance, but not on my servers. It now gives a slightly better error message:
[2019-04-18 17:26:37] main.DEBUG: array ( 'request' => array ( 'accept_UPS_license_agreement' => 'yes', '10_action' => '4', '13_product' => 'GNDRES', '14_origCountry' => 'US', '15_origPostal' => '28146', 'origCity' => 'Salisbury', '19_destPostal' => '28145', '22_destCountry' => 'US', '23_weight' => 8, '47_rate_chart' => 'Regular Daily Pickup', '48_container' => '00', '49_residential' => '01', 'weight_std' => 'lbs', ), 'result' => array ( 'error' => 'Unable to Connect to ssl://www.ups.com:443. Error #0: ', 'code' => 0, ), ) {"is_exception":false} []
EDIT:
I ended up having to edit /public_html/vendor/magento/zendframework1/library/Zend/Http/Client.php and change the adapter from Zend_Http_Client_Adapter_Socket to Zend_Http_Client_Adapter_Curl and it now works for me. I don't feel good about this solution. Can anyone tell me what else I might be screwing up?
protected $config = array( 'maxredirects' => 5, 'strictredirects' => false, 'useragent' => 'Zend_Http_Client', 'timeout' => 10, 'adapter' => 'Zend_Http_Client_Adapter_Curl', 'httpversion' => self::HTTP_1, 'keepalive' => false, 'storeresponse' => true, 'strict' => true, 'output_stream' => false, 'encodecookies' => true, 'rfc3986_strict' => false );