-
Notifications
You must be signed in to change notification settings - Fork 92
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
Failed to connect to central server #44
Comments
Hey @nkokkos, you'll have to give us a little more info about where the find_or_create_by error is occurring. Also a little bit about your system, such as what operating system and version of ruby you're running. |
Hi, thanx ruby 1.9.3p547 crowd server boots up with no errors but it crashes when I try to create a node with
It crashes on node_record, line 35: https://github.com/documentcloud/cloud-crowd/blob/master/lib/cloud_crowd/models/node_record.rb#L35 |
I believe find_or_create_by was introduced in ActiveRecord version 4. Looking at the crowd-cloud gemspec, we're only requiring >= 3. @nkokkos My suspicion is that you're running ActiveRecord 3.x, hence the exception. You can check by looking in the Gemfile.lock to identify the version. |
@nathanstitt yep, looks like you're right. My intention was to keep CloudCrowd accessible to both AR 3 and AR 4 projects and it looks like i messed it up. I'll take a look at how we can get support for that later. @nkokkos for now my recommendation is that, if you can, upgrade to rails4, and CloudCrowd should work fine for you. |
Thank you, I upgraded to activerecord 4.x but now I am getting : I am using the postgresql driver and connection pool has been set to 15 in database.yml Perhaps this is related to #43 ? |
Worker nodes do not require DB access. Since the defer call wraps a connection pool it's usage was causing excessive connections and was causing errors if the node's configuration didn't have a database setup. Reported in issue #44
find_or_create_by was introduced in version 4. Reported in #44
@nkokkos Looks like the node currently requires a database configuration and is throwing the exception because it doesn't have it. I've just pushed up a commit that should remove that requirement as well as allow cloud-crowd to work with ActiveRecord 3.2. For now, it should work if you copy your database configuration from the server to the node. The connection is only made when the node checks in and is then dropped so it's not super expensive. |
@nathanstitt |
Closing the issue since it's been resolved. Thanks for the confirmation |
Hi.
I am getting a connection error (failed to connect to central server) after trying the command:
crowd node
Looking over to the command window from which I started the crowd server I see
NoMethodError - undefined method 'find_or_create_by'
Have you seen this before?
The text was updated successfully, but these errors were encountered: