Bug 1378878 - Unable to start EAP due to missing log file
Summary: Unable to start EAP due to missing log file
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Scripts and Commands
Version: 6.4.10
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Radovan STANCEL
QA Contact: Marek Kopecky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-23 12:34 UTC by Radovan STANCEL
Modified: 2019-08-19 12:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:47:32 UTC
Type: Bug


Attachments (Terms of Use)
log from systemctl (1.46 KB, text/plain)
2016-09-23 12:34 UTC, Radovan STANCEL
no flags Details

Description Radovan STANCEL 2016-09-23 12:34:13 UTC
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.

Comment 1 Fernando Nasser 2016-09-23 14:16:59 UTC
/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?

Comment 2 Radovan STANCEL 2016-09-26 08:07:47 UTC
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

Comment 3 Radovan STANCEL 2016-09-26 09:54:05 UTC
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

Comment 4 Radovan STANCEL 2016-09-26 11:42:36 UTC
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

Comment 6 Radovan STANCEL 2016-10-03 14:07:34 UTC
PR https://github.com/jbossas/jboss-eap/pull/2855


Note You need to log in before you can comment on or make changes to this bug.