sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
53 stars 56 forks source link

sapinst rc 118 #504

Closed Baboulinet-33 closed 1 year ago

Baboulinet-33 commented 1 year ago

Hello,

I'm trying to install SAP (ASCS here) via the collection. I have the following error which is not very clear:

{
  "changed": true,
  "stdout": "Extracting...\nExtraction done!",
  "stderr": "/bas/753_REL/bc_753_REL/src/ins/SAPINST/impl/src/selfextract/iauxsysex.c:387: child /tmp/sapinst_exe.58532.1698682332/sapinst (pid 61380) has crashed. Executable directory is /tmp/sapinst_exe.58532.1698682332. Contact Support.",
  "rc": 118,
  "cmd": "umask 022 ; ./sapinst SAPINST_INPUT_PARAMETERS_URL=/tmp/ansible.n5eidp6lswpmconfig/inifile.params SAPINST_EXECUTE_PRODUCT_ID=NW_ABAP_ASCS:S4HANA2022.CORE.HDB.ABAP SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false  \n",
  "start": "2023-10-30 17:12:12.332236",
  "end": "2023-10-30 17:12:15.108556",
  "delta": "0:00:02.776320",
  "failed": true,
  "msg": "non-zero return code",
  "invocation": {
    "module_args": {
      "chdir": "/data/bin/sap_swpm_extracted",
      "_raw_params": "umask 022 ; ./sapinst SAPINST_INPUT_PARAMETERS_URL=/tmp/ansible.n5eidp6lswpmconfig/inifile.params SAPINST_EXECUTE_PRODUCT_ID=NW_ABAP_ASCS:S4HANA2022.CORE.HDB.ABAP SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false  \n",
      "_uses_shell": true,
      "stdin_add_newline": true,
      "strip_empty_ends": true,
      "argv": null,
      "executable": null,
      "creates": null,
      "removes": null,
      "stdin": null
    }
  }
}

The step is on sap_swpm role: "SAP SWPM - Verify if sapinst process finished successfully"

My playbook:

- hosts: all
  become: true
  vars_files:
    - vars/sap-swpm-default-mode-s4hana-distributed-ascs-install.yml
  vars:
    sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: false
    sap_install_media_detect_rar_package: 'linux-rar'
    sap_install_media_detect_file_server_only: true

  pre_tasks:
    - name: Include tasks to manage subscriptions
      ansible.builtin.include_tasks: tasks/enable_repos.yml

  roles:
    - role: community.sap_install.sap_netweaver_preconfigure
    - role: community.sap_install.sap_install_media_detect
    - role: community.sap_install.sap_swpm

Thanks

sean-freeman commented 1 year ago

@Baboulinet-33 unfortunately, this is not enough detail to debug from.

First observation, you ran sap_netweaver_preconfigure without first running sap_general_preconfigure.

It looks like you copied the sample-sap-swpm-default-mode-s4hana-distributed-ascs-install.yml file and are using the latest Ansible Collection version (given the newer vars for sap_install_media_detect Ansible Role). We would need to see an approximate copy of the vars used, as the sample is as it's name implies - it demonstrates a scenario and is not intended to be ready-to-execute.

Your error in stderr does suggest this is probably an SAP SWPM problem, sapinst (pid 61380) has crashed is unusual. At a complete guess, it is probably your /tmp has noexec?

Baboulinet-33 commented 1 year ago

Hey, thanks for the reply. The vars used:

# Detect SAP NetWeaver software
sap_install_media_detect_source_directory: "/data/bin"
sap_install_media_detect_source: remote_dir
sap_install_media_detect_swpm: true
sap_install_media_detect_hostagent: true
sap_install_media_detect_igs: true
sap_install_media_detect_kernel: true
sap_install_media_detect_webdisp: false

sap_global_password: NewPass$321

# Product ID for New Installation
sap_swpm_product_catalog_id: NW_ABAP_ASCS:S4HANA2022.CORE.HDB.ABAP

# Generate inifile.params using sap_swpm Ansible Role
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
  - nw_config_host_agent
  - sap_os_linux_user
  - maintenance_plan_stack_tms_config
  - maintenance_plan_stack_spam_config
  - maintenance_plan_stack_sum_config

# Software
sap_swpm_software_path: /data/bin
sap_swpm_sapcar_path: /data/bin
sap_swpm_swpm_path: /data/bin

# NW Passwords
sap_swpm_master_password: "{{ sap_global_password }}"
sap_swpm_ddic_000_password: "{{ sap_global_password }}"

# HDB Passwords
sap_swpm_db_system_password: "{{ sap_global_password }}"
sap_swpm_db_systemdb_password: "{{ sap_global_password }}"
sap_swpm_db_schema_abap: "SAPHANADB"
sap_swpm_db_schema_abap_password: "{{ sap_global_password }}"
sap_swpm_db_sidadm_password: "{{ sap_global_password }}"

# NW Instance Parameters
sap_swpm_sid: ABC
# sap_swpm_pas_instance_nr: "01"
# sap_swpm_pas_instance_hostname: "s4h2020a"
sap_swpm_ascs_instance_nr: "01"
sap_swpm_ascs_instance_hostname: "s4h2020a"
sap_swpm_fqdn: "poc.cloud"
sap_swpm_virtual_hostname: "s4h2020b"

# Unix User ID
sap_swpm_sapadm_uid: '3000'
sap_swpm_sapsys_gid: '3001'
sap_swpm_sidadm_uid: '3001'

# HDB Instance Parameters
# sap_swpm_db_host: "hana01"
sap_swpm_db_ip: "10.40.70.190"
sap_swpm_db_sid: SGH
sap_swpm_db_instance_nr: "00"

the /tmp dir is as usual, maybe SELinux (I suppose the role sap_general_preconfigure configure SELinux) ? I will try with sap_general_preconfigure before sap_netweaver_preconfigure

Baboulinet-33 commented 1 year ago

After some test, /tmp has noexec Thanks for the solution