I keep getting: No connection to breakpoint service at druby://localhost:42531 (DRb::DRbConnError) Tries to connect will be made every 3 seconds... This happens every time i run ./script/breakpointer using 0.9.5 on OSX or Windows. Any ideas?
Robert Williams wrote:> I keep getting: > > No connection to breakpoint service at druby://localhost:42531 > (DRb::DRbConnError) > Tries to connect will be made every 3 seconds... > > This happens every time i run ./script/breakpointer using 0.9.5 on OSX > or Windows. > > Any ideas?I think there might be something funny going on with remote breakpointing in 0.9.5. I''m getting that same output on the console, and when I insert a breakpoint in the app I get: SecurityError (Insecure operation `write'' at level 4) It''s making me sad. -Scott _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''m experiencing the same thing with 0.9.5. I had been previously using the breakpoints in .9.4.1 and everything worked as expected. Once I upgraded to the 0.9.5 I get the same console message output message as you. The Security error I think may be a separate issue (though it may need to be fixed as well for the breakpoints to function properly). I was getting that error when I was trying to output some items to the screen 2 or 3 objects/files deep from the controller. Once I re-worked that part of the app so the output was being done higher in the hierarchy I no longer had the error. If you put the breakpoint in the controller for the page do you still get the security error? --James At 01:51 PM 1/28/2005, Scott Barron wrote:>Robert Williams wrote: >>I keep getting: >>No connection to breakpoint service at druby://localhost:42531 >>(DRb::DRbConnError) >>Tries to connect will be made every 3 seconds... >>This happens every time i run ./script/breakpointer using 0.9.5 on OSX >>or Windows. >>Any ideas? > >I think there might be something funny going on with remote breakpointing >in 0.9.5. I''m getting that same output on the console, and when I insert >a breakpoint in the app I get: > >SecurityError (Insecure operation `write'' at level 4) > >It''s making me sad. > >-Scott > > > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails
maybe your personal firewall is blocking this port? Am Freitag, den 28.01.2005, 18:22 +0000 schrieb Robert Williams:> I keep getting: > > No connection to breakpoint service at druby://localhost:42531 > (DRb::DRbConnError) > Tries to connect will be made every 3 seconds... > > This happens every time i run ./script/breakpointer using 0.9.5 on OSX > or Windows. > > Any ideas? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Norman Timmler Holländische Reihe 31 22765 Hamburg +49 (0)40 / 43 25 10 80 mailto:norman-QkIQCVqxERM@public.gmane.org
Scott Barron wrote:> I think there might be something funny going on with remote > breakpointing in 0.9.5. I''m getting that same output on the console, > and when I insert a breakpoint in the app I get: > > SecurityError (Insecure operation `write'' at level 4) > > It''s making me sad.Not able to reproduce that here. Can you please provide detailed information so I can try to trace it up? It would be helpful to know what platform you''re on, what dispatching type (CGI, FastCGI, ModRuby), web server you use and whether the bug shows up reliably or just every once and then. Thanks in advance for helping me with this.
Robert Williams wrote:> I keep getting: > > No connection to breakpoint service at druby://localhost:42531 > (DRb::DRbConnError) > Tries to connect will be made every 3 seconds... > > This happens every time i run ./script/breakpointer using 0.9.5 on OSX > or Windows. > > Any ideas?This sounds a lot like it might be related to a firewall or a reconfigured port. Can you have a look at your config/environments/development.rb file? What is BREAKPOINT_SERVER_PORT set to? Have you successfully used Breakpoints in older Rails versions? You might also want to run the Breakpointer as ruby -d script/breakpointer which will enable debug mode and the outputting of a complete exception backtrace which might help in tracking this down. Thanks in advance for the help.
Florian Groß wrote:> Scott Barron wrote: > >> I think there might be something funny going on with remote >> breakpointing in 0.9.5. I''m getting that same output on the console, >> and when I insert a breakpoint in the app I get: >> >> SecurityError (Insecure operation `write'' at level 4) >> >> It''s making me sad. > > > Not able to reproduce that here. Can you please provide detailed > information so I can try to trace it up? It would be helpful to know > what platform you''re on, what dispatching type (CGI, FastCGI, ModRuby), > web server you use and whether the bug shows up reliably or just every > once and then. > > Thanks in advance for helping me with this.Sure thing, Rails 0.9.5, Ruby 1.8.1, OS X, using webrick, and it shows up reliably, using breakpoint from any action. Anything else you need? Thanks -Scott _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Scott Barron wrote:> Florian Groß wrote: > >> Scott Barron wrote: >> >>> I think there might be something funny going on with remote >>> breakpointing in 0.9.5. I''m getting that same output on the console, >>> and when I insert a breakpoint in the app I get: >>> >>> SecurityError (Insecure operation `write'' at level 4) >>> >>> It''s making me sad. >> >> >> >> Not able to reproduce that here. Can you please provide detailed >> information so I can try to trace it up? It would be helpful to know >> what platform you''re on, what dispatching type (CGI, FastCGI, >> ModRuby), web server you use and whether the bug shows up reliably or >> just every once and then. >> >> Thanks in advance for helping me with this. > > > Sure thing, Rails 0.9.5, Ruby 1.8.1, OS X, using webrick, and it shows > up reliably, using breakpoint from any action. Anything else you need? > > Thanks > -Scott >I should also note that the breakpoints work fine while running unit tests, it''s only when using it through webrick. I have not tested it with apache. -Scott _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Attached is the result of running ruby -d ./script/breakpointer I''m dispatching using CGI on Apache 1.3 & the breakpoint server port is 42531. They did work on 0.9.4.1. Maybe this security update has something to do with it? http://docs.info.apple.com/article.html?artnum=300770 Thanks _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Robert Williams wrote:> I''m dispatching using CGI on Apache 1.3 & the breakpoint server port > is 42531. They did work on 0.9.4.1.I wonder if binding to localhost might be related to this. Could you perhaps try running> ruby -r breakpoint -e "Breakpoint.activate_drb(''druby://:42531'', nil); breakpoint"instead of your web application (it might be necessary to cd to the directory containing breakpoint.rb first) and then try running the breakpointer regularly and with druby://127.0.0.1:42531 as its argument in case that does not work?
Scott Barron wrote:>>>> I think there might be something funny going on with remote >>>> breakpointing in 0.9.5. I''m getting that same output on the >>>> console, and when I insert a breakpoint in the app I get: >>>> >>>> SecurityError (Insecure operation `write'' at level 4) >>> Not able to reproduce that here. Can you please provide detailed >>> information so I can try to trace it up? It would be helpful to know >>> what platform you''re on, what dispatching type (CGI, FastCGI, >>> ModRuby), web server you use and whether the bug shows up reliably or >>> just every once and then. >>> >> Sure thing, Rails 0.9.5, Ruby 1.8.1, OS X, using webrick, and it shows >> up reliably, using breakpoint from any action. Anything else you need? >> > I should also note that the breakpoints work fine while running unit > tests, it''s only when using it through webrick. I have not tested it > with apache.Does the problem still occur when you use something else instead of WEBrick? I think I''ve traced this whole thing to the handlers being run in a $SAFE=4 context so far. But I don''t know why such a thing would happen. Perhaps you can also try putting this code in one of your controller files: (at top level, outside of Classes and defs) File.open("/tmp/debug.log") { |f| trace_var(:$SAFE) { |*args| f.puts(args.inspect) } } It will log changes of $SAFE into /tmp/debug.log which might give a hint as to what is happening. But then again I''ve pretty much greped through Ruby''s standard library and the Rails code and not seen any place where $SAFE would be changed like that. I''m also wondering if this bug might be only happening on OS X and/or WEBrick and/or Ruby 1.8.1.
Florian Groß wrote:> Does the problem still occur when you use something else instead of > WEBrick? I think I''ve traced this whole thing to the handlers being run > in a $SAFE=4 context so far. But I don''t know why such a thing would > happen.I think I''ve traced this further. If you use .call on a tainted method it will be run inside a $SAFE=4 context. I still don''t know why the methods should be tainted, but you can try these changes and report the result: Index: C:/dev.svn/ruby/breakpoint/breakpoint.rb ==================================================================--- C:/dev.svn/ruby/breakpoint/breakpoint.rb (revision 41) +++ C:/dev.svn/ruby/breakpoint/breakpoint.rb (working copy) @@ -122,6 +122,7 @@ # in the context of the client. class Client def initialize(eval_handler) # :nodoc: + eval_handler.untaint @eval_handler = eval_handler end @@ -288,6 +289,8 @@ def collision sleep(0.5) until @collision_handler + @collision_handler.untaint @collision_handler.call end @@ -299,6 +302,7 @@ sleep(0.5) until @handler + @handler.untaint @handler.call(workspace, message) end Index: C:/dev.svn/ruby/breakpoint/breakpoint_client.rb ==================================================================--- C:/dev.svn/ruby/breakpoint/breakpoint_client.rb (revision 40) +++ C:/dev.svn/ruby/breakpoint/breakpoint_client.rb (working copy) @@ -149,9 +149,15 @@ service = DRbObject.new(nil, Options[:ServerURI]) begin - service.eval_handler = Handlers.method(:eval_handler) - service.collision_handler = Handlers.method(:collision_handler) - service.handler = Handlers.method(:breakpoint_handler) + ehandler = Handlers.method(:eval_handler) + p [ehandler, ehandler.tainted?]; ehandler.untaint + chandler = Handlers.method(:collision_handler) + p [chandler, chandler.tainted?]; chandler.untaint + handler = Handlers.method(:breakpoint_handler) + p [handler, handler.tainted?]; handler.untaint + service.eval_handler = ehandler + service.collision_handler = chandler + service.handler = handler reconnecting = false if Options[:Verbose] then
Getting a connection but receiving this: [#<Method: Module(Handlers)#eval_handler>, false] [#<Method: Module(Handlers)#collision_handler>, false] [#<Method: Module(Handlers)#breakpoint_handler>, false] Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Oh and your changes don''t make a difference to the exceptions! :) Thanks again! On Sat, 29 Jan 2005 14:39:26 +0100, Florian Groß <florgro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Robert Williams wrote: > > > I''m dispatching using CGI on Apache 1.3 & the breakpoint server port > > is 42531. They did work on 0.9.4.1. > > I wonder if binding to localhost might be related to this. Could you > perhaps try running > > > ruby -r breakpoint -e "Breakpoint.activate_drb(''druby://:42531'', nil); breakpoint" > > instead of your web application (it might be necessary to cd to the > directory containing breakpoint.rb first) and then try running the > breakpointer regularly and with druby://127.0.0.1:42531 as its argument > in case that does not work? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Robert Williams wrote:> Getting a connection but receiving this: > > [#<Method: Module(Handlers)#eval_handler>, false] > [#<Method: Module(Handlers)#collision_handler>, false] > [#<Method: Module(Handlers)#breakpoint_handler>, false] > Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no > marshal_dump is defined for class Method > Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no > marshal_dump is defined for class Method > Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no > marshal_dump is defined for class Method > > Oh and your changes don''t make a difference to the exceptions! :)So even running it via> ruby -r breakpoint -e "Breakpoint.activate_drb(''druby://:42531'', nil); breakpoint"did not change anything? I think the two problems (not getting the connection at all like in your case and the handlers being executed in a too restrict context because they are tainted) are not related closely. Sorry if I caused confusion. Oh, and did breakpoints ever work for you before? Perhaps you could try changing the port to something else. Thanks.
Robert Williams wrote:> Getting a connection but receiving this:Another idea: Perhaps you can try running breakpoint_client with --client-uri=druby://localhost:42530? I recently received a report from a breakpoint user who had trouble with the breakpoint_client not getting through the connection phase -- it would work fine up to the point where it would register the first handler and fail there. It turned out that the breakpoint_client was not binding properly to the localhost interface, but rather to the public IP. You might be experiencing the same problem here.
Tried that, no luck i''m afraid! The connection is refused until i refresh the browser and the breakpoint is activated, then the server automatically exits. I''m getting ''address already in use'' alot; i guess that''s because the client is exiting prematurely? What is this TypeError? Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `Errno::ECONNREFUSED'' at /usr/local/lib/ruby/1.8/drb/drb.rb:796 - Connection refused - connect(2) Exception `DRb::DRbConnError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:706 - druby://localhost:42531 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> Server exited. Closing connection... Thanks again! :) On Tue, 01 Feb 2005 01:12:19 +0100, Florian Groß <florgro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Robert Williams wrote: > > > Getting a connection but receiving this: > > Another idea: Perhaps you can try running breakpoint_client with > --client-uri=druby://localhost:42530? > > I recently received a report from a breakpoint user who had trouble with > the breakpoint_client not getting through the connection phase -- it > would work fine up to the point where it would register the first > handler and fail there. It turned out that the breakpoint_client was not > binding properly to the localhost interface, but rather to the public > IP. You might be experiencing the same problem here. > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Robert Williams wrote:> Tried that, no luck i''m afraid! > > The connection is refused until i refresh the browser and the > breakpoint is activated, then the server automatically exits. I''m > getting ''address already in use'' alot; i guess that''s because the > client is exiting prematurely? > > What is this TypeError?Are you hitting the cancel button in your browser? It''s fine for it to keep displaying loading state hints as long as you''re working on a breakpoint. Those TypeErrors are handled exceptions inside DRb. It first tries serializing the methods objects to get a copy through the network and then falls back to pass by reference. The connection refused stuff might actually be related to the ACL. I''m not sure why you''re not getting identified as localhost, but this might be the problem. Can you please try placing a Breakpoint.deactivate_drb; Breakpoint.activate_drb(nil, nil) in your application to disable the ACLs completely?
Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Exception `TypeError'' at /usr/local/lib/ruby/1.8/drb/drb.rb:545 - no marshal_dump is defined for class Method Connection established. Waiting for breakpoint... So i get connection refused until a breakpoint is reached then it seems to be ok with whats above. I''m getting exactly the same problem with my windows box. Could this be related to the network i have them both on? seems a little strange though! On Wed, 02 Feb 2005 18:48:07 +0100, Florian Groß <florgro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Robert Williams wrote: > > > Tried that, no luck i''m afraid! > > > > The connection is refused until i refresh the browser and the > > breakpoint is activated, then the server automatically exits. I''m > > getting ''address already in use'' alot; i guess that''s because the > > client is exiting prematurely? > > > > What is this TypeError? > > Are you hitting the cancel button in your browser? It''s fine for it to > keep displaying loading state hints as long as you''re working on a > breakpoint. > > Those TypeErrors are handled exceptions inside DRb. It first tries > serializing the methods objects to get a copy through the network and > then falls back to pass by reference. > > The connection refused stuff might actually be related to the ACL. I''m > not sure why you''re not getting identified as localhost, but this might > be the problem. > > Can you please try placing a Breakpoint.deactivate_drb; > Breakpoint.activate_drb(nil, nil) in your application to disable the > ACLs completely? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >