I’ve checked out my rails tree from svn into the location I intend to
run in production mode. However, I am unclear on what exactly needs to
change for it to work in production mode.
Yes I have:
“bin-environment” => (“RAILS_ENV” => “production”)
When I switch to the externally routed IP address instead of
0.0.0.0:3000 and try running:
% ruby scripts/server
The server refuses to launch saying it can’t bind to the port. Huh?
I’ve checked out my rails tree from svn into the location I intend to
run in production mode. However, I am unclear on what exactly needs to
change for it to work in production mode.
Yes I have:
“bin-environment” => (“RAILS_ENV” => “production”)
When I switch to the externally routed IP address instead of
0.0.0.0:3000 and try running:
% ruby scripts/server
The server refuses to launch saying it can’t bind to the port. Huh?
The sounds easy. What have I overlooked?
Thanks,
Doug
You usually need root privileges to bind to ports below 1024. Are you
trying to bind to 80 ? And if so, are you root, or using sudo ?
If it’s not that, is there something already running on the port you’re
trying to use ? (try 'telnet localhost ’ and see if you get a
response)
If it’s not that, is there any kind of firewall type software
restricting use of that port ?
I’ve checked out my rails tree from svn into the location I intend to
run in production mode. However, I am unclear on what exactly needs to
change for it to work in production mode.
Yes I have:
“bin-environment” => (“RAILS_ENV” => “production”)
When I switch to the externally routed IP address instead of
0.0.0.0:3000 and try running:
% ruby scripts/server
The server refuses to launch saying it can’t bind to the port. Huh?
The sounds easy. What have I overlooked?
Thanks,
Doug
You usually need root privileges to bind to ports below 1024. Are you
trying to bind to 80 ? And if so, are you root, or using sudo ?
If it’s not that, is there something already running on the port you’re
trying to use ? (try ‘telnet localhost ’ and see if you get a
response)
If it’s not that, is there any kind of firewall type software
restricting use of that port ?
Alan
Alan,
I am running as root. My host machine which is behind the
router/firewall in my home is forwarding the appropriate ports.
Yes I have:
Thanks,
restricting use of that port ?
For example I can telnet myhost.com 25
-Doug
You might just check your running processes, just in case your distro
added (and booted up on start) apache, or even lighttpd itself. Caught
me out first time I tried to move from dev to prod
Here is the actual error I’m getting. I am completely stumped on this.
I’ve run Apache for years and never had these kinds of head scratchers:
=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
=> Rails application started on http://my-server.com:8080
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
2006-06-19 14:13:01: (network.c.300) can’t bind to port: theimageengine.com 8080 Cannot assign requested address
Exiting
Yes I have:
Thanks,
restricting use of that port ?
For example I can telnet myhost.com 25
-Doug
You might just check your running processes, just in case your distro
added (and booted up on start) apache, or even lighttpd itself. Caught
me out first time I tried to move from dev to prod
You seem to have another program running on that port.
I’ve done more digging. No joy yet, but it appears that lighttpd is can
only bind to non routed IP addresses. I cannot associate my external
“live” IP address or domain name.
Anyone seen this before.
I really, really would like to get this sorted soon, so any and all help
MUCH appreciated.
I’ve done more digging. No joy yet, but it appears that lighttpd is can
only bind to non routed IP addresses. I cannot associate my external
“live” IP address or domain name.
Can you post your current lighttpd.conf as well as the output of
ifconfig?
lighttpd.conf is vanilla with port and domain name swapped in. Whatever
Rails generates when I build the scaffold for my app.
ifconfig -a on my suse 10 linux box running behind a router forwarding
ports:
eth1 Link encap:Ethernet HWaddr 00:0C:29:9E:D9:2E
inet addr:192.168.1.111 Bcast:255.255.255.255
Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9e:d92e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:488297 errors:0 dropped:0 overruns:0 frame:0
TX packets:239084 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46406002 (44.2 Mb) TX bytes:40158811 (38.2 Mb)
Interrupt:185 Base address:0x1400
I’ve done more digging. No joy yet, but it appears that lighttpd is can
only bind to non routed IP addresses. I cannot associate my external
“live” IP address or domain name.
Can you post your current lighttpd.conf as well as the output of
ifconfig?
I grabbed the apache 1.3 tarball, installed it, fired it up and lo and
behold it serves up html just fine on port 80 using my externally
routable domain name. Took me 5 minutes from download to serving html.
Conclusion:
my network infrastructure is just fine. Port 80 is forwarding just fine.
So the ball is squarely in the lighttpd court now. I really need the
collective Rails braintrust on this one folks.
What is going on with rails+lighttpd in production mode people?
-Doug
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.