ansible-middleware / wildfly

A collection of roles to help install, setup and maintain Java JEE appserver Wildfly
GNU General Public License v2.0
12 stars 22 forks source link

Server Installation - PID File Creation Failure #116

Closed Footur closed 1 year ago

Footur commented 1 year ago
SUMMARY

The installation of JBoss EAP using the provided Ansible Role was successful; however, a PID (Process ID) file is not being created during startup. The following error message is displayed: "Jun 02 10:49:34 localhost.localdomain standalone.sh[648]: /opt/jboss/jboss-eap-7.4/bin/standalone.sh: line 369: jboss-eap.pid: Permission denied."

ISSUE TYPE
ANSIBLE VERSION
ansible 2.10.8
  config file = None
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
COLLECTION VERSION
Collection                     Version
------------------------------ -------
ansible.posix                  1.5.4
middleware_automation.common   1.1.0
middleware_automation.keycloak 1.2.5
middleware_automation.wildfly  1.3.2
STEPS TO REPRODUCE
  1. Install JBoss EAP using the provided Ansible Role.
  2. Start JBoss EAP.
  3. Check the log files for any error messages related to PID file creation.
    - name: Installation of JBoss EAP
    hosts: jboss
    vars:
    instance_name: jboss-eap
    wildfly_offline_install: true
    wildfly_java_package_name: java-11-openjdk-headless
    wildfly_version: "7.4.11"
    wildfly_archive_filename: "jboss-eap-{{ wildfly_version }}.zip"
    wildfly_install_download_url: "{{ wildfly_download_baseurl }}/{{ wildfly_archive_filename }}"
    wildfly_download_baseurl: http://example.net/JBoss
    wildfly_install_workdir: /opt/jboss
    wildfly_home: "{{ wildfly_install_workdir }}/jboss-eap-{{ wildfly_version.split('.')[0:2] | join('.') }}"
    wildfly_user: jboss
    collections:
    - middleware_automation.wildfly
    roles:
    - wildfly_install
    tasks:
    - name: Configure systemd unit file for JBoss EAP
    include_role:
      name: wildfly_systemd
    vars:
      wildfly_systemd_enable: true
      service_systemd_env_file: "/etc/jboss-eap.conf"
      service_systemd_conf_file: "/usr/lib/systemd/system/jboss-eap.service"
EXPECTED RESULTS

Upon starting JBoss EAP, a PID file should be created without any permission issues.

ACTUAL RESULTS

The PID file is not created during the startup process, and the log displays the error message: "Jun 02 10:49:34 localhost.localdomain standalone.sh[648]: /opt/jboss/jboss-eap-7.4/bin/standalone.sh: line 369: jboss-eap.pid: Permission denied."

Please let me know if any further details or log files are required to troubleshoot and resolve this issue.

rpelisse commented 1 year ago

It's a bug, it's also happening with Wildfly:

Jun 05 06:54:48 3eb5d5439a1e standalone.sh[751]: /opt/wildfly/wildfly-27.0.0.Final/bin/standalone.sh: line 384: wildfly.pid: Permission denied

Thanks for reporting this! We'll try to fix asap and release the fixed collection as quickly as possible.

Note: If you are deploying JBoss EAP (and not Wildfly) you should use the downstream version of this collection redhat.eap, available on Ansible Automation Hub.