Sebastian Friedrich
2006-Jul-13 19:41 UTC
[Mongrel] (OS X) Address binding still exists after terminating session
[using mongrel-0.3.13.4 pre-release, OX 10.4.7] I have a slightly annoying issue under OS X: If i terminate the session that ran the mongrel process (by closing terminal window -- hey, it happens!), subsequent attempts to start mongrel give me the following error: /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ tcphack.rb:12:in `initialize_without_backlog'': Address already in use - bind(2) (Errno::EADDRINUSE) I suppose, because mongrel wasn''t stopped properly, the address binding still exists somewhere. However, since the actual mongrel process has been killed, i have no idea how to unbind the address and port otherwise, so i usually have to resort to restarting the whole system (ouch!). This problem does not exist with WebBrick or lighty, so maybe this can be fixed? Otherwise, how can i manually release the address from its binding? Thanks for your help. Sebastian
Scott Laird
2006-Jul-13 19:47 UTC
[Mongrel] (OS X) Address binding still exists after terminating session
On 7/13/06, Sebastian Friedrich <sebastian at feldpost.com> wrote:> [using mongrel-0.3.13.4 pre-release, OX 10.4.7] > > I have a slightly annoying issue under OS X: If i terminate the > session that ran the mongrel process (by closing terminal window -- > hey, it happens!), subsequent attempts to start mongrel give me the > following error: > > /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ > tcphack.rb:12:in `initialize_without_backlog'': Address already in use > - bind(2) (Errno::EADDRINUSE)That error means that an existing process is using that port on this system. It''s not an issue of unclean shutown--it means that Mongrel is still running in the background. Try ''ps awwwx | grep mongrel'' to find its process ID, then use ''kill'' to kill it. Scott
Sebastian Friedrich
2006-Jul-13 20:00 UTC
[Mongrel] (OS X) Address binding still exists after terminating session
On Jul 13, 2006, at 2:47 PM, Scott Laird wrote:> > That error means that an existing process is using that port on this > system. It''s not an issue of unclean shutown--it means that Mongrel > is still running in the background. Try ''ps awwwx | grep mongrel'' to > find its process ID, then use ''kill'' to kill it.you right, the process was still running. I had actually grepped for a "mongrel" process before; it turned up empty because, in fact, i had started it as "script/server" (Doh!). Sorry for the noise (and yes, i will put down that crack pipe!). Sebastian
Charles Brian Quinn
2006-Jul-13 21:24 UTC
[Mongrel] (OS X) Address binding still exists after terminating session
I have also found that my mac os x terminal windows need to be expanded really big to do: ps aux | grep blah especially for ruby proceses with paths like: /usr/bin/nice -n 3 /usr/local/bin/ruby .... I assume this is because it is really piping ps aux to the screen and then doing the grep, and if the screen is not big enough, it wont find the full path. netstat -ano should also show you what "stuff" is listening on all your ports and so you can see those 8000 ports still on. cheers, -- Charles Brian Quinn www.seebq.com On 7/13/06, Sebastian Friedrich <sebastian at feldpost.com> wrote:> > > On Jul 13, 2006, at 2:47 PM, Scott Laird wrote: > > > > That error means that an existing process is using that port on this > > system. It''s not an issue of unclean shutown--it means that Mongrel > > is still running in the background. Try ''ps awwwx | grep mongrel'' to > > find its process ID, then use ''kill'' to kill it. > > you right, the process was still running. I had actually grepped for > a "mongrel" process before; it turned up empty because, in fact, i > had started it as "script/server" (Doh!). Sorry for the noise (and > yes, i will put down that crack pipe!). > > Sebastian > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060713/143feccf/attachment-0001.html
Grant Hollingworth
2006-Jul-13 21:43 UTC
[Mongrel] (OS X) Address binding still exists after terminating session
* Charles Brian Quinn <me at seebq.com> [2006-07-13 15:32]:> I have also found that my mac os x terminal windows need to be expanded > really big to do: > > ps aux | grep blahIf you ''ps auxww'' then ps will pass everything to grep.
Hey Scott, Cool finally meeting you last night. I wanted to see if you were willing to work with me and two other guys in doing a security test of Rails and Typo. Basically, after today''s nasty little security hole I got with DHH and two security pros I know and we''re looking for a small fun first project to try out a security test with. Since I know you, you wrote typo, typo is popular, I figured it''d be a good start. If you''re interested, get ahold of me and we''ll start putting this together. I''m thinking you could help them get a good tour of it, help when bugs are found, and just generally learn about how they attack stuff. Thanks. Zed
Sounds good to me. As usual, I''m afraid of what they''ll find. I''m going to push a new Typo release tonight to deal with the 1.1.5 mess, but after that I should have time to work on this. Contact me off-list for scheduling details :-). Scott On 8/9/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> Hey Scott, > > Cool finally meeting you last night. I wanted to see if you were > willing to work with me and two other guys in doing a security test of > Rails and Typo. > > Basically, after today''s nasty little security hole I got with DHH and > two security pros I know and we''re looking for a small fun first project > to try out a security test with. > > Since I know you, you wrote typo, typo is popular, I figured it''d be a > good start. > > If you''re interested, get ahold of me and we''ll start putting this > together. I''m thinking you could help them get a good tour of it, help > when bugs are found, and just generally learn about how they attack > stuff. > > Thanks. > > Zed > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
On Wed, 2006-08-09 at 17:15 -0700, Zed Shaw wrote:> Hey Scott, > > Cool finally meeting you last night. I wanted to see if you were > willing to work with me and two other guys in doing a security test of > Rails and Typo. >DOH! Not supposed to go to the list, but hey, cat''s out of the bag I guess. Zed
Scott Mathieson
2006-Aug-10 12:35 UTC
[Mongrel] Hey, me and some friends want to break typo
On Thursday 10 August 2006 01:31, Zed Shaw wrote:> On Wed, 2006-08-09 at 17:15 -0700, Zed Shaw wrote: > > Hey Scott, > > > > Cool finally meeting you last night. I wanted to see if you were > > willing to work with me and two other guys in doing a security test of > > Rails and Typo. > > DOH! Not supposed to go to the list, but hey, cat''s out of the bag I > guess. > > Zed > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-userseven better is the few seconds of panic when i couldn''t remember going transcontinental and writing typo, all in the last 24 hours; but i''m ok now