Skip to content
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

ERROR: Failed to save the record #72

Open
BuIlDaLiBlE opened this issue Jul 6, 2023 · 0 comments
Open

ERROR: Failed to save the record #72

BuIlDaLiBlE opened this issue Jul 6, 2023 · 0 comments

Comments

@BuIlDaLiBlE
Copy link

BuIlDaLiBlE commented Jul 6, 2023

The following error occurs when trying to copy issues via the recurring task that is added to Sidekiq:

E, [2023-07-06T14:15:03.025403 #7314] ERROR -- : Failed to save the record
E, [2023-07-06T14:15:03.026311 #7314] ERROR -- : /usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/persistence.rb:308:in `save!'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/validations.rb:52:in `save!'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/transactions.rb:315:in `block in save!'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/transactions.rb:212:in `transaction'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/transactions.rb:315:in `save!'
/usr/local/rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/suppressor.rb:48:in `save!'
/www/redmine/plugins/redmine_recurring_tasks/app/models/recurring_task.rb:141:in `tap'
/www/redmine/plugins/redmine_recurring_tasks/app/models/recurring_task.rb:141:in `copy_issue'
/www/redmine/plugins/redmine_recurring_tasks/app/models/recurring_task.rb:147:in `execute'
/www/redmine/plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_checker.rb:16:in `block in call'
/www/redmine/plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_checker.rb:14:in `each'
/www/redmine/plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_checker.rb:14:in `call'
/www/redmine/config/initializers/40-recurring_tasks.rb:6:in `perform'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:192:in `execute_job'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/usr/local/rvm/gems/ruby-2.7.8/bundler/gems/sidekiq-failures-2b30cb1c87ce/lib/sidekiq/failures/middleware.rb:9:in `call'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:164:in `block in process'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/job_retry.rb:109:in `local'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/rails.rb:43:in `block in call'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/execution_wrapper.rb:90:in `wrap'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/reloader.rb:73:in `block in wrap'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/execution_wrapper.rb:90:in `wrap'
/usr/local/rvm/gems/ruby-2.7.8/gems/activesupport-5.2.8.1/lib/active_support/reloader.rb:72:in `wrap'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/rails.rb:42:in `call'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:250:in `stats'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/job_logger.rb:8:in `call'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/job_retry.rb:74:in `global'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:125:in `block in dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/logging.rb:48:in `with_context'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:124:in `dispatch'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:163:in `process'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:83:in `process_one'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/processor.rb:71:in `run'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/util.rb:16:in `watchdog'
/usr/local/rvm/gems/ruby-2.7.8/gems/sidekiq-5.2.10/lib/sidekiq/util.rb:25:in `block in safe_thread'

System info: Linux 4.19.0-17-amd64 #1 SMP Debian 4.19.194-1 (2021-06-10) x86_64 GNU/Linux

Environment:
  Redmine version                4.2.10.stable
  Ruby version                   2.7.8-p225 (2023-03-30) [x86_64-linux]
  Rails version                  5.2.8.1
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.20.1
  Filesystem                     
Redmine plugins:
  additional_tags                1.0.3
  additionals                    3.0.3
  clipboard_image_paste          1.13
  redmine_2chat                  0.4.0
  redmine_bots                   0.5.0
  redmine_contacts               4.3.4
  redmine_contacts_helpdesk      4.1.10
  redmine_custom_workflows       2.0.9
  redmine_hrm                    3.0.3
  redmine_intouch                1.6.0
  redmine_issue_templates        1.1.0
  redmine_lightbox2              0.5.1
  redmine_more_previews          5.0.8
  redmine_recurring_tasks        0.3.4
  redmine_reporting              3.0.3
  redmine_sidekiq                2.1.0
  redmine_toggl                  1.1.0

UPD: Sometimes the error doesn't show up in the logs but no issues are created anyway.
UPD2: Seems like running the cron job under root user works fine, but under redmine it does not, very weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant