Cannot start Mongrel Server

1.3k Views Asked by At

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)

Any help is appreciated.

Cheers,

4

There are 4 best solutions below

0
On

i've usually seen this when I'm already running mongrel on the same port in another window

0
On

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 | grep ruby and see if you get any results.

It is also possible that the particular port is blocked by a firewall or some other security software or you need admin privileges.

0
On

in my case, the solution was the following: for some reason, the loopback was down, as could be seen from ifconfig returning nothing.

# 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.

0
On

I just had this happen to me, using Sinatra as a frontend.

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.

Change the IP to the IP of the server to remove the error.