Emails not processing

Infos:

  • Used Zammad version: 6.1.0-1699735608.4747590e.jammy
  • Used Zammad installation type: (source, package, docker-compose, …) package
  • Operating system: Ubuntu 22.04.3 LTS
  • Browser + version: /

Expected behavior:

  • Mails should process, even after failing

Actual behavior:

  • No more mails could be processed between November 27 and 30. A look at the logs showed that it was perhaps a bug? Maybe someone has an idea where I can look further?

zcat /var/log/zammad/production.log.4.gz | grep "ERROR"
E, [2023-11-27T06:28:40.312188#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:28:40.312240#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:28:50.377017#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:28:50.380649#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:00.442696#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:00.442749#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:10.512118#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:10.512168#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:20.575739#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:20.575794#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:30.636709#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:30.636761#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:40.703195#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:40.703268#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:29:50.766725#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:29:50.768687#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:30:00.839835#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:30:00.839906#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:30:10.899987#768-192087520] ERROR -- : thread_client 1050800 exited with error #<ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column tickets.08_taa_tre does not exist
E, [2023-11-27T06:30:10.900044#768-192087520] ERROR -- : /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
E, [2023-11-27T06:34:27.666067#764-7075780] ERROR -- : PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_email_addresses_on_email"
E, [2023-11-27T06:34:39.996643#764-7148680] ERROR -- : PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_email_addresses_on_email"
E, [2023-11-27T09:13:30.464142#766578-168180] ERROR -- : Ticket::Selector.get->InvalidCondition: Invalid condition pre_condition nil {:name=>"ticket.number", :operator=>"contains", :value=>""}!
E, [2023-11-27T09:13:31.099645#766578-158540] ERROR -- : Ticket::Selector.get->InvalidCondition: Invalid condition pre_condition nil {:name=>"ticket.number", :operator=>"contains", :value=>""}!
E, [2023-11-27T09:13:35.595939#766578-151000] ERROR -- : Ticket::Selector.get->InvalidCondition: Invalid condition pre_condition nil {:name=>"ticket.group_id", :operator=>"is", :value=>[]}!
E, [2023-11-27T09:13:37.248061#766578-152820] ERROR -- : Ticket::Selector.get->InvalidCondition: Invalid condition pre_condition nil {:name=>"ticket.group_id", :operator=>"is not", :value=>[]}!
E, [2023-11-27T12:37:52.861615#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/44b16f79165565ade8da451be88752de.eml, please create an issue at https://github.com/zammad/zammad/issues
E, [2023-11-27T12:37:52.861647#766586-65120] ERROR -- : PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
E, [2023-11-27T13:28:37.360711#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/d56b6cde6e982a23660a39148001289f.eml, please create an issue at https://github.com/zammad/zammad/issues
E, [2023-11-27T13:28:37.360739#766586-65120] ERROR -- : PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
E, [2023-11-27T13:28:37.630748#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/aae3b69d18905b0f49e8a6696a299819.eml, please create an issue at https://github.com/zammad/zammad/issues
E, [2023-11-27T13:28:37.630778#766586-65120] ERROR -- : PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block
E, [2023-11-27T15:30:36.054401#766586-5330400] ERROR -- : Unable to process DELETE request to elasticsearch URL 'http://localhost:9200/zammad_production_user/_doc/210'. Check the response and payload for detailed information:
E, [2023-11-27T12:37:52.861615#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/44b16f791655651de80a451be88752de.eml, please create an issue at https://github.com/zammad/zammad/issues
E, [2023-11-27T13:28:37.360711#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/d56b6cde6e902a20660a39148001289f.eml, please create an issue at https://github.com/zammad/zammad/issues
E, [2023-11-27T13:28:37.630748#766586-65120] ERROR -- : Can't process email, you will find it for bug reporting under /opt/zammad/var/spool/unprocessable_mail/aae3b69d18900b0f49e8a6696a290819.eml, please create an issue at https://github.com/zammad/zammad/issues

postgresql-14-main.log:


2023-11-30 13:29:30.325 UTC [2051095] zammad@zammad ERROR:  current transaction is aborted, commands ignored until end of transaction block
2023-11-30 13:29:30.325 UTC [2051095] zammad@zammad STATEMENT:  DEALLOCATE a1
2023-11-30 13:29:30.325 UTC [2051095] zammad@zammad ERROR:  current transaction is aborted, commands ignored until end of transaction block
2023-11-30 13:29:30.325 UTC [2051095] zammad@zammad STATEMENT:  DEALLOCATE a2
2023-11-30 14:09:46.211 UTC [766747] zammad@zammad ERROR:  cached plan must not change result type
2023-11-30 14:09:46.211 UTC [766747] zammad@zammad STATEMENT:  SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" IS NULL LIMIT $1
2023-11-30 14:09:46.212 UTC [766747] zammad@zammad ERROR:  current transaction is aborted, commands ignored until end of transaction block
2023-11-30 14:09:46.212 UTC [766747] zammad@zammad STATEMENT:  SELECT "settings".* FROM "settings" WHERE "settings"."area" = $1 ORDER BY "settings"."name" ASC

After a restart of postgresql and zammad it worked again. But now I would like to know what could have caused this. Maybe should i create an issue?

Steps to reproduce the behavior:

*Cant. It just appeared and after service resatrt it worked again.

You’re missing database migrations. You can hardly expect Zammad to go on without issues.

Ensure that within the admin settings > Objects the didn’t forget the “Update database” button. Hit it if it’s there. Restart Zammad after. As safety measure, also run zammad run rake db:migrate

After that run zammad run rails r 'Channel::EmailParser.process_unprocessable_mails' to import the mails Zammad couldn’t import

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.