Closed picoroma closed 1 year ago
Additional info: ERROR FCO-00011 -->https://me.sap.com/notes/0001949033 Problem with running ./sapinst with sudo (./sapinst should be run as root)
It might be that the sapinst should be run as root
message is just a follow-up error of the error in step askMasterPwd
.
I suggest to check the following:
defaults/main.yml
did you configure in your playbook or inventory? In my recent tests of installing S/4HANA Foundation 2022, I used:
/tmp/ansible.aeqep4qmswpmconfig/inifile.params
(this is the sapinst inifile generated from the role variables) and see if you can find anything obviousI also suggest that you use the latest version of the collection (if not done already), now available as version 1.2.0 on Galaxy. Or, if you are using the collection directly from GitHub, get the latest bits - now also in the main tree.
The sap_swpm role now can be run with tags, for example to just create the inifile. You can then inspect the inifile and execute the sapinst command manually, or re-run the role after modifying the role variables to get the desired inifile contents.
# Product ID for New Installation
sap_swpm_product_catalog_id: NW_ABAP_OneHost:S4HANA2020.CORE.HDB.ABAP
# Software
sap_swpm_software_path: /software/S4HANA-2020_INST/kernel
sap_swpm_sapcar_path: /software/S4HANA-2020_INST/SAPCAR
sap_swpm_swpm_path: /software/S4HANA-2020_INST/SWPM
# NW Passwords
sap_swpm_master_password: "MYPSWD"
sap_swpm_ddic_000_password: "MYPSWD"
# HDB Passwords
sap_swpm_db_system_password: "MYPSWD"
sap_swpm_db_systemdb_password: "MYPSWD"
sap_swpm_db_schema_abap: "SAPHANADB"
sap_swpm_db_schema_abap_password: "MYPSWD"
sap_swpm_db_sidadm_password: "MYPSWD"
# NW Instance Parameters
sap_swpm_sid: S4H
sap_swpm_pas_instance_nr: "01"
sap_swpm_ascs_instance_nr: "02"
sap_swpm_ascs_instance_hostname: "{{ ansible_hostname }}"
sap_swpm_fqdn: "poc.cloud"
# HDB Instance Parameters
# For dual host installation, change the db_host to appropriate value
sap_swpm_db_host: "{{ ansible_hostname }}"
sap_swpm_db_sid: HDB
sap_swpm_db_instance_nr: "00"
-- inifile.params attached. P. inifile.params.txt
I have also another question. The EXPORT file necessary for every SAP S/4HANA Installation where should be placed ? In the documentation there is no mention to these files !
At very quick glance, password does not appear to meet complexity requirements and results in error. SAP SWPM error messages are not very clear when using SAP SWPM Unattended Mode.
For the other question, please follow GH etiquette and raise another GH Issue for an error or GH Discussion for was code logic questions.
I have tryed even with a more long password "Abcdefgh01" (9 char + 2 number) but the error remain the same
If I recall, a special character is required. I use NewPass$321
when calling this Ansible Collection as part of the Terraform Templates for SAP. You can see the Ansible Playbook and extravars file which is used, in this directory - https://github.com/sap-linuxlab/terraform.modules_for_sap/tree/main/all/ansible_sap_s4hana_install
When I am back from vacation I will be able to investigate further, it the above password does not work
Even adding a special char (!) to my pswd I still have error. OK. I will wait for your feedback. THX for now
The installation is indeed picky about the password, but when I used this role. I remember that I got strange errors, that were caused by a scrambled /etc/hosts file. This is a known issue and we are working on this.
Can you try setting the password Sean's suggestion make sure your /etc/hosts is configured correctly (with the hana-Db and the app server and that this matches your DNS setting) or your DNS is configured for proper resolution prior to running the role.
Then please add sap_swpm_update_etchosts: false
to your parameters and try again.
I know it doesn't sound related, but that causes the installer to fail with the password, because it resolves to a wrong host.
FYI - The installation of NW_ABAP_OneHost:S4HANA2022.FNDN.HDB.ABAP succeeds when using:
sap_swpm_master_password: "Abcdefgh01"
sap_swpm_ddic_000_password: "Abcdefgh01"
sap_swpm_db_system_password: "Abcdefgh01"
sap_swpm_db_systemdb_password: "Abcdefgh01"
sap_swpm_db_schema_abap_password: "Abcdefgh01"
sap_swpm_db_sidadm_password: "Abcdefgh01"
So at least for this version, the password is not the problem.
The installation is indeed picky about the password, but when I used this role. I remember that I got strange errors, that were caused by a scrambled /etc/hosts file. This is a known issue and we are working on this.
Can you try setting the password Sean's suggestion make sure your /etc/hosts is configured correctly (with the hana-Db and the app server and that this matches your DNS setting) or your DNS is configured for proper resolution prior to running the role. Then please add
sap_swpm_update_etchosts: false
to your parameters and try again.I know it doesn't sound related, but that causes the installer to fail with the password, because it resolves to a wrong host.
My /etc/hosts looks like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
# host entries by LaunchWizard
172.30.2.32 saphana1.poc.cloud saphana1
I think is correct. Don't you?
This looks ok, from the SWPM role perspective, but the s4hana server should be in there as well. Did you run sap_general_preconfigure and sap_netweaver_preconfigure roles before running sap_swpm?
Installation finished with no error. THX
One question. Due to fact that I'm testing and try to install several time. Is there a way to UNINSTALL the S/4HANA using the role swpm ? If yes - HOW?
Can you please let us know by (or after) which action you were able to finish the installation?
Note that for a system on which both NetWeaver and HANA are running, the tuned profile sap-hana
needs to be activated, so the order of the preconfigure roles should be:
sap_general_preconfigure
sap_netweaver_preconfigure
sap_hana_preconfigure
For uninstalling the S/4HANA NetWeaver components, it should be possible to re-use an inifile from an interactive sapinst session where you chose the uninstall option and then use this inifile in the role sap_swpm. For uninstalling the SAP HANA database , I am always using a playbook which contains mainly the following task:
- name: "Force uninstall SAP HANA '{{ sap_hana_install_sid }}'" # noqa command-instead-of-shell # noqa no-changed-when
ansible.builtin.command: "{{ sap_hana_install_install_path }}/{{ sap_hana_install_sid }}/hdblcm/hdblcm --uninstall --components=all -b"
register: command_output
P.S. Please consider using uppercase only where necessary (see also this Wikipedia page). For emphasizing words, you could use the bold formatting option in the GUI, for example.
I've never had issue with /etc/hosts
causing unusual errors with SAP SWPM other than an immediate crash (when SAP SWPM cannot start it's web host engine), and such errors are very infrastructure environment specific (admins usually alter this file in OS Images) and difficult to diagnose. Particularly given this is a OneHost sample and the provided hosts file above, it is unlikely to be the error source.
The sample files are Role-specific, and take the literal meaning of the word "sample". They will work but they are meant to be used together with other Roles (in a logical sequence, e.g. don't install before you have the install media 😄). See below a test execution I did with a full Ansible Playbook for SAP installation file. It would be good to understand what you had issue with, in case the sample files need a fix or documentation needs to be clearer.
As Bernd highlights, any SAP SWPM activity can work with the sap_swpm
Ansible Role. Uninstallation is not something that a sample should be provided for, in case of accidents by new users 🙂 Again, such a query belongs in a new GH Issue.
TL;DR - please provide what fixed your execution of sap_swpm, review example below, and close the GH Issue if you are happy to do so
sap_swpm
Ansible Role with 'Default mode'---
- name: Ansible Playbook execution for SAP S/4HANA installation from source media
hosts: all
become: true
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
tasks:
- name: Update etc hosts
lineinfile:
dest: /etc/hosts
line: "{{ ansible_default_ipv4.address }}\t{{ ansible_hostname }}.{{ ansible_domain }}\t{{ ansible_hostname }}"
state: present
become: yes
# - name: Execute Ansible Role sap_install_media_detect
# include_role:
# name: { role: community.sap_install.sap_install_media_detect }
- name: Execute Ansible Role sap_general_preconfigure
include_role:
name: { role: community.sap_install.sap_general_preconfigure }
- name: Execute Ansible Role sap_netweaver_preconfigure
include_role:
name: { role: community.sap_install.sap_netweaver_preconfigure }
- name: Execute Ansible Role sap_hana_preconfigure
include_role:
name: { role: community.sap_install.sap_hana_preconfigure }
- name: Execute Ansible Role sap_hana_install
include_role:
name: { role: community.sap_install.sap_hana_install }
- name: Execute Ansible Role sap_swpm with SAP S/4HANA One Host installation from source media
include_role:
name: { role: community.sap_install.sap_swpm }
vars:
# ---- Mandatory parameters : Ansible Defaults ---- #
# Default Ansible Facts populate into default variables for all Ansible Roles
sap_hostname: "{{ ansible_hostname }}"
sap_domain: "{{ ansible_domain }}"
sap_ip: "{{ ansible_default_ipv4.address }}"
# ---- Mandatory parameters : Preconfigure OS for SAP Software ---- #
# Configuration of Ansible Roles for preconfigure SAP (general, hana, netweaver)
sap_general_preconfigure_modify_etc_hosts: false
sap_general_preconfigure_reboot_ok: no
sap_general_preconfigure_fail_if_reboot_required: no
sap_hana_preconfigure_reboot_ok: yes
sap_hana_preconfigure_fail_if_reboot_required: no
sap_hana_preconfigure_update: yes
sap_hana_update_etchosts: yes
sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no
# ------ Mandatory parameters : SAP HANA installation ------ #
# Install directory of SAP HANA must contain:
# 1. IMDB_SERVER*SAR file
# 2. IMDB_*SAR files for all SAP HANA components to install
# 3. SAPCAR executable
sap_hana_install_software_directory: "/software/sap_hana"
# SAP HANA master password
sap_hana_install_use_master_password: "y"
sap_hana_install_master_password: "NewPass$321"
# SAP HANA database server instance details
sap_hana_install_sid: "H01"
sap_hana_install_instance_number: "10"
# ------ Optional parameters : SAP HANA installation ------ #
# Update hosts file
sap_hana_install_update_etchosts: 'false'
# ------ Mandatory parameters : SAP SWPM installation using Default mode of the Ansible Role ------ #
# sap_swpm Ansible Role mode
sap_swpm_ansible_role_mode: default
# sap_swpm Default mode generate inifile.params
sap_swpm_inifile_list:
- swpm_installation_media
- swpm_installation_media_swpm2_hana
- credentials
- credentials_hana
- db_config_hana
- db_connection_nw_hana
- nw_config_other
- nw_config_central_services_abap
- nw_config_primary_application_server_instance
- nw_config_ports
- sap_os_linux_user
# Product ID for New Installation
sap_swpm_product_catalog_id: NW_ABAP_OneHost:S4HANA2022.CORE.HDB.ABAP
# Software
sap_swpm_sapcar_path: /software
sap_swpm_swpm_path: /software
sap_swpm_software_path: /software
# NW Passwords
sap_swpm_master_password: "NewPass$321"
sap_swpm_ddic_000_password: "NewPass$321"
# HDB Passwords
sap_swpm_db_system_password: "NewPass$321"
sap_swpm_db_systemdb_password: "NewPass$321"
sap_swpm_db_schema_abap_password: "NewPass$321"
sap_swpm_db_sidadm_password: "NewPass$321"
# NW Instance Parameters
sap_swpm_sid: "S01"
sap_swpm_pas_instance_nr: "00"
sap_swpm_ascs_instance_nr: "01"
sap_swpm_ascs_instance_hostname: "{{ ansible_hostname }}"
sap_swpm_fqdn: "poc.cloud"
# HDB Instance Parameters
# For dual host installation, change the db_host to appropriate value
sap_swpm_db_host: "s4h01"
sap_swpm_db_sid: "H01"
sap_swpm_db_instance_nr: "10"
sap_swpm_db_schema_abap: "SAPHANADB"
sap_swpm_update_etchosts: 'false'
One question. Due to fact that I'm testing and try to install several time. Is there a way to UNINSTALL the S/4HANA using the role swpm ? If yes - HOW?
How come you fix the issue? I am still getting the error.
my /etc/hosts
looks like,
[root@vm-techsapapp ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.1.7 vm-techsapapp.poc.cloud vm-techsapapp
10.0.1.6 vm-techsapdb.poc.cloud vm-techsapdb
[root@vm-techsapapp ~]#
@arubasu By default the samples are One Host, you have Dual Host (aka. Three Tier) configured in your /etc/hosts
.
Please ensure you do not have this line:
sap_swpm_db_host: "{{ ansible_hostname }}"
Instead replace with:
sap_swpm_db_host: "dbhostname.subdomainifexist.rootdomain.tld"
If error not resolved, please raise separate GH Issue and provide your variables and error messages accordingly.
@sean-freeman I have raised a new GH Issue. https://github.com/sap-linuxlab/community.sap_install/issues/301
@picoroma if this GH Issue is not responded to within 7 days, I will close / mark it as resolved
@picoroma I am closing this GH Issue due to lack of response, I hope the explanations solved your error with SAP SWPM
I'm trying to perform a S4HANA 2020 Installation I'm using the default template (sample-sap-swpm-default-mode.yml where i set\changes some vars (software path mostly) accordingly to my scenario.
The running command is something like that:
The Installation works fine until the pre-install phase. When start the ./sapinst process I have an error. Seems related to the master password that is not recognized into the vars file:
See attached file for more details. sap_swpm_error.txt