Hello everyone, I''m new here, and I wasn''t sure where to put this question. So forgive me if this is the wrong place. The problem I have is that when I open a second, different, rails app on one server, the ruby proces crashes. When I checkout the ruby process this is the loop it hangs in: rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 stat64("/tmp/passenger.18041", {st_mode=S_IFDIR|S_ISUID|0311, st_size=4096, ...}) = 0 open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=512, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ab8000 read(4, "t\341\"\220\10\220\320\r\377k#O*9B\276D\217\7\243,8\332\36\320\342& \267\301K\315M"..., 4096) = 512 close(4) = 0 munmap(0xb7ab8000, 4096) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 4 bind(4, {sa_family=AF_FILE, path="/tmp/passenger.18041/backends/ backend.dOEikAiQ0A3ayNPKjlCvkSPB6MsONoe0OImt8FLzU2vKpRCZcM20V1MRnTLP0WSgTMZMD"...}, 110) = -1 EADDRINUSE (Address already in use) close(4) = 0 I''ve searched google for "EADDRINUSE (Address already in use)" but I can''t find a solution.. So I hope anyone has experienced this before, and solved it.. If you need some more information, please ask for it. Thanks in advance! Tim -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Jun-08 16:10 UTC
Re: Rails crashes when running more than 1 instance..
On Tue, Jun 8, 2010 at 5:44 AM, MnrKaktus <timbaah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The problem I have is that when I open a second, different, rails app > on > one server, the ruby proces crashes.> I''ve searched google for "EADDRINUSE (Address already in use)" but I > can''t find a solution..Seriously? It means exactly what it says; one process is using the ip/port that the second one tried to bind to. That can''t work. Change one. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Saurabh Peshkar
2010-Jun-08 16:22 UTC
Re: Rails crashes when running more than 1 instance..
Hi Tim, If you are using Fedora try following command in terminal: console$> ps -fu USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND user 3429 0.0 0.0 5072 1672 pts/1 Ss Jun08 0:00 bash user 15217 2.0 0.0 4628 908 pts/1 R+ 03:17 0:00 \_ ps -fu user 3355 0.0 0.0 5072 1340 pts/0 Ss Jun08 0:00 bash user 3412 0.0 2.0 73600 42684 pts/0 Sl+ Jun08 0:20 \_ ruby script console$> kill -9 3412 (PID for ruby script/server) Might Help! Saurabh -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hassan Schroeder wrote: <blockquote cite="mid:AANLkTineWcLiHe4D-ebRlXnkwgdCd8oLmmv3WTzA2vPc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org" type="cite"> <pre wrap="">On Tue, Jun 8, 2010 at 5:44 AM, MnrKaktus <a class="moz-txt-link-rfc2396E" href="mailto:timbaah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"><timbaah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">The problem I have is that when I open a second, different, rails app on one server, the ruby proces crashes. </pre> </blockquote> <pre wrap=""><!----> </pre> <blockquote type="cite"> <pre wrap="">I''ve searched google for "EADDRINUSE (Address already in use)" but I can''t find a solution.. </pre> </blockquote> <pre wrap=""><!----> Seriously? It means exactly what it says; one process is using the ip/port that the second one tried to bind to. That can''t work. Change one. </pre> </blockquote> Start one instance with ''script/server -p 3004'' or something like that to make it use a different port. You then would access the app on the corresponding port.<br> <br> </body> </html> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.<br /> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.<br />
Thank you all for the fast responds.. I can see now that the problem is I need to run the different applications on different ports.. The only thing is, I''ve heard it has to be possible to run more applications on one port, I want to use port 80. I''m using a webserver.. What are your ideas about this? Do you run all your web-applications on different ports? Thanks, Tim -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Jun-09 08:21 UTC
Re: Rails crashes when running more than 1 instance..
On Jun 9, 8:45 am, MnrKaktus <timb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you all for the fast responds.. > > I can see now that the problem is I need to run the different > applications on different ports.. > The only thing is, I''ve heard it has to be possible to run more > applications on one port, I want to use port 80. > I''m using a webserver.. What are your ideas about this? Do you run all > your web-applications on different ports? >It looks like you''re using passenger, you can certainly serve multiple apps from a single install of apache. It''s easiest if you have separate virtual hosts but you can mount different rails apps at different paths (although it''s a bit more involved) 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Frederick Cheung wrote:> On Jun 9, 8:45�am, MnrKaktus <timb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Thank you all for the fast responds.. >> >> I can see now that the problem is I need to run the different >> applications on different ports.. >> The only thing is, I''ve heard it has to be possible to run more >> applications on one port, I want to use port 80. >> I''m using a webserver.. What are your ideas about this? Do you run all >> your web-applications on different ports? >> > It looks like you''re using passenger, you can certainly serve multiple > apps from a single install of apache. It''s easiest if you have > separate virtual hosts but you can mount different rails apps at > different paths (although it''s a bit more involved) > > FredI am using Ruby Enterprice Edition which includes passenger.. I am allready using seperate virtual hosts. Someone looked into that, and said the settings for that were good. Can the problem be because of DirectAdmin? Does anyone has experience with R.E.E. in combination with CentOS and DirectAdmin? Many thanks for the help so far, I hope we can figure this out, it''s really anoying, because I have to get the second application up and running.. Tim -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Marnen Laibow-Koser
2010-Jun-09 11:49 UTC
Re: Rails crashes when running more than 1 instance..
Tim Baas wrote:> Thank you all for the fast responds.. > > I can see now that the problem is I need to run the different > applications on different ports.. > The only thing is, I''ve heard it has to be possible to run more > applications on one port, I want to use port 80. > I''m using a webserver.. What are your ideas about this? Do you run all > your web-applications on different ports?If you''re using vhosts and Passenger, then just edit the Passenger config file appropriately (see the docs). You don''t need to start the Rails server processes explicitly; Passenger takes care of that.> > Thanks, TimBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote:> Tim Baas wrote: >> Thank you all for the fast responds.. >> >> I can see now that the problem is I need to run the different >> applications on different ports.. >> The only thing is, I''ve heard it has to be possible to run more >> applications on one port, I want to use port 80. >> I''m using a webserver.. What are your ideas about this? Do you run all >> your web-applications on different ports? > > If you''re using vhosts and Passenger, then just edit the Passenger > config file appropriately (see the docs). You don''t need to start the > Rails server processes explicitly; Passenger takes care of that. > >> >> Thanks, Tim > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgI''ve checked the settings.. But without any progress, I''ll just try mongrel with Mongrel Cluster for now.. Let''s see what that is going to do.. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jun-10 13:06 UTC
Re: Rails crashes when running more than 1 instance..
Tim Baas wrote: [...]> I''ve checked the settings.. But without any progress, I''ll just try > mongrel with Mongrel Cluster for now.. Let''s see what that is going to > do..No! Get Passenger working -- it''s far easier than Mongrel Cluster. Reread the docs -- it shouldn''t be difficult. Under what circumstances are you getting the "Port already in use" error? What command do you type that causes it? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
We''ve installed the whole thing again now.. Still the same error.. It''s actually not when loading 2 different sites, but it happens if a site is clicked too many times.. We use ''webistrano'' to upload our projects, and when we connect with two different browsers to it, and start clicking fast, rails gets in this loop, posted above.. We left it there for a while, but we still need to get it fixed.. So I hope someone passes by that had the same problem.. On Jun 10, 3:06 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Tim Baas wrote: > > [...] > > > I''ve checked the settings.. But without any progress, I''ll just try > > mongrel with Mongrel Cluster for now.. Let''s see what that is going to > > do.. > > No! Get Passenger working -- it''s far easier than Mongrel Cluster. > Reread the docs -- it shouldn''t be difficult. Under what circumstances > are you getting the "Port already in use" error? What command do you > type that causes it? > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.