简体   繁体   English

无法启动Mongrel服务器

[英]Cannot start Mongrel Server

I can't start mongrel server. 我无法启动杂种服务器。 When I have a look at log file, it tells me that the address that I wanted to use is not available. 当我查看日志文件时,它告诉我我想使用的地址不可用。 I tried to check if there were some services using that address, but I could not find any. 我试图检查是否有使用该地址的服务,但找不到任何服务。

The error message in log file: 日志文件中的错误消息:

`initialize_without_backlog': Cannot assign requested address - bind(2) (Errno::EADDRNOTAVAIL) `initialize_without_backlog':无法分配请求的地址-bind(2)(Errno :: EADDRNOTAVAIL)

Any help is appreciated. 任何帮助表示赞赏。

Cheers, 干杯,

Some other process is using the same port. 其他一些进程正在使用同一端口。 See the process list and see if you can find another server running. 查看进程列表,看看是否可以找到其他正在运行的服务器。

If you're running linux try ps -A | 如果您正在运行linux,请尝试ps -A | grep ruby and see if you get any results. grep ruby​​,看看是否有任何结果。

It is also possible that the particular port is blocked by a firewall or some other security software or you need admin privileges. 特定端口也可能被防火墙或某些其他安全软件阻止,或者您需要管理员权限。

I just had this happen to me, using Sinatra as a frontend. 我只是使用Sinatra作为前端发生了这种情况。

If you put 如果你把

 set :host, 'some.ip.address.255'

and that IP is wrong, then you will get this error, both with mongrel and with WEBrick. 且该IP错误,那么无论是杂种还是WEBrick,都会出现此错误。

Change the IP to the IP of the server to remove the error. 将IP更改为服务器的IP以消除错误。

in my case, the solution was the following: for some reason, the loopback was down, as could be seen from ifconfig returning nothing. 就我而言,解决方案如下:由于某种原因,回送已关闭,从ifconfig不返回任何内容可以看出。

# ifup lo

was sufficient to obtain 足以获得

# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4052 (3.9 KiB)  TX bytes:4052 (3.9 KiB)

Then, the web server worked. 然后,Web服务器开始工作。

当我已经在另一个窗口的同一端口上运行了杂种时,我通常会看到这种情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM