TCPServer错误:地址已在使用中

编程入门 行业动态 更新时间:2024-10-27 06:34:11
本文介绍了TCPServer错误:地址已在使用中-bind(2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Jekyll在几周前对我来说还算不错,但现在突然出现以下错误:

Jekyll was working fine for me few weeks back but now all of a sudden it gives me the following error:

TCPServer Error: Address already in use - bind(2) INFO WEBrick::HTTPServer#start: pid=7300 port=4000 % lsof -i :4000 <fetches nothing>

即使端口上没有任何运行.详细信息如下:

Even though nothing is running on the port. Below are the details:

% jekyll --version Jekyll 0.11.2 % where jekyll /home/bhaarat/.rvm/gems/ruby-1.9.2-p290/bin/jekyll /usr/bin/jekyll % ruby --version ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] % rvm --version rvm 1.10.0

这是输出

% jekyll --server Configuration from /home/bhaarat/blog/omnipresent.github/_config.yml Auto-regenerating enabled: /home/bhaarat/blog/omnipresent.github -> /home/bhaarat/blog/omnipresent.github/_site [2012-04-21 13:46:40] regeneration: 38 files changed [2012-04-21 13:46:40] INFO WEBrick 1.3.1 [2012-04-21 13:46:40] INFO ruby 1.9.2 (2011-07-09) [i686-linux] [2012-04-21 13:46:40] WARN TCPServer Error: Address already in use - bind(2) [2012-04-21 13:46:40] INFO WEBrick::HTTPServer#start: pid=7382 port=4000

我知道地址未被使用,jekyll可能由于其他原因而中断,但引发了该错误.我有什么选择?我也尝试过重新安装.

I know the address isn't in use and jekyll is probably breaking for some other reason but throwing that error. What are my options? I've tried re-installing as well.

推荐答案

在终端中键入以下内容以找出使用3000端口的进程的PID:

Type this in your terminal to find out the PID of the process that's using the 3000 port:

$ lsof -wni tcp:3000

然后,使用PID列中的数字杀死该进程:

Then, use the number in the PID column to kill the process:

$ kill -9 PID

更多推荐

TCPServer错误:地址已在使用中

本文发布于:2023-08-07 03:32:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1316725.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:已在   错误   地址   TCPServer

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!