amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

The primary container for production variant AllTraffic did not pass the ping health check.

Open nmakarun opened this issue 6 years ago • 4 comments

I am trying to deploy a Multi Model endpoint, I am following "https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/multi_model_bring_your_own/multi_model_endpoint_bring_your_own.ipynb" as my reference.

Everything is successful until "Create Endpoint COnfiguration" step,

When I am trying to create endpoint, I am facing the error"The primary container for production variant AllTraffic did not pass the ping health check."

I checked the cloud watch logs, which are below Processing /opt/ml/code Building wheels for collected packages: None Building wheel for None (setup.py): started Building wheel for None (setup.py): finished with status 'done' Created wheel for None: filename=None-1.0.0-py2.py3-none-any.whl size=3775 sha256=XXXXXX stored in directory:XXXXXXXX Successfully built None Installing collected packages: None Successfully installed None-1.0.0

Traceback (most recent call last): File "/miniconda3/bin/serve", line 8, in <module> sys.exit(main()) File "/miniconda3/lib/python3.7/site-packages/sagemaker_sklearn_container/serving.py", line 107, in main modules.import_module(serving_env.module_dir, serving_env.module_name) File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_modules.py", line 274, in import_module six.reraise(_errors.ImportModuleError, _errors.ImportModuleError(e), sys.exc_info()[2]) File "/miniconda3/lib/python3.7/site-packages/six.py", line 695, in reraise raise value.with_traceback(tb) File "/miniconda3/lib/python3.7/site-packages/sagemaker_containers/_modules.py", line 269, in import_module module = importlib.import_module(name) File "/miniconda3/lib/python3.7/importlib/__init__.py", line 118, in import_module if name.startswith('.'):

nmakarun avatar Jan 20 '20 13:01 nmakarun

I am also encountering this issue, deploying code both locally and using sagemaker notebooks. Any luck solving this?

nickfrollo avatar Feb 05 '20 09:02 nickfrollo

No Luck Yet, we the problem is with the container. Probably we need to use container with relevant environment variables or create a new one and try.

nmakarun avatar Feb 05 '20 10:02 nmakarun

I was able to run the "https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/multi_model_bring_your_own/multi_model_endpoint_bring_your_own.ipynb" notebook successfully.

The error message "The primary container for production variant AllTraffic did not pass the ping health check." indicates that there is an issue within the model container. Have you made modifications to the container in the notebook? If you are importing new modules in model_handler.py, you may need to install them in the Dockerfile.

fm1ch4 avatar Feb 25 '20 20:02 fm1ch4

hi, could you re-open this incident?

I have tried will larger instances, but unable to get through. also try adding gunicorn and nginx to requirements.txt as mentioned in other blogs.

Error Message: 2022/02/20 13:18:25 [crit] 22#22: *213 connect() to unix:/tmp/gunicorn.sock failed (2: No such file or directory) while connecting to upstream, client: 10.32.0.2, server: , request: "GET /ping HTTP/1.1", upstream: "http://unix:/tmp/gunicorn.sock:/ping", host: "model.aws.local:8080"

gthmml avatar Feb 20 '22 13:02 gthmml