0

Today, I got an error when I wanted to register a new model on Azure work space. This error wasn't happening before! The only change that I have is the model itself but the code is the same:

from azureml.core import Workspace
from azureml.core.compute import AksCompute, ComputeTarget
from azureml.core.webservice import Webservice, AksWebservice
from azureml.core.image import Image
from azureml.core.model import Model
import azureml.core
from azureml.core.workspace import Workspace
from azureml.core.model import Model
ws = Workspace.from_config()
model_reg = Model.register(model_path = "./outputs/model_final",
                       model_name = "ModelX",
                       tags = {'area': "XXX", 'type': "deep"},
                       description = "Model 1",
                       workspace = ws)

And here is the error that I got:

raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='xxx
.blob.core.windows.net', port=443): Max retries exceeded with url: /azureml/Loca
lUpload/190530T093046-fc5a89ca/tfModel.tar.gz?sv=2018-03-28&sr=b&sig=9FFnsaefR9w
PkR%2FvsMlnQYrA2wlnJG7Cu%2BP9%2FePPZEY%3D&st=2019-05-30T08%3A20%3A46Z&se=2019-05
-31T08%3A30%3A46Z&sp=rcw&comp=block&blockid=TURBd01EQXdNREF3TURBd01EQXdNREF3TURB
d01EQXdNREF3TURBd01EQSUzRA%3D%3D (Caused by SSLError(SSLError("bad handshake: Er
ror([('SSL routines', 'tls_process_server_certificate', 'certificate verify fail
ed')],)",),))

I tried to update all the python packages and even creating a new conda env with fresh installation of all packages, but still getting this error.

Any help or similar experience?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Mohammad
  • 1,006
  • 2
  • 15
  • 29

1 Answers1

0

Just as reference, there may be two reasons cause this issue.

  1. Network issue. The network environment for running this Python script changed. May now the script run through a proxy like Fiddler which not support or enable SSL/TLS feature, or some IP restrictions in your network cause it like the SO thread SSL Certificate error while doing a request via python.

  2. The target site upgraded SSL version. You can follow the SO thread answer Django paypalrestsdk error - OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')] to check.

Hope it helps.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • I tries to run openssl command and I got an error: SSL handshake has read 5716 bytes and written 474 bytes Verification error: unable to get local issuer certificate, any suggestion? – Mohammad May 31 '19 at 07:20