we faced an issue ERROR – : Can’t use Channel::Driver::Imap: #<Net::IMAP::NoResponseError: LOGIN failed.> so we decided to upgrade it.after upgrading even login too not woking, we tried forgot password but in logs **ERROR : relation ‘activity_jobs_lock’ doesn’t exists coming.
zammad run rake db:migrate tried it but stuck here
== 20190408000001 Issue2541FixNotificationEmailWithoutBody: migrating =========
StandardError: An error has occurred, this and all later migrations canceled:
Validation failed: The required ‘perform’ value for notification.email, subject is missing!
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/validations.rb:80:in raise_validation_error' /opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/validations.rb:53:in save!’
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/transactions.rb:302:in block in save!' /opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/transactions.rb:354:in block in with_transaction_returning_status’
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in transaction' /opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/transactions.rb:350:in with_transaction_returning_status’
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/transactions.rb:302:in save!' /opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/suppressor.rb:48:in save!’
/opt/zammad/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb:24:in block (3 levels) in up' /opt/zammad/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb:19:in each’
/opt/zammad/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb:19:in `block (2 levels) in up’
My guess would be that you ran into these errors because of not following the upgrade path from major release to major release. I’m not sure what the best way to recover from this would be, but a safe one I could think of is to if you have a backup from before the upgrade:
first of all back up everything in it’s current state,
downgrade the Zammad package to the old version
load the old backup of the old version
then upgrade Zammad as per the upgrade path
If you don’t have an old backup, maybe doing that above steps might work still without loading one, albeit I have no idea if there would be issues with that and you definitely shouldn’t try without backing up the current state.
This is the following part that should nuke you.
This means you want to find all Jobs and Triggers which have an empty email body (email notification in action section), note down what they do and then delete them. This should remove the blocking.
As you didn’t upgrade step by step but in bulk, you may run into other issues.
Restoring a backup would be the best option at this point. Maybe this is also a lesson to not wait roughly 3 years with Updates on a system relevant service you run. You have dozens of security issues on the path to 5.2.
i tried to restore the backup but i ended up in another error
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/callbacks.rb:25:in on_file_autoloaded': expected file /opt/zammad/app/controllers/sessions/collection_base.rb to define constant Sessions::CollectionBase, but didn't (Zeitwerk::NameError) from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:28:in require’
from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in const_get' from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in cget’
from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:239:in block (2 levels) in eager_load' from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:41:in block in ls’
from /opt/zammad/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:27:in `each’
thanks for the answer using this i have managed to update the latest version 5.1 and solved the login issue also
but this issue remains the same ERROR – : Can’t use Channel::Driver::Imap: #<Net::IMAP::NoResponseError: LOGIN failed.>
Can you pls help to solve this…
this is the log
I, [2022-10-20T13:00:23.634369 #3144-182340] INFO – : fetching imap (Working... port=993,ssl=true,starttls=false,folder=INBOX,keep_on_server=false,auth_type=LOGIN)
E, [2022-10-20T13:00:31.506239 #3144-182340] ERROR – : Can’t use Channel::Driver::Imap: #<Net::IMAP::NoResponseError: LOGIN failed.>
E, [2022-10-20T13:00:31.506408 #3144-182340] ERROR – : LOGIN failed. (Net::IMAP::NoResponseError)
app/models/channel/driver/imap.rb:126:in `block in fetch’
This is all there’s to say. Zammad provides the exact error message that comes from your email server.
Microsoft has been telling their users for over 2 years that they’re going to cancel basic authentication (username and password). The final deadline was this year with the 1st October.