[CLOSE] ERROR WHEN MIGRATING TO ZAMMADv5

Greetings, I have a new server where I install zammad v5 and where I have the backup of my previous server v4, when testing that the new installation works well, it makes a backup of the current system and everything works fine, then I copy my backup zammad v4 to folder /var/tmp/zammad_backup with permissions of zammad: zammad, so by running zammad run rails c I can see the current users:

irb(main):002:0> User.find(2)
=> #<User id: 2, organization_id: 1, login: "nicole.braun@zammad.org", firstname: "Nicole", lastname: "Braun", email: "nicole.braun@zammad.org", image: nil, image_source: nil, web: "", password: nil, phone: "", fax: "", mobile: "", department: "", street: "", zip: "", city: "", country: "", address: "", vip: false, verified: false, active: true, note: "", last_login: nil, source: nil, login_failed: 0, out_of_office: false, out_of_office_start_at: nil, out_of_office_end_at: nil, out_of_office_replacement_id: nil, preferences: {"tickets_closed"=>0, "tickets_open"=>1}, updated_by_id: 2, created_by_id: 1, created_at: "2021-11-04 16:33:54", updated_at: "2021-11-04 16:42:42">
irb(main):003:0> User.find(3)
=> #<User id: 3, organization_id: nil, login: "klaus.salazar@gsperu.pe", firstname: "Klaus", lastname: "Salazar", email: "klaus.salazar@gsperu.pe", image: nil, image_source: nil, web: "", password: "$argon2id$v=19$m=65536,t=2,p=1$1kIHlVmXJ+e8gz0nvHK...", phone: "", fax: "", mobile: "", department: nil, street: "", zip: "", city: "", country: "", address: nil, vip: false, verified: false, active: true, note: "", last_login: "2021-11-04 16:46:16", source: nil, login_failed: 0, out_of_office: false, out_of_office_start_at: nil, out_of_office_end_at: nil, out_of_office_replacement_id: nil, preferences: {"notification_config"=>{"matrix"=>{"create"=>{"criteria"=>{"owned_by_me"=>true, "owned_by_nobody"=>true, "subscribed"=>true, "no"=>false}, "channel"=>{"email"=>true, "online"=>true}}, "update"=>{"criteria"=>{"owned_by_me"=>true, "owned_by_nobody"=>true, "subscribed"=>true, "no"=>false}, "channel"=>{"email"=>true, "online"=>true}}, "reminder_reached"=>{"criteria"=>{"owned_by_me"=>true, "owned_by_nobody"=>false, "subscribed"=>false, "no"=>false}, "channel"=>{"email"=>true, "online"=>true}}, "escalation"=>{"criteria"=>{"owned_by_me"=>true, "owned_by_nobody"=>false, "subscribed"=>false, "no"=>false}, "channel"=>{"email"=>true, "online"=>true}}}}, "locale"=>"es-es", "intro"=>true}, updated_by_id: 3, created_by_id: 1, created_at: "2021-11-04 16:46:11", updated_at: "2021-11-04 16:46:53">
irb(main):004:0> User.find(4)
Traceback (most recent call last):
        1: from (irb):4
ActiveRecord::RecordNotFound (Couldn't find User with 'id'=4)

Then when I log in as a zammad user I perform the restore with zammad_restore.sh 20210924114632 then when I start at first I see that it indicates a hostname (adminsoc) that is not the current one, then it asks for a password and I put the password of my user with privileges and still it continues showing error

DB date: 20211104115529
# Stopping Zammad
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to stop 'zammad.service'.
Authenticating as: Ubuntu (adminsoc)
Password: 
==== AUTHENTICATION COMPLETE ===
# Checking requirements
# ... Dropping current database zammad
rake aborted!
NoMethodError: undefined method `websocket_session_store' for #<Rails::Application::Configuration:0x000055d9f7c05158>

When trying to access the web panel I get the following error message:

image

So I try again the command zammad run rails c but this time it shows problems so I understand that ruby is not working correctly

zammad run rails c
Traceback (most recent call last):
	81: from /opt/zammad/bin/rails:9:in `<main>'
	80: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	79: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	78: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'

I can also see in the log /var/log/nginx/zammad.error.log the following error message:

2021/11/04 12:49:28 [error] 24627#24627: *242 connect() failed (111: Connection refused) while connecting to upstream, client: 200.121.250.39, server: helpdesk.gsperu.pe, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "helpdesk.gsperu.pe"

Also when i try to access on psql appearme this error:

zammad@hds:~$ psql 
psql: error: FATAL:  database "zammad" does not exist

Please need help to solve these problems.

Hi, somebody can help me for resolve this problem, i can migarte all mi database to my new Zammad and a cause for this update i lose my system helpdesk.

Well, apparently this is a problem with version 5 and how a backup made by the same script imports, I have tried all the methods and none worked and it cannot be imported correctly, it is worth mentioning zammad uses postgresql 12.

One last test I did was to install postgresql 13 with pgadmin4 on windows and even though it came up with some problems I could see the content of the tables; So I remotely connected to the Zammad server on Ubuntu but when restoring the psql file the server started to fail in the connection.


image

The only solution is to start from 0 and lose all the information, so the only recommendation is DO NOT TRUST THE UPDATES and verify that the backup generated by the script has been performed correctly because it is not so reliable

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