Content
You are here:
Error execution delayed_jobs
Added by Miguel Pancada over 3 years ago
The error i get is:
ActiveModel::MissingAttributeError: can't write unknown attribute ``
Caused by:
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: zero-length delimited identifier at or near """"
LINE 1: ...ked_by" = $4, "updated_at" = $5 WHERE "delayed_jobs"."" = $6
To summarize:
I have been using openproject community for some time as a personal tool. Started on version 8 with mysql, then was forced to migrate the database for Postgres.
Right now I am on version 11.3.4
To get this error i merely tried to recover the password and for my surprise the email was never dispatched.
So i run this code to force a jobĀ
sudo openproject run bundle exec rails jobs:work
and I get the following trace:
/opt/openproject/lib/tasks/environment.rake:34:in `block (2 levels) in <top (required)>': Forcefully loading the application. Use :environment to avoid eager loading. (StructuredWarnings::StandardWarning)
W, [2021-08-30T16:04:28.924711 #1011728] WARN -- : Creating scope :open. Overwriting existing method GithubPullRequest.open.
[Worker(host:instance-2 pid:1011728)] Starting job worker
[Worker(host:instance-2 pid:1011728)] Job LdapGroups::SynchronizationJob [7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3] from DelayedJob(default) with arguments: [] (id=2837) (queue=default) RUNNING
I, [2021-08-30T16:04:45.927754 #1011728] INFO -- : [ActiveJob] [LdapGroups::SynchronizationJob] [7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3] Performing LdapGroups::SynchronizationJob (Job ID: 7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3) from DelayedJob(default) enqueued at 2021-08-30T15:54:36Z
I, [2021-08-30T16:04:45.931942 #1011728] INFO -- : [ActiveJob] [LdapGroups::SynchronizationJob] [7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3] Performed LdapGroups::SynchronizationJob (Job ID: 7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3) from DelayedJob(default) in 3.76ms
[Worker(host:instance-2 pid:1011728)] Job LdapGroups::SynchronizationJob [7f5c8b94-aae8-4afb-bb5b-35a1ac953fc3] from DelayedJob(default) with arguments: [] (id=2837) (queue=default) COMPLETED after 0.0104
rails aborted!
ActiveModel::MissingAttributeError: can't write unknown attribute ``
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activemodel-6.1.3.2/lib/active_model/attribute.rb:207:in `with_value_from_database'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activemodel-6.1.3.2/lib/active_model/attribute_set.rb:51:in `write_from_user'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/transactions.rb:415:in `restore_transaction_record_state'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/transactions.rb:334:in `rolledback!'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:125:in `rollback_records'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:303:in `block in rollback_transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:300:in `rollback_transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:315:in `rescue in block in within_new_transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:313:in `block in within_new_transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:308:in `within_new_transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/transactions.rb:302:in `save!'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/suppressor.rb:48:in `save!'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_cron_job-0.7.4/lib/delayed_cron_job/backend/updatable_cron.rb:24:in `schedule_next_run'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_cron_job-0.7.4/lib/delayed_cron_job/plugin.rb:41:in `block (2 levels) in <class:Plugin>'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:67:in `block in execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:67:in `each'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:67:in `execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:312:in `reserve_and_run_one_job'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:213:in `block in work_off'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:212:in `times'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:212:in `work_off'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:175:in `block (4 levels) in start'
/opt/openproject/vendor/ruby-2.7.4/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:174:in `block (3 levels) in start'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:61:in `block in initialize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:66:in `execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:173:in `block (2 levels) in start'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:172:in `loop'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:172:in `block in start'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:61:in `block in initialize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:79:in `block in add'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:66:in `execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/worker.rb:171:in `start'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/delayed_job-4.1.9/lib/delayed/tasks.rb:9:in `block (2 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `synchronize'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:59:in `with_application'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command.rb:52:in `invoke'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<top (required)>'
Caused by:
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: zero-length delimited identifier at or near """"
LINE 1: ...ked_by" = $4, "updated_at" = $5 WHERE "delayed_jobs"."" = $6
^