生产环境网站报Bad Request错误,遇ValueError: Unknown endpoint type: 'fd'求助
生产环境网站出现「Bad Request」无法访问,报错
Unknown endpoint type: 'fd' 今日上午,我的生产环境网站突然出现「Bad Request」错误导致无法访问。此前网站运行正常,且我未做任何可能引发该问题的变更。
以下是asgi.log文件中的报错堆栈信息:
Traceback (most recent call last): File "/home/raphaeluziel/raphi/venv/bin/daphne", line 8, in <module> sys.exit(CommandLineInterface.entrypoint()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/cli.py", line 171, in entrypoint cls().run(sys.argv[1:]) File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/cli.py", line 291, in run self.server.run() File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/server.py", line 130, in run ep = serverFromString(reactor, str(socket_description)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1874, in serverFromString nameOrPlugin, args, kw = _parseServer(description, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1794, in _parseServer plugin = _matchPluginToPrefix( ^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1809, in _matchPluginToPrefix raise ValueError(f"Unknown endpoint type: '{endpointType}'") ValueError: Unknown endpoint type: 'fd' Traceback (most recent call last): File "/home/raphaeluziel/raphi/venv/bin/daphne", line 8, in <module> sys.exit(CommandLineInterface.entrypoint()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/cli.py", line 171, in entrypoint cls().run(sys.argv[1:]) File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/cli.py", line 291, in run self.server.run() File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/daphne/server.py", line 130, in run ep = serverFromString(reactor, str(socket_description)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1874, in serverFromString nameOrPlugin, args, kw = _parseServer(description, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1794, in _parseServer plugin = _matchPluginToPrefix( ^^^^^^^^^^^^^^^^^^^^^ File "/home/raphaeluziel/raphi/venv/lib/python3.12/site-packages/twisted/internet/endpoints.py", line 1809, in _matchPluginToPrefix raise ValueError(f"Unknown endpoint type: '{endpointType}'") ValueError: Unknown endpoint type: 'fd'
我已尝试以下操作:
- 卸载
requirements.txt中所有依赖后重新安装,并重启服务器 - 向
ALLOWED_HOSTS添加'*'并设置DEBUG=True,测试无效后已恢复原有配置 - 重启服务器
本地环境无论设置DEBUG=True还是DEBUG=False,网站均运行正常。若需要更多信息请告知。
内容的提问来源于stack exchange,提问作者raphael
相关产品推荐
相关产品推荐

