Infos:
- Used Zammad version: 6.4.1-1733988781.12d4e0de.noble
- Used Zammad installation type: Package
- Operating system: Ubuntu 24.04
- Browser + version: unrelated
Expected behavior:
- Import E-Mails after Upgrade to 6.4.1 from 6.3.0
Actual behavior:
Steps to reproduce the behavior:
- Upgrade and the Problem exists.
Our Issue:
We are trying to reprocess E-Mails but get the following error with every E-Mail:
ERROR: Can't reprocess failed email '269'. This was attempt # 25.
ERROR: #<ActiveRecord::StatementInvalid:"PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block\n">
ERROR: Can't reprocess failed email '270'. This was attempt # 21.
ERROR: #<ActiveRecord::StatementInvalid:"PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block\n">
ERROR: Can't reprocess failed email '271'. This was attempt # 21.
ERROR: #<ActiveRecord::StatementInvalid:"PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block\n">
No email files could be imported and reprocessed successfully.
Done.
From Postgres log:
2024-12-19 15:08:30.642 UTC [8345] zammad@zammad ERROR: null value in column "tag_item_id" of relation "tags" violates not-null constraint
2024-12-19 15:08:30.642 UTC [8345] zammad@zammad DETAIL: Failing row contains (71005, null, 1, 188564, 1, 2024-12-19 15:08:30.640523, 2024-12-19 15:08:30.64).
2024-12-19 15:08:30.642 UTC [8345] zammad@zammad STATEMENT: INSERT INTO "tags" ("tag_item_id", "tag_object_id", "o_id", "created_by_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"
2024-12-19 15:08:30.646 UTC [8345] zammad@zammad ERROR: current transaction is aborted, commands ignored until end of transaction block
2024-12-19 15:08:30.646 UTC [8345] zammad@zammad STATEMENT: SELECT "settings".* FROM "settings" WHERE "settings"."area" = $1 ORDER BY "settings"."name" ASC
2024-12-19 15:08:30.665 UTC [8345] zammad@zammad ERROR: current transaction is aborted, commands ignored until end of transaction block
2024-12-19 15:08:30.665 UTC [8345] zammad@zammad STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment,
attidentity AS identity,
attgenerated as attgenerated
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"delayed_jobs"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
We already tried the following:
restarting zammad service, Postgresql, and the whole Server.
Re-Running the Postinstall steps:
/opt/zammad/contrib/packager.io/postinstall.sh
Running a db migration:
zammad run rake db:migrate
But still this error persists - no E-Mail can be reprocessed. But some other E-Mails are imported normally.
Here is the production.log for the reprocessing:
E, [2024-12-20T08:42:56.677292#31106-7100] ERROR -- : PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
(ActiveRecord::StatementInvalid)
lib/transaction_dispatcher.rb:33:in `perform'
lib/transaction_dispatcher.rb:17:in `commit'
app/models/transaction.rb:51:in `finish_transaction'
app/models/transaction.rb:19:in `ensure in block in execute'
app/models/transaction.rb:19:in `block in execute'
app/models/transaction.rb:14:in `execute'
app/models/transaction.rb:26:in `execute'
app/models/ticket.rb:484:in `perform_triggers'
app/models/transaction/trigger.rb:40:in `perform'
lib/transaction_dispatcher.rb:61:in `execute_single_backend'
lib/transaction_dispatcher.rb:47:in `block (3 levels) in perform'
lib/transaction_dispatcher.rb:46:in `each'
lib/transaction_dispatcher.rb:46:in `block (2 levels) in perform'
lib/transaction_dispatcher.rb:43:in `each_value'
lib/transaction_dispatcher.rb:43:in `block in perform'
lib/transaction_dispatcher.rb:42:in `each_value'
lib/transaction_dispatcher.rb:42:in `perform'
lib/transaction_dispatcher.rb:17:in `commit'
app/models/transaction.rb:51:in `finish_transaction'
app/models/transaction.rb:19:in `block in execute'
app/models/transaction.rb:14:in `execute'
app/models/transaction.rb:26:in `execute'
app/models/channel/email_parser.rb:200:in `_process'
app/models/channel/email_parser.rb:152:in `block in process_with_timeout'
app/models/channel/email_parser.rb:151:in `process_with_timeout'
app/models/failed_email.rb:5:in `reprocess'
app/models/failed_email.rb:100:in `import'
app/models/failed_email.rb:84:in `block in import_all'
app/models/failed_email.rb:81:in `each_child'
app/models/failed_email.rb:81:in `each'
app/models/failed_email.rb:81:in `filter_map'
app/models/failed_email.rb:81:in `import_all'
lib/tasks/zammad/email_parser/failed_email/import.rb:27:in `process_dir'
lib/tasks/zammad/email_parser/failed_email/base.rb:16:in `process_given_dir_or_file'
lib/tasks/zammad/email_parser/failed_email/import.rb:23:in `task_handler'
lib/tasks/zammad/command.rb:44:in `run_task'
lib/tasks/zammad/command.rb:38:in `block in register_rake_task'
E, [2024-12-20T08:42:56.683927#31106-7100] ERROR -- : Can't reprocess failed email '271'. This was attempt # 28.
E, [2024-12-20T08:42:56.683968#31106-7100] ERROR -- : PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
(ActiveRecord::StatementInvalid)
lib/transaction_dispatcher.rb:51:in `block (2 levels) in perform'
lib/transaction_dispatcher.rb:43:in `each_value'
lib/transaction_dispatcher.rb:43:in `block in perform'
lib/transaction_dispatcher.rb:42:in `each_value'
lib/transaction_dispatcher.rb:42:in `perform'
lib/transaction_dispatcher.rb:17:in `commit'
app/models/transaction.rb:51:in `finish_transaction'
app/models/transaction.rb:19:in `block in execute'
app/models/transaction.rb:14:in `execute'
app/models/transaction.rb:26:in `execute'
app/models/channel/email_parser.rb:200:in `_process'
app/models/channel/email_parser.rb:152:in `block in process_with_timeout'
app/models/channel/email_parser.rb:151:in `process_with_timeout'
app/models/failed_email.rb:5:in `reprocess'
app/models/failed_email.rb:100:in `import'
app/models/failed_email.rb:84:in `block in import_all'
app/models/failed_email.rb:81:in `each_child'
app/models/failed_email.rb:81:in `each'
app/models/failed_email.rb:81:in `filter_map'
app/models/failed_email.rb:81:in `import_all'
lib/tasks/zammad/email_parser/failed_email/import.rb:27:in `process_dir'
lib/tasks/zammad/email_parser/failed_email/base.rb:16:in `process_given_dir_or_file'
lib/tasks/zammad/email_parser/failed_email/import.rb:23:in `task_handler'
lib/tasks/zammad/command.rb:44:in `run_task'
lib/tasks/zammad/command.rb:38:in `block in register_rake_task'