在http://127.0.0.1:8000上提供服务:WinError 10013:端口被其他进程使用

问题描述 投票:0回答:1

尝试获取文档页面时出错:

[I 230831 20:02:57 server:335] Serving on http://127.0.0.1:8000
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Scripts\sphinx-autobuild.exe\__main__.py", line 7, in <module>
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\sphinx_autobuild\cli.py", line 194, in main
    server.serve(port=portn, host=args.host, root=outdir, open_url_delay=args.delay)
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\livereload\server.py", line 339, in serve
    self.application(
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\livereload\server.py", line 291, in application
    app.listen(port, address=host)
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\tornado\web.py", line 2134, in listen
    server.listen(
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\tornado\tcpserver.py", line 183, in listen
    sockets = bind_sockets(
              ^^^^^^^^^^^^^
  File "C:\Users\rfnei\AppData\Local\Programs\Python\Python311\Lib\site-packages\tornado\netutil.py", line 162, in bind_sockets
    sock.bind(sockaddr)
PermissionError: [WinError 10013] An attempt was made to access a socket in a method prohibited by access rights

端口用户:

F:\Blender_build\blender-manual>netstat -o -n -a | findstr 8000
  TCP    0.0.0.0:8000           0.0.0.0:0              LISTENING       4552
  TCP    [::]:8000              [::]:0                 LISTENING       4552

该用户的姓名:

httpd.exe                     4552 Services                   0     4 836 KB

我真的不确定是否可以杀死这个端口用户。

我可以为文档服务器提供另一个端口 ID 以避免这种冲突吗?

我想在没有任何冲突和后续问题的情况下启动文档服务器/页面。 我尝试探索可能的解决方案,检查启动标志。但没有找到绕过该问题的信息。

Please use `make target' where target is one of
  html        to make standalone HTML files
  dirhtml     to make HTML files named index.html in directories
  singlehtml  to make a single large HTML file
  pickle      to make pickle files
  json        to make JSON files
  htmlhelp    to make HTML files and an HTML help project
  qthelp      to make HTML files and a qthelp project
  devhelp     to make HTML files and a Devhelp project
  epub        to make an epub
  latex       to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  text        to make text files
  man         to make manual pages
  texinfo     to make Texinfo files
  gettext     to make PO message catalogs
  changes     to make an overview of all changed/added/deprecated items
  xml         to make Docutils-native XML files
  pseudoxml   to make pseudoxml-XML files for display purposes
  linkcheck   to check all external links for integrity
  doctest     to run all doctests embedded in the documentation (if enabled)
  coverage    to run coverage check of the documentation (if enabled)
  clean       to remove everything in the build directory

启动命令/

set SOURCEDIR=.\manual
set BUILDDIR=build
if "%BF_LANG%" == "" set BF_LANG=en
set SPHINXOPTS=-j auto -D language=%BF_LANG%
    sphinx-autobuild --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O%
python-sphinx
1个回答
0
投票

这可以通过使用 sphinx-autobuild 的

--port
选项来解决。

sphinx-autobuild --port 8999 --open-browser --delay 0 "%SOURCEDIR%" "%BUILDDIR%\html" %SPHINXOPTS% %O%

请参阅 https://github.com/executablebooks/sphinx-autobuild#command-line-options

© www.soinside.com 2019 - 2024. All rights reserved.