sglang icon indicating copy to clipboard operation
sglang copied to clipboard

HTTP Error 403: Forbidden

Open 7flash opened this issue 4 months ago • 0 comments

I have launched sglang backend on runpod, and when I open /get_model_info endpoint in browser it works, but when I try it locally it throws following error

set_default_backend(RuntimeEndpoint(os.getenv("SGLANG_URL")))
Traceback (most recent call last):
  File "/Users/gur/Documents/feb27/main.py", line 58, in <module>
    set_default_backend(RuntimeEndpoint(os.getenv("SGLANG_URL")))
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/site-packages/sglang/backend/runtime_endpoint.py", line 22, in __init__
    res = http_request(
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/site-packages/sglang/utils.py", line 110, in http_request
    resp = urllib.request.urlopen(req, data=data)
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Users/gur/miniconda3/envs/feb27/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

Upd: it neither works on server when I use its full url with "https", but again it works if I use "http://localhost"

7flash avatar Mar 03 '24 11:03 7flash