Infos:
- Used Zammad version: 6.2
- Used Zammad installation type: (source, package, docker-compose, …) package
- Operating system: Ubuntu
- Browser + version: Chrome
Expected behavior:
Mails can be processed - instead i have 21 Mails which are not processable.
Actual behavior:
21 unprocessed mails - if i run
zammad run rails r ‘Channel::EmailParser.process_unprocessable_mails’
it fails with the following error:
"ERROR: Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/3322dc6124d710185d6bb142583459c8.eml, please create an issue at https://github.com/zammad/zammad/issues"
"ERROR: #<ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block\n>"
/opt/zammad/app/models/channel/email_parser.rb:140:in `rescue in process': #<ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block (RuntimeError)
Postgresql Logs:
[2024-02-15 10:44:50.461 UTC [4127] zammad@zammad ERROR: insert or update on table "tickets" violates foreign key constraint "fk_rails_5685ed71b0"
2024-02-15 10:44:50.461 UTC [4127] zammad@zammad DETAIL: Key (customer_id)=(0) is not present in table "users".
2024-02-15 10:44:50.461 UTC [4127] zammad@zammad STATEMENT: UPDATE "tickets" SET "state_id" = $1, "title" = $2, "customer_id" = $3, "updated_by_id" = $4, "updated_at" = $5 WHERE "tickets"."id" = $6
2024-02-15 10:44:50.462 UTC [4127] zammad@zammad ERROR: current transaction is aborted, commands ignored until end of transaction block
2024-02-15 10:44:50.462 UTC [4127] zammad@zammad STATEMENT: SELECT "settings".* FROM "settings" WHERE "settings"."area" = $1 ORDER BY "settings"."name" ASC
2024-02-15 10:44:50.463 UTC [4127] zammad@zammad ERROR: current transaction is aborted, commands ignored until end of transaction block
2024-02-15 10:44:50.463 UTC [4127] 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,
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
Steps to reproduce the behavior:
Rerun process Mails
Anybody has an idea how to fix this issue?