Ramon Tayag
2008-Nov-18 08:13 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
Hey everyone. I started to wonder why no mail was being sent from my app and I checked the log and saw this: I haven''t upgraded my backgroundrb so I can''t/shouldn''t be a version error. I decided to restart my cluster (mongrels and backgroundrb server) and tried to send again. It worked. What causes this problem? And what can I do so that I''ll be notified when this problem arises? Invalid worker with name mail_worker and key /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_connection.rb:52:in `ask_worker'' /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in `async_method_invoke'' /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in `receive_data'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:44:in `extract'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in `loop'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in `extract'' /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in `receive_data'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:232:in `read_external_socket'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:222:in `handle_external_messages'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:196:in `handle_read_event'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in `each'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in `handle_read_event'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:146:in `start_reactor'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in `loop'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in `start_reactor'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_master.rb:21:in `run'' /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in `initialize'' /home/ramon/my-app/current/script/backgroundrb:47:in `new'' /home/ramon/my-app/current/script/backgroundrb:47 Client disconected Thanks, Ramon Tayag
Jack Nutting
2008-Nov-18 08:48 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
On Tue, Nov 18, 2008 at 9:13 AM, Ramon Tayag <ramon.tayag at gmail.com> wrote:> I decided to restart my cluster (mongrels and backgroundrb > server) and tried to send again. It worked. What causes this > problem? And what can I do so that I''ll be notified when this problem > arises? >I have a similar problem occurring occasionally under heavy load, which leads to the whole backgroundrb system crashing. I''ve configured monit to restart backgroundrb if it goes down, which is "good enough" for me at the moment (but still somewhat unsatisfying since it is more of a band-aid than a cure). -- // jack // http://www.nuthole.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20081118/e49879e0/attachment.html>
Ramon Tayag
2008-Nov-18 09:17 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
Did more surfing and tried Middleman.all_worker_info on my server {"0.0.0.0:11006"=>[{:worker_key=>"", :status=>:running, :worker=>:mail_worker}, {:worker_key=>"", :status=>:running, :worker=>:log_worker}]} Should the worker_key have a value? Ramon Tayag
Samer Masry
2008-Nov-18 17:54 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
By default when you start the server it finds all of the workers and inserts one in. Make sure when you create a new worker with a key you are using the new_worker method MiddleMan.new_worker(:worker => #{worker_name}, :worker_key => #{worker_key}) You''ll then be able to access the worker by the key. PS. in the console use MiddleMan.all_worker_info to get a list of all the worker objects. Once you use the new_worker method you will see the newly created worker with the key specified. On Tue, Nov 18, 2008 at 12:13 AM, Ramon Tayag <ramon.tayag at gmail.com> wrote:> Hey everyone. I started to wonder why no mail was being sent from my > app and I checked the log and saw this: > > I haven''t upgraded my backgroundrb so I can''t/shouldn''t be a version > error. I decided to restart my cluster (mongrels and backgroundrb > server) and tried to send again. It worked. What causes this > problem? And what can I do so that I''ll be notified when this problem > arises? > > Invalid worker with name mail_worker and key > > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_connection.rb:52:in > `ask_worker'' > > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in > `async_method_invoke'' > > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:44:in > `extract'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in > `extract'' > > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:232:in > `read_external_socket'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:222:in > `handle_external_messages'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:196:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in > `each'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:146:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_master.rb:21:in > `run'' > > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize'' > /home/ramon/my-app/current/script/backgroundrb:47:in `new'' > /home/ramon/my-app/current/script/backgroundrb:47 > Client disconected > > Thanks, > Ramon Tayag > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20081118/537df5bb/attachment.html>
Ramon Tayag
2008-Nov-18 18:09 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
Thank you. Sorry need a bit more help. I see what you typed in "Start a new worker from controller". Will it work with the model? Also, is it because I didn''t call this that this error is happening? Thanks, Ramon Tayag On Wed, Nov 19, 2008 at 1:54 AM, Samer Masry <enzodm at gmail.com> wrote:> By default when you start the server it finds all of the workers and inserts > one in. > > Make sure when you create a new worker with a key you are using the > new_worker method > MiddleMan.new_worker(:worker => #{worker_name}, :worker_key => > #{worker_key}) > > You''ll then be able to access the worker by the key. > > PS. in the console use MiddleMan.all_worker_info to get a list of all the > worker objects. Once you use the new_worker method you will see the newly > created worker with the key specified. > > > On Tue, Nov 18, 2008 at 12:13 AM, Ramon Tayag <ramon.tayag at gmail.com> wrote: >> >> Hey everyone. I started to wonder why no mail was being sent from my >> app and I checked the log and saw this: >> >> I haven''t upgraded my backgroundrb so I can''t/shouldn''t be a version >> error. I decided to restart my cluster (mongrels and backgroundrb >> server) and tried to send again. It worked. What causes this >> problem? And what can I do so that I''ll be notified when this problem >> arises? >> >> Invalid worker with name mail_worker and key >> >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_connection.rb:52:in >> `ask_worker'' >> >> /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in >> `async_method_invoke'' >> >> /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in >> `receive_data'' >> >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:44:in >> `extract'' >> >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in >> `loop'' >> >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in >> `extract'' >> >> /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in >> `receive_data'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:232:in >> `read_external_socket'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:222:in >> `handle_external_messages'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:196:in >> `handle_read_event'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in >> `each'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in >> `handle_read_event'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:146:in >> `start_reactor'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in >> `loop'' >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in >> `start_reactor'' >> >> /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_master.rb:21:in >> `run'' >> >> /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in >> `initialize'' >> /home/ramon/my-app/current/script/backgroundrb:47:in `new'' >> /home/ramon/my-app/current/script/backgroundrb:47 >> Client disconected >> >> Thanks, >> Ramon Tayag >> _______________________________________________ >> Backgroundrb-devel mailing list >> Backgroundrb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/backgroundrb-devel > >
Ramon Tayag
2008-Nov-19 06:49 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
Thanks for this.. but is this what''s causes the error of tasks not running? I''d rather not implement code if it isn''t going to fix the problem :) Because on the backgroundrb site it says "You must use worker_key if worker was started with a worker_key" which tells me that this worker key is optional. And it seems so because most of my backgroundrb tasks run. Ramon Tayag On Wed, Nov 19, 2008 at 4:19 AM, Samer Masry <enzodm at gmail.com> wrote:> Here''s an example > If you are using a worker with a key then you need to use something like > > worker = MiddleMan.new_worker( :worker => :mail_worker, :worker_key => > ''test'') > now if you do a MiddleMan.all_worker_info you will then see your worker with > the key > > > To access your worker simply do MiddleMan.worker( :mail_worker, ''test'' ) > > > On Tue, Nov 18, 2008 at 11:31 AM, Ramon Tayag <ramon.tayag at gmail.com> wrote: >> >> Actually, I''m not doing any of that... I just followed the code below >> here: http://backgroundrb.rubyforge.org/ >> >> It worked, at least for the most part. >> >> Ramon Tayag >> >> On Wed, Nov 19, 2008 at 2:11 AM, Samer Masry <enzodm at gmail.com> wrote: >> > How are you creating the worker? > >
Ramon Tayag
2008-Nov-20 03:32 UTC
[Backgroundrb-devel] Invalid worker with name [worker name] and key
Any suggestions regarding this problem? Thanks :) Ramon Tayag On Tue, Nov 18, 2008 at 4:13 PM, Ramon Tayag <ramon.tayag at gmail.com> wrote:> Hey everyone. I started to wonder why no mail was being sent from my > app and I checked the log and saw this: > > I haven''t upgraded my backgroundrb so I can''t/shouldn''t be a version > error. I decided to restart my cluster (mongrels and backgroundrb > server) and tried to send again. It worked. What causes this > problem? And what can I do so that I''ll be notified when this problem > arises? > > Invalid worker with name mail_worker and key > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_connection.rb:52:in > `ask_worker'' > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in > `async_method_invoke'' > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:44:in > `extract'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_parser.rb:26:in > `extract'' > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:232:in > `read_external_socket'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:222:in > `handle_external_messages'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:196:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in > `each'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:192:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:146:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_core.rb:139:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.13/lib/packet/packet_master.rb:21:in > `run'' > /home/ramon/my-app/current/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize'' > /home/ramon/my-app/current/script/backgroundrb:47:in `new'' > /home/ramon/my-app/current/script/backgroundrb:47 > Client disconected > > Thanks, > Ramon Tayag >