IoError: Broken pipe [RayletClient] Failed to disconnect from Raylet

Running Ray 1.8.0 on Ubuntu in conda environment. When .deploy() invoked Ray keeps failing with below error

IoError: Broken pipe [RayletClient] Failed to disconnect from Raylet

Hi @bappctl

Full script, output, and error will be appreciated!

@simon-mo I realized the detached was not set to True and caused the Broken pipe. But I run into below error when I try accessing the endpoint http://127.0.0.1:8000/CRay in the browser. Any config I am doing incorrect? (FYI I am new to Ray)

--------------------------------------------ERROR---------------------------------------------------------------
-ERR wrong number of arguments for ‘get’ command
-NOAUTH Authentication required.
-ERR unknown command User-Agent:, with args beginning with: Mozilla/5.0, (X11;, Ubuntu;, Linux, x86_64;, rv:87.0), Gecko/20100101, Firefox/87.0,
-ERR unknown command Accept:, with args beginning with: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8,
-ERR unknown command Accept-Language:, with args beginning with: en-US,en;q=0.5,
-ERR unknown command Accept-Encoding:, with args beginning with: gzip,, deflate,
-ERR unknown command Connection:, with args beginning with: keep-alive,
-ERR unknown command Upgrade-Insecure-Requests:, with args beginning with: 1,

-------------------------------------------------- CONSOLE message ----running cray.py ---------------------------------

2021-11-18 16:48:51,896 INFO worker.py:822 – Connecting to existing Ray cluster at address: 127.0.0.1:8000
2021-11-18 16:48:52,028 INFO api.py:393 – Connecting to existing Serve instance in namespace ‘serve’.
2021-11-18 16:48:52,034 INFO api.py:240 – Updating deployment ‘CRay’ to version ‘1’. component=serve deployment=CRay
(pid=642291) 2021-11-18 16:48:52,103 INFO backend_state.py:910 – Adding 1 replicas to deployment ‘CRay’. component=serve deployment=CRay
2021-11-18 16:48:52,628 INFO api.py:247 – Deployment ‘CRay:1’ is ready at http://127.0.0.1:8000/CRay. component=serve deployment=CRay

--------------------------------------------------------cray.py----------------------------------------------------
import os
import ray
from ray import serve
ray.init(address=‘auto’, _redis_password=‘xxxxxxxxxxxxxxx’)
serve.start(detached=True,http_options={“host”:“127.0.0.1”})

@serve.deployment(num_replicas=1, version=“1”)
class CRay:
def init(self):
self.count = 0

def call(self, request):
self.count += 1
return {“count”: self.count}

CRay.deploy()

-------------------------------------------------Anaconda Virtual ENV-----------------------------------------
Ubuntu 20.0.4
Python 3.7
Package Version


anyio 3.3.4
asgiref 3.4.1
attrs 21.2.0
brotlipy 0.7.0
certifi 2021.10.8
cffi 1.14.6
charset-normalizer 2.0.4
click 8.0.3
cryptography 35.0.0
Deprecated 1.2.13
fastapi 0.70.0
filelock 3.4.0
grpcio 1.42.0
h11 0.12.0
hiredis 1.1.0
idna 3.1
joblib 1.1.0
jsonschema 4.2.1
msgpack 1.0.2
numpy 1.21.4
pip 21.2.4
protobuf 3.19.1
pycparser 2.20
pydantic 1.8.2
pyOpenSSL 19.1.0
pyrsistent 0.18.0
PySocks 1.7.1
PyYAML 6.0
ray 1.8.0
redis 4.0.1
requests 2.26.0
scikit-learn 1.0.1
scipy 1.7.2
setuptools 58.0.4
six 1.16.0
sniffio 1.2.0
starlette 0.16.0
threadpoolctl 3.0.0
typing_extensions 4.0.0
urllib3 1.25.11
uvicorn 0.15.0
wheel 0.37.0
wrapt 1.13.3

----------------------------STARTED RAY from Terminal---------------------------------------
ray start --head --port=8000

---------------------------Pickle Error-------------------------------------------------
if cray.py run in NON conda virtual environment throws below error.

TypeError: can’t pickle function objects

Upgrading python from 3.7 to 3.8 fixed the issues for ray 1.8.0