Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudCrowd.actions doesn't seem to work from a node only #9

Closed
jgeiger opened this issue Mar 8, 2010 · 4 comments
Closed

CloudCrowd.actions doesn't seem to work from a node only #9

jgeiger opened this issue Mar 8, 2010 · 4 comments
Labels

Comments

@jgeiger
Copy link
Contributor

jgeiger commented Mar 8, 2010

I've tried to move one of my actions into a node by itself so it can be run on multiple machines. The problem is that the node doesn't properly create the actions. When trying to run 'crowd node' it will throw a "uninitialized constant Module::Processor" error. While the node will start up without the 'puts CloudCrowd.actions' in the support/setup.rb, the action isn't properly recognized by the server and will never be run.

http://github.com/jgeiger/gminer_cloud_processor/tree/bugged

@jashkenas
Copy link
Member

I checked out your code and it works for me.

You can't print CloudCrowd.actions within support/setup.rb because your'e requiring that file before you define your Processor class. Even if it didn't throw an exception, it would be a circular require. You can print it after the action has been defined.

Once the node starts up, it registers itself with the central server as being able to perform the "process" action. You can verify this by opening up a crowd console, and taking a look.

irb(main):004:0> NodeRecord.last.actions
=> ["word_count", "process_pdfs", "processor", "graphics_magick"]

@jgeiger
Copy link
Contributor Author

jgeiger commented Mar 8, 2010

That answers why it won't print out but I'm still having the issue with the server being unable to see the action unless it's being run from within the same directory as the server (crowd server and then in another window crowd node) If I try to run the node from another location it still properly registers the node and the actions in the database, but they never get called.

The crowd server output:
CloudCrowd::Error::ActionNotFound - no action named: 'processor' could be found:
/opt/local/bin/thin:19:in `load'
/opt/local/bin/thin:19
127.0.0.1 - - [08/Mar/2010 10:01:31] "POST /jobs HTTP/1.1" 500 30 0.2357

@jashkenas
Copy link
Member

Sorry, the server needs to know about all of the valid actions. Make sure that the configuration directory that the server is running on also has a copy of your processor action.

@jgeiger
Copy link
Contributor Author

jgeiger commented Mar 8, 2010

Thanks. That got it working. I guess I need to duplicate things since I want the local node to run everything but the processor action so I can't launch the server and node from the same directory.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants