aerobase-ctl reconfigure Error executing action `run` on resource 'execute[/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8]
Description
I install aerobase and aerobase-iam (2.4.0-1) , install java-1.8.0-openjdk
and test sudo aerobase-ctl reconfigure and got this ERROR.
Environment
link/opt/aerobase/embedded/etc/90-omnibus-aerobase.conf action create (up to date)
execute[sysctl] action nothing (skipped due to action :nothing)
execute/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 action run
================================================================================
Error executing action `run` on resource 'execute/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
Begin output of /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "aerobase-sql".
This user must also own the server process.
STDERR: initdb: invalid locale settings; check LANG and LC_* environment variables
End output of /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 ----
Ran /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 returned 1
Resource Declaration:
---------------------
In /opt/aerobase/embedded/cookbooks/cache/cookbooks/aerobase/recipes/postgresql.rb
85: execute "#{install_dir}/embedded/bin/initdb -D #{postgresql_data_dir} -E UTF8" do
86: not_if { File.exists?(File.join(postgresql_data_dir, "PG_VERSION")) }
87: user postgresql_user
88: if os_helper.is_windows?
89: password postgresql_password
90: end
91: end
Compiled Resource:
------------------
Declared in /opt/aerobase/embedded/cookbooks/cache/cookbooks/aerobase/recipes/postgresql.rb:85:in `from_file'
execute("/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8") do
action [:run]
default_guard_interpreter :execute
command "/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8"
backup 5
declared_type :execute
cookbook_name "aerobase"
recipe_name "postgresql"
domain nil
user "aerobase-sql"
not_if { #code block }
end
System Info:
------------
chef_version=14.8.12
platform=centos
platform_version=8.0.1905
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/opt/aerobase/embedded/bin/chef-client
executable=/opt/aerobase/embedded/bin/chef-client
Running handlers:
[2019-12-26T12:55:01+07:00] ERROR: Running exception handlers
Running handlers complete
[2019-12-26T12:55:01+07:00] ERROR: Exception handlers complete
Chef Client failed. 5 resources updated in 14 seconds
[2019-12-26T12:55:01+07:00] FATAL: Stacktrace dumped to /opt/aerobase/embedded/cookbooks/cache/chef-stacktrace.out
[2019-12-26T12:55:01+07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-12-26T12:55:01+07:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute/opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 (aerobase:ostgresql line 85) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
Begin output of /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "aerobase-sql".
This user must also own the server process.
STDERR: initdb: invalid locale settings; check LANG and LC_* environment variables
End output of /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 ----
Ran /opt/aerobase/embedded/bin/initdb -D /var/opt/aerobase/postgresql/data -E UTF8 returned 1
Activity
Please attache the entire reconfigure log?
Thank you for your support and apologies for my late.
We used aerobase in centOS - 8 .
Now we can solved this issue by use the following code.
localectl set-locale LC_ALL=en_US.UTF-8
but we have a new issue for reconfigure
Error executing action `run` on resource 'ruby_block[restart_service]'
Error executing action `run` on resource 'execute[restart_aerobase-server_log_service]'
for details -----
Mixlib::ShellOut::ShellCommandFailed: execute[restart_aerobase-server_log_service] (aerobase::aerobase-server line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
--- Begin output of /opt/aerobase/embedded/bin/sv restart /opt/aerobase/sv/aerobase-server/log ----
STDOUT: timeout: run: /opt/aerobase/sv/aerobase-server/log: (pid 11364) 37s, got TERM
STDERR:
--- End output of /opt/aerobase/embedded/bin/sv restart /opt/aerobase/sv/aerobase-server/log ----
Ran /opt/aerobase/embedded/bin/sv restart /opt/aerobase/sv/aerobase-server/log returned 1
We will check this issue in this community ,but if you have completed this issue , please tell us.
Thank you and apologies again for unresponses.
- can we close this issue?
Issue is because of LANG and LC_* variables which are sometimes unset in the linux system, in aerobase installation we can set these variables.
Please refer to your distro docs on how to set these variables:
e.g debian based:
Once variables are set rerun
Â