Problem Installing ZAMMAD v5

Hi, i have a Ubuntu server 20.10 and here i try install the last version of zammad (v5) but when i configure the conect between Elasticsearch & Zammad with zammad run rails r “Setting.set(‘es_url’, ‘http://localhost:9200’)” how say in the documentation but apearme this error:

root@hds:~# zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
Traceback (most recent call last):
	52: from /opt/zammad/bin/rails:9:in `<main>'
	51: 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'
	50: 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'
	49: 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'
	48: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	47: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	46: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/commands.rb:18:in `<main>'
	45: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command.rb:46:in `invoke'
	44: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/base.rb:69:in `perform'
	43: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
	42: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
	41: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
	40: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/commands/runner/runner_command.rb:33:in `perform'
	39: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
	38: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/actions.rb:28:in `require_environment!'
	37: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application.rb:339:in `require_environment!'
	36: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:324:in `require'
	35: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:291:in `load_dependency'
	34: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:324:in `block in require'
	33: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	32: 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'
	31: 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'
	30: 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'
	29: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	28: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	27: from /opt/zammad/config/environment.rb:7:in `<main>'
	26: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application.rb:363:in `initialize!'
	25: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:60:in `run_initializers'
	24: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
	23: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
	22: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
	21: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `call'
	20: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `each'
	19: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
	18: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
	17: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	16: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
	15: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	14: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:32:in `run'
	13: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:32:in `instance_exec'
	12: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.4.1/lib/active_record/railtie.rb:198:in `block in <class:Railtie>'
	11: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
	10: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
	 9: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
	 8: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
	 7: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
	 6: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
	 5: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
	 4: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.4.1/lib/active_record/railtie.rb:200:in `block (2 levels) in <class:Railtie>'
	 3: from /opt/zammad/config/issue_2656_workaround_for_rails_issue_33600.rb:16:in `database_configuration'
	 2: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `database_configuration'
	 1: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `read'
/opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `read': Permission denied @ rb_sysopen - /opt/zammad/config/database.yml (Errno::EACCES)
	52: from /opt/zammad/bin/rails:9:in `<main>'
	51: 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'
	50: 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'
	49: 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'
	48: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	47: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	46: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/commands.rb:18:in `<main>'
	45: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command.rb:46:in `invoke'
	44: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/base.rb:69:in `perform'
	43: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
	42: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
	41: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
	40: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/commands/runner/runner_command.rb:33:in `perform'
	39: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
	38: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/command/actions.rb:28:in `require_environment!'
	37: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application.rb:339:in `require_environment!'
	36: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:324:in `require'
	35: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:291:in `load_dependency'
	34: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:324:in `block in require'
	33: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
	32: 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'
	31: 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'
	30: 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'
	29: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	28: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	27: from /opt/zammad/config/environment.rb:7:in `<main>'
	26: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application.rb:363:in `initialize!'
	25: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:60:in `run_initializers'
	24: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
	23: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
	22: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
	21: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `call'
	20: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:347:in `each'
	19: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
	18: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
	17: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	16: from /opt/zammad/vendor/ruby-2.7.4/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
	15: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
	14: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:32:in `run'
	13: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/initializable.rb:32:in `instance_exec'
	12: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.4.1/lib/active_record/railtie.rb:198:in `block in <class:Railtie>'
	11: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
	10: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
	 9: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
	 8: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
	 7: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
	 6: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
	 5: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
	 4: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.4.1/lib/active_record/railtie.rb:200:in `block (2 levels) in <class:Railtie>'
	 3: from /opt/zammad/config/issue_2656_workaround_for_rails_issue_33600.rb:16:in `database_configuration'
	 2: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `database_configuration'
	 1: from /opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `read'
/opt/zammad/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4.1/lib/rails/application/configuration.rb:228:in `read': Cannot load database configuration: (Errno::EACCES)
Permission denied @ rb_sysopen - /opt/zammad/config/database.yml

elasticsearch version 7.15.1
zammad version 5.0.2-1635862975.49759f0b.focal

You’ll want to fix that.
Permissions of your database.yml seem to be off.

Hi @MrGeneration but this permission is applyed by the installer of zammad, in this case what’s the permission that have this file databases.yml (in owner is zammad:zammad).

@MrGeneration in github appear the same message but here saying that the permission 644 allow to anybody can access to tha database, is this true?

Hello Klaus,

sorry but how about you have an actual look at the permissions being set in your system?
That would speed up and help a lot to determine the issue.

With a current stable installation your permission should be set to 600.
So much for the theory.

Hi @MrGeneration i’ll change to this value that you recommend and i’ll comment the results

Hi @MrGeneration i followed your recommendation:

Then i see that the permission is 600 but the user:group is root, i change this to zammad and work all right.

Just as small feedback as it appeared a second time and thus was fishy.
This is actually a bug and can be solved by a simple re-installation (over the existing one) or any upgrade installation. This is due a fixed issue that now revealed the way we worked.

Fix is undergoing.
See Package installation creates database.yml as `root` and thus breaks the installation until next update · Issue #3834 · zammad/zammad · GitHub

Hi @MrGeneration thanks for you help, well now i have other problem and is that i migrate my database backup to the new zammad but finnish as successfull but when i see the database in postgresql with command onlly see 2 users, i try restore the sql backup with command Postgreges, first login as zammad user and execute pg_dump -U zammad zammad < 20211030.psql and all work in the finish i see in the database but not appear my users only the 2 users from the new installation. Why this? please help me.

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