Hi, I just deployed my first rails application in production mode using Capistrano and mongrel clusters. Here are the lines in my mongrel_cluster.yml file. cwd: /myrailsdeploymath/current log_file: log/mongrel.log port: "8000" environment: production address: myserver.mydomain.org id_file: tmp/pids/mongrel.pid servers: 3 My development and production machine are the same. When I run `cap deploy`, I can view my application perfectly well at: http://myserver.mydomain.org:8000/app from my own machine "myserver". However, I am unable to access the application from other computers on the intranet. The ports are open. I tested the development version on ports 8000, 8001, and 8002, using both WeBrick and Mongrel and I can access the application from other machines in the development mode. But this doesn''t happen in the production mode. I get a "This URL is valid, but the connection was refused" error. Does anyone know why this is happening? I have already spent a lot of time trying to get at the cause of this problem. Many thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-07 00:59 UTC
Re: Rails production version not accessible from other machines
On Oct 7, 1:06 am, amrita <amrita.p...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I just deployed my first rails application in production mode using > Capistrano and mongrel clusters. Here are the lines in my > mongrel_cluster.yml file. > > cwd: /myrailsdeploymath/current > log_file: log/mongrel.log > port: "8000" > environment: production > address: myserver.mydomain.org > id_file: tmp/pids/mongrel.pid > servers: 3 > > My development and production machine are the same. > When I run `cap deploy`, I can view my application perfectly well at: > > http://myserver.mydomain.org:8000/app > > from my own machine "myserver". > > However, I am unable to access the application from other computers on > the intranet. The ports are open. I tested the development version on > ports 8000, 8001, and 8002, using both WeBrick and Mongrel and I can > access the application from other machines in the development mode. >Almost certainly mongrel cluster is binding the app to localhost (ie is only accessible at the address 127.0.0.1). You shouldn''t be accessing the mongrels directly - typicall an instance of apache, nginx etc... sits between browsers and the mongrels, load balancing across them. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
amrita
2008-Oct-07 01:17 UTC
Re: Rails production version not accessible from other machines
Actually, I checked that by changing the address in mongrel_cluster.yml. When I set the address to myserver.mydomain.com, I can only access it at that address and not at 127.0.0.1 and vice- versa from my computer. In either case, the site is not accessible from other computers. Ultimately, I plan to use Apache for load balancing the mongrels. When I do that, will the binding of the app to localhost create a problem? For now, is there some way of making the app available from other computers? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hassan Schroeder
2008-Oct-07 01:26 UTC
Re: Rails production version not accessible from other machines
On Mon, Oct 6, 2008 at 6:17 PM, amrita <amrita.pati-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ultimately, I plan to use Apache for load balancing the mongrels. When > I do that, will the binding of the app to localhost create a problem?No, so why wait? :-) Installing Apache httpd is about a 5-minute job. For that matter, you could also install mod_rails -- so now it''s, maybe, 8-10 minutes -- and dump the mongrels... FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
amrita
2008-Oct-07 01:29 UTC
Re: Rails production version not accessible from other machines
Yes :-) already doing it. Installed Apache and now configuring httpd.conf. Will post an update soon, either ways. Thanks a ton guys! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
amrita
2008-Oct-07 03:32 UTC
Re: Rails production version not accessible from other machines
OK, I loaded the Mongrels onto Apache and got it working. But one thing still beats me. Why is it that when Mongrel is running in a development environment, the pages are accessible from all computers on the intranet, whereas in production mode, mongrel-served pages are only visible from localhost? Amrita --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bharat
2008-Oct-07 12:52 UTC
Re: Rails production version not accessible from other machines
Can you post your /etc/hosts files from both development and production? Bharat --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
amrita
2008-Oct-07 18:11 UTC
Re: Rails production version not accessible from other machines
Here is the /etc/hosts file. Both production and dev are on the same machine. OK, so I get why 127.0.0.1 and myserver.mydomain.org are not mapped to one another. For that I will need to have a line "127.0.0.1 myserver.mydomain.org myserver" in /etc/hosts. But the dev/prod accessibility problem is still unresolved. 127.0.0.1 localhost 127.0.1.1 myserver.mydomain.org myserver # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts On Oct 7, 5:52 am, Bharat <bcrupa...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Can you post your /etc/hosts files from both development and > production? > Bharat--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---