0

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,

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
user143482
  • 2,341
  • 3
  • 15
  • 7

4 Answers4

2

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.

rohit.arondekar
  • 416
  • 3
  • 10
1

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.

mmr
  • 14,781
  • 29
  • 95
  • 145
1

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

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

austinfromboston
  • 3,791
  • 25
  • 25