# How to start the ferret server in the production environment?

**URL:** <https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654>\
**Category:** Rails\
**Created:** [August 31, 2009, 6:22am UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654 "2009-08-31T06:22:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/u/SSSSSSSSSS_SSSSSSSS)\
**Post date:** [August 31, 2009, 6:22am UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654/1 "2009-08-31T06:22:37Z")

</div>

I have developed a rails app which used the ferret and acts\_as\_ferret  
plugin,but I never deployed a rails application,I wonder in the  
production  
environment,is it as easy as it is in the development environment?just  
connect the server with ssh and type “script/ferret\_server -e production  
start”?  
Thanks.

---

<div class="post-metadata">

**Author:** ![SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/u/SSSSSSSSSS_SSSSSSSS)\
**Post date:** [August 31, 2009, 8:58am UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654/2 "2009-08-31T08:58:20Z")

</div>

I’m using engineyard cloud computing service,as I expected before,I am  
facing some problems.After running the start command,the ferret\_server  
doesn’t seems to start,cause when I stop the ferret\_server it  
says"ferret\_server doesn’t appear to be running.",and in the  
ferret\_server.log,it shows “Cannot assign request address -  
bind(2)”.What  
can I do now?please help,thanks a lot.

2009 å¹´ 8 31 æ—¥ 12:20 PMåœ¨ “åˆ˜å­å˜‰” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) æåˆ°ï¼š

I have developed a rails app which used the ferret and acts\_as\_ferret  
plugin,but I never deployed a rails application,I wonder in the  
production  
environment,is it as easy as it is in the development environment?just  
connect the server with ssh and type “script/ferret\_server -e production  
start”?  
Thanks.

---

<div class="post-metadata">

**Author:** ![SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/u/SSSSSSSSSS_SSSSSSSS)\
**Post date:** [August 31, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654/3 "2009-08-31T16:54:59Z")

</div>

2009/8/30 Áõ×Ó¼Î [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ferret\_server.log,it shows “Cannot assign request address - bind(2)”.

So either you’re trying to use a privileged port as a non-privileged  
user, or that port’s already being used by some other process.

If you have sudo rights, you can try starting ferret\_server as root;  
if that fails, the problem is the second one – find a different port to  
run on and configure appropriately.

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/u/SSSSSSSSSS_SSSSSSSS)\
**Post date:** [September 1, 2009, 4:21am UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654/4 "2009-09-01T04:21:13Z")

</div>

Thank you for your reply.  
I have tried to change the port number in config/ferret\_server.yml  
from 9010(the default) to another number(18275,a random number),and I  
run:  
“sudo ruby script/ferret\_server -e production -R [rails\_root]  
start” ,and the problem is the same.  
When the port number is 9010,I tried running the command with sudo  
access,it’s still this problem.  
The faqs on the engineyard website says “Via sudo you have complete  
control over your instances.We have sudo configured so that the user  
you setup has access to sudo without a password being required” as  
well.  
I don’t know what to do again.  
Could you give me some other advice?Thanks in advance.

On Aug 31, 10:51 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSSSSSSSSS\_SSSSSSSS](https://www.ruby-forum.com/u/SSSSSSSSSS_SSSSSSSS)\
**Post date:** [September 10, 2009, 7:44am UTC](https://www.ruby-forum.com/t/how-to-start-the-ferret-server-in-the-production-environment/174654/5 "2009-09-10T07:44:55Z")

</div>

Hoo~~Ray!!!  
The problem has been solved!  
could someone tell me why I have to write ferret\_server.yml like this:  
… production:  
host: 127.0.0.1  
…  
neither  
…  
production:  
host: localhost  
…  
nor  
…  
production:  
host: [the IP of my instance]  
… why?

It seems that I have make a stupid mistake…and this mistake takes me  
about 10 days to find the answer…  
During finding how to solve the problem,I learned something about the  
port of amazon computing service,see here:  
[https://cloud-support.engineyard.com/discussions/problems/44-firewalled-ports](https://cloud-support.engineyard.com/discussions/problems/44-firewalled-ports)  
Before setting the host to 127.0.0.1,I tried this method,but it  
doesn’t work…may be this will be useful for somebody,so I put the  
link above.

On Aug 31, 10:51 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
