Hide Forgot
Created attachment 1204134 [details] log from systemctl Description of problem: After clean installation from zip file I am not able to launch EAP application due to missing log file. Version-Release number of selected component (if applicable): EAP 6.4.10 Steps to Reproduce: 1. Download zip file with installation 2. Follow steps on http://documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Installation_Guide/sect-Service_Configuration.html#Install_JBoss_Enterprise_Application_Platform_6_Red_Hat_Enterprise_Linux_Service 3. On point 6 (sudo service jboss-as-standalone start) start of the service has failed Actual results: Service failed to start with following info: $systemctl status jboss-as-standalone.service Starting jboss-as: /etc/rc.d/init.d/jboss-as-standalone.sh: line 84: /var/log/jboss-as/console.log: Permission denied Expected results: Service started successfuly: Active: active (running) Additional info: After manual creation of the file (touch console.log) server starts normally.
/var/log/jboss-as/console.log: Permission denied It says permission denied, not file not found. Has the server been installed by a different user than the one that has installed/run a previous version? Or run with a different user than the one that unzipped?
server were installed under sudo from user rstancel. However, it is started from root user and in config is setup this: JBOSS_USER=root Another info is that the directory /var/log/jboss-as was created while startup with following permission: drwxr-xr-x. 2 root root 4096 23. zář 15.02 jboss-as Server is unzipped in following directory: JBOSS_HOME=/home/rstancel/soft/jboss-eap-6.4.10 drwxr-xr-x. 11 rstancel rstancel 4096 22. zář 12.34 jboss-eap-6.4.10
After setting 'setenforce 0' and changing command for file generating to '> $JBOSS_CONSOLE_LOG' service has started normally. So the issue is probably something with selinux
File creation was blocked due to SE Linux policy. Grep from the log: type=AVC msg=audit(1474889558.731:313): avc: denied { create } for pid=10069 comm="jboss-as-standa" name="console.log" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0
PR https://github.com/jbossas/jboss-eap/pull/2855