Migration not working

I’ve installed fabmanager from scratch, exported the database content from old server to the new one.
I can sign in but when go to « Reserve a machine » it reloads and doesn’t show anything, it stays on the same page.

This is was I get on « app-stdout.log » file:

Rendered api/feeds/twitter_timelines.json.jbuilder (0.1ms)
Completed 204 No Content in 412ms (Views: 1.0ms | ActiveRecord: 0.2ms | Elasticsearch: 0.0ms)
Started GET « /api/notifications/last_unread » for 162.158.154.130 at 2018-09-15 19:14:06 +0000
Processing by API::NotificationsController#last_unread as JSON
User Load (0.3ms) SELECT « users ».* FROM « users » WHERE « users ».« id » = $1 ORDER BY « users ».« id » ASC LIMIT 1 [[« id », 3]]
Notification Load (5.4ms) SELECT « notifications ».* FROM « notifications » WHERE « notifications ».« receiver_id » = $1 AND « notifications ».« receiver_type » = $2 AND « notifications ».« is_read » = $3 ORDER BY created_at DESC LIMIT 3 [[« receiver_id », 3], [« receiver_type », « User »], [« is_read », « f »]]
(1.9ms) SELECT COUNT() FROM « notifications » WHERE « notifications ».« receiver_id » = $1 AND « notifications ».« receiver_type » = $2 [[« receiver_id », 3], [« receiver_type », « User »]]
(1.5ms) SELECT COUNT(
) FROM « notifications » WHERE « notifications ».« receiver_id » = $1 AND « notifications ».« receiver_type » = $2 AND « notifications ».« is_read » = $3 [[« receiver_id », 3], [« receiver_type », « User »], [« is_read », « f »]]
Rendered api/notifications/index.json.jbuilder (0.1ms)
Completed 200 OK in 17ms (Views: 0.9ms | ActiveRecord: 9.1ms | Elasticsearch: 0.0ms)
Started GET « /uploads/project_image/7/large_project_image.jpg » for 162.158.158.48 at 2018-09-15 19:14:52 +0000

ActionController::RoutingError (No route matches [GET] « /uploads/project_image/7/large_project_image.jpg »):
actionpack (4.2.10) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (4.2.10) lib/action_dispatch/middleware/show_exceptions.rb:30:in call’
railties (4.2.10) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.10) lib/rails/rack/logger.rb:20:in block in call’
activesupport (4.2.10) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.10) lib/active_support/tagged_logging.rb:26:in tagged’
activesupport (4.2.10) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.10) lib/rails/rack/logger.rb:20:in call’
actionpack (4.2.10) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.10) lib/rack/methodoverride.rb:22:in call’
rack (1.6.10) lib/rack/runtime.rb:18:in call' activesupport (4.2.10) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call’
actionpack (4.2.10) lib/action_dispatch/middleware/static.rb:120:in call' rack (1.6.10) lib/rack/sendfile.rb:113:in call’
railties (4.2.10) lib/rails/engine.rb:518:in call' railties (4.2.10) lib/rails/application.rb:165:in call’
rack (1.6.10) lib/rack/content_length.rb:15:in call' puma (3.10.0) lib/puma/configuration.rb:225:in call’
puma (3.10.0) lib/puma/server.rb:605:in handle_request' puma (3.10.0) lib/puma/server.rb:437:in process_client’
puma (3.10.0) lib/puma/server.rb:301:in block in run' puma (3.10.0) lib/puma/thread_pool.rb:120:in block in spawn_thread’

What might be wrong here?
Am I doing the migration the wrong way? What’s the best way to move fabmanager to a new server?

Thank you!

Hi @semeano,
It looks like you have forgotten to copy the public/uploads folder from your old server. This folder contains all the pictures and attachments needed by your projects, events, machines, etc.
You may also want to copy public/api/stylesheets to keep your customized fab-manager theme.

It if still hangs on, please copy here an update of your app-stdout.log, after having copied the folders mentioned above.

Have a nice day,

It’s working! Thanks a lot!!!

1 « J'aime »

Hi @Sylvain

I’m doing another migration but it’s not working again… :frowning2:

I did tail log/app-stdout.log and this is what I get:

  Parameters: {"user"=>{}, "session"=>{"user"=>{}}}
Processing by API::MachinesController#index as JSON
Completed 401 Unauthorized in 5ms (ActiveRecord: 0.0ms | Elasticsearch: 0.0ms)
  Setting Load (5.9ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = $1 LIMIT 1  [["name", "machines_sort_by"]]
Completed 500 Internal Server Error in 10ms (ActiveRecord: 5.9ms | Elasticsearch: 0.0ms)

NoMethodError (undefined method `value' for nil:NilClass):
  app/controllers/api/machines_controller.rb:7:in `index'

Do you think you can help me?

When migrating the DB data, I dropped the old database and imported the new one. Maybe I should just imported on top of the existing one? Don’t know… Is there a way to reset the DB data to what it was initially?

Thanks!

Hi Pedro,
It seems that you havn’t migrated to the same fab-manger’s version.
You have to run the upgrade commands listed on the release page in order to fix your instance. Check the TODO DEPLOY commands for release 2.6.6 and ongoing (or maybe for previous versions if you know where you start from).

Thanks you once again! :slight_smile:

1 « J'aime »