#5607·BentoML

bug: [serve] `serve-grpc` failed: <class '_bentoml_sdk.service.factory.Service'> type doesn't support gRPC serving

Author: zxpshadow-progCreated May 11, 2026Updated Aug 26, 2026
Labelsbug

Describe the bug

bentoml 1.4.39

1.run http, it is ok. bentoml serve ./xinfra/supervisor/service.py:Supervisor --port 9099 output: 2026-05-11T09:25:47+0800 [INFO] [cli] Starting production HTTP BentoServer from "./xinfra/supervisor/service.py:Supervisor" listening on http://localhost:9099 (Press CTRL+C to quit) 2026-05-11T09:25:48+0800 [INFO] [entry_service:Supervisor:1] Service Supervisor initialized 2026-05-11T09:26:08+0800 [INFO] [entry_service:Supervisor:1] 127.0.0.1:61898 (scheme=http,method=GET,path=/,type=,length=) (status=200,type=text/html; charset=utf-8,length=2945) 330.566ms (trace=53e4c15be8bbe08a7c76051676e5a9ab,span=2a5d06d5d1994513,sampled=0,service.name=Supervisor)

2.run grpc fail bentoml serve-grpc ./xinfra/supervisor/service.py:Supervisor --port 9098
Error: [serve] serve-grpc failed: <class '_bentoml_sdk.service.factory.Service'> type doesn't support gRPC serving

Could you help me with running gRPC? Thank you very much!

To reproduce

No response

Expected behavior

No response

Environment

bentoml 1.4.39 python 3.12 win11 uv