Help with Canvas Analytics Setup.

66 views
Skip to first unread message

Lakshmanan Sornanathan

unread,
Sep 13, 2016, 11:38:42 PM9/13/16
to Canvas LMS Users
I'm setting up Canvas Analytics and stuck in the step where we need to run rake db:migrate to create the tables in the specified Keyspace. I'm following the setup guide from the Canvas Analytics page and cassandra.yml config file. Not sure where I'm making the mistake. I'm new to Canvas and not just looking for a solution/fix but would like to better understand these sort of issues or what would cause it. Thanks :)

Following is the terminal output showing the error:


ubuntu:/var/canvas$ sudo RAILS_ENV=production bundle exec rake db:migrate
1: production:public
rake aborted!
NoMethodError: undefined method `db' for nil:NilClass
/var/canvas/db/migrate/20140224212705_remove_cassandra_page_views_contributed.rb:13:in `runnable?'
/var/canvas/config/initializers/active_record.rb:1145:in `runnable?'
/var/canvas/config/initializers/active_record.rb:1179:in `select'
/var/canvas/config/initializers/active_record.rb:1179:in `runnable'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/migration.rb:912:in `migrate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/migration.rb:768:in `up'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/migration.rb:746:in `migrate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:65:in `call'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:65:in `block (5 levels) in shardify_task'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:65:in `each'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:65:in `block (4 levels) in shardify_task'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/switchman/database_server.rb:97:in `unshackle'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:64:in `block (3 levels) in shardify_task'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:346:in `block (2 levels) in with_each_shard'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:554:in `block in activate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:79:in `activate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:553:in `activate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:344:in `block in with_each_shard'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/relation/delegation.rb:13:in `each'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.13/lib/active_record/relation/delegation.rb:13:in `each'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/app/models/switchman/shard_internal.rb:340:in `with_each_shard'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:59:in `block (2 levels) in shardify_task'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/switchman/shackles.rb:22:in `activate'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/switchman-1.5.13/lib/tasks/switchman.rake:58:in `block in shardify_task'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
ubuntu:/var/canvas$

Lakshmanan Sornanathan

unread,
Sep 14, 2016, 9:25:33 AM9/14/16
to Canvas LMS Users
Manage to find the problem and fixed it. Just had to set the thrift rpc server (start_rpc) to true in the Cassandra server.
Reply all
Reply to author
Forward
0 new messages