Open dvnstrcklnd opened 3 years ago
I can see that the status of the operations are changed to scheduled
but the table of batched operations does not load in the manager tab.
Is this with a copy of the production database or with a database that you built from scratch?
Define "from scratch."
I'm adding stuff to the default database.
OK, I think this is happening:
app_1 | ActiveRecord::StatementInvalid (Mysql2::Error: Table 'production.view_job_assignments' doesn't exist: SHOW FULL FIELDS FROM `view_job_assignments`):
app_1 | app/controllers/operations_controller.rb:148:in `block in manager_list'
app_1 | app/controllers/operations_controller.rb:147:in `each'
app_1 | app/controllers/operations_controller.rb:147:in `manager_list'
'from scratch' => from default database
need to look at default database and make sure has views
It doesn't.
On Mon, May 24, 2021 at 4:39 PM Ben Keller @.***> wrote:
need to look at default database and make sure has views
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aquariumbio/aquarium/issues/620#issuecomment-847319241, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ4DS3DF5JTBTXLNZZQL23TPK2PHANCNFSM43LF4OXQ .
aquarium-local has been updated with a migrated default database.
@dvnstrcklnd ./aquarium.sh update
will run the migrations on the current database, does that resolve your issue?
It does not. When I run ./aquarium.sh update
I get this:
Devins-MBP:aquarium-local devin$ rm -r data/db/*
Devins-MBP:aquarium-local devin$ rm data/mysql_init/dump.sql
Devins-MBP:aquarium-local devin$ cp data/mysql_init/default.sql data/mysql_init/dump.sql
Devins-MBP:aquarium-local devin$ sh aquarium.sh update
Initializing configuration file
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 102 100 102 0 0 290 0 --:--:-- --:--:-- --:--:-- 289
Pulling db ... done
Pulling s3 ... done
Pulling app ... done
Pulling krill ... done
Pulling createbucket ... done
Pulling web ... done
Creating network "aquarium-local_aquarium_net" with the default driver
Creating volume "aquarium-local_public" with default driver
Creating volume "aquarium-local_logs" with default driver
Creating volume "aquarium-local_shared" with default driver
Creating aquarium-local_db_1 ... done
Creating aquarium-local_s3_1 ... done
Creating aquarium-local_app_run ... done
+ unset BUNDLE_PATH
+ unset BUNDLE_BIN
+ '[' entrypoint.sh '!=' sh ]
+ _main update
+ echo 'Running aquarium entrypoint script with arguments: update'
Running aquarium entrypoint script with arguments: update
+ _clean_up_stray_server
+ '[' -f tmp/pids/server.pid ]
+ _wait_for_database
+ echo 'waiting for database to respond'
waiting for database to respond
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ sleep 1
+ nc -z db 3306
+ '[' update '=' development ]
+ '[' update '=' production ]
+ '[' update '=' krill ]
+ '[' update '=' update ]
+ _update_database
+ rake db:migrate
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
Calling initialize
{:instance_name=>"My Lab", :logo_path=>"aquarium-logo.png", :image_uri=>"http://localhost:9000/images/", :technician_dashboard=>false}
/aquarium/config/initializers/open.rb:8: warning: already initialized constant OpenURI::Buffer::StringMax
/usr/local/lib/ruby/2.6.0/open-uri.rb:407: warning: previous definition of StringMax was here
Aquarium Version 2.9.0 Starting!
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'production.items' doesn't exist: SHOW FULL FIELDS FROM `items`
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `block in query'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `handle_interrupt'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `query'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:317:in `block in execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:317:in `execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/mysql2_adapter.rb:217:in `execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:324:in `execute_and_free'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:471:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/attributes.rb:93:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/attributes.rb:98:in `columns_hash'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/inheritance.rb:73:in `descends_from_active_record?'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/inheritance.rb:79:in `finder_needs_type_condition?'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/core.rb:256:in `relation'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/scoping/named.rb:33:in `default_scoped'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/scoping/named.rb:28:in `all'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/querying.rb:13:in `count'
/aquarium/config/environment.rb:18:in `<top (required)>'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/usr/local/bundle/gems/railties-4.2.11.3/lib/rails/application.rb:328:in `require_environment!'
/usr/local/bundle/gems/railties-4.2.11.3/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/bundle/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Caused by:
Mysql2::Error: Table 'production.items' doesn't exist
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `block in query'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `handle_interrupt'
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `query'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:317:in `block in execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:317:in `execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/mysql2_adapter.rb:217:in `execute'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:324:in `execute_and_free'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:471:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/attributes.rb:93:in `columns'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/attributes.rb:98:in `columns_hash'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/inheritance.rb:73:in `descends_from_active_record?'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/inheritance.rb:79:in `finder_needs_type_condition?'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/core.rb:256:in `relation'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/scoping/named.rb:33:in `default_scoped'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/scoping/named.rb:28:in `all'
/usr/local/bundle/gems/activerecord-4.2.11.3/lib/active_record/querying.rb:13:in `count'
/aquarium/config/environment.rb:18:in `<top (required)>'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/bundle/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/usr/local/bundle/gems/railties-4.2.11.3/lib/rails/application.rb:328:in `require_environment!'
/usr/local/bundle/gems/railties-4.2.11.3/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/bundle/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
ERROR: 1
I get approximately the same thing when I try to run update
with an older database.
Also, when I do aquarium.sh up
or docker-compose up
now I get what appears to be an infinite loop.
Seems like a database initialization issue. Will take a look.
I missed a step in dumping the default database and it was corrupt.
If you've made your own dump with mysqldump, it probably has the same problem.
When you make a database dump with the container you need to filter out any mysqldump warnings.
If you are having trouble with a dump that you created, remove any lines starting with mysqldump:
.
For making new dumps, I added a dump
command to the aquarium-local script that does this filtering for you:
./aquarium.sh dump
which will create a file production_dump.sql
My aquarium-local instance hangs at
Loading operations ...
when I batch operations.