Login not working invalid credentials after upgrading from 2.9 to 5.2

Infos:

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.

  • Used Zammad version: 2.9
  • Used Zammad installation type: package
  • Operating system: ubuntu 20.04
  • Browser + version: firefox 106

Expected behavior:

  • login should work normally

Actual behavior:

image

Steps to reproduce the behavior:

You followed the upgrade path and didn’t notice that at least one of these upgrades was not successful and threw errors on your console?

Try with zammad run rake db:migrate to re-run database migrations.
While you’re at it, use the following page to ensure you’re using supported dependencies:
https://docs.zammad.org/en/latest/prerequisites/software.html

zammad run rake db:migrate tried it but stuck here
== 20190408000001 Issue2541FixNotificationEmailWithoutBody: migrating =========
rake aborted!
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.

can you pls provide the link to see the downgrade process

even I cant find in a docs official link to upgrade Zammad as per the upgrade path

Downgrades are not supported and may even break things depending on how far OP goes back. This may cause even more serious damage than OP already has.

So as nobody cares to read and interpret error messages.
This is the file that’s failing:
https://github.com/zammad/zammad/blob/develop/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb

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.

1 Like

i tried to restore the backup but i ended up in another error

Updating translations…

/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’

Can you pls give me a procedure to install the same version zammad 2.9.0 again because am not able to find any docs for installing the same. then i will restore my backup in the version 2.9.0.

The add repository step here:
https://docs.zammad.org/en/latest/install/package.html#add-repository-and-install-zammad

and the information that every version also has a stable candidate on our packager, e.g. in 2.9 as your exact candidate in that case:

should help you through.
If not, please consider getting commercial support.

You burried yourself quite deep which is out of my scope on a community basis, sorry.

1 Like

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.>

image

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.

The only option you have is to switch to the Microsoft 365 channel.
https://admin-docs.zammad.org/en/latest/channels/microsoft365/index.html

I have configured the Microsoft 365 app but am not able to see the migrate now button email channel.

Then please read the documentation closely. The reason is documented.

i have found this

but when i try to change the host it throws login failed error, i used correct username and password.