Unable to start clean install on RHEL8
Asked by Steven Peterson:

Beating my head on this for a week, multiple re installs, including a full OS reinstall same results.  

I know the installer is not setting up the installation right the question is where is it messing it up.  

Immediately after install trying to start confluence gets you:  

service confluence start

To run Confluence in the foreground, start the server with start-confluence.sh -fg  
executing using dedicated user: confluence  
bash: ./startup.sh: Permission denied  

so I fix the permissions  

\[root@docs speterson\]# chown -R confluence:confluence /opt/atlassian  
\[root@docs speterson\]# chmod +x /opt/atlassian/confluence/bin/\*sh  

now i get

service confluence start

To run Confluence in the foreground, start the server with start-confluence.sh -fg  
executing using dedicated user: confluence  
If you encounter issues starting up Confluence, please see the Installation guide at <http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide>

Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out  
---------------------------------------------------------------------------  
Using Java: /opt/atlassian/confluence/jre//bin/java  
/opt/atlassian/confluence/bin/setenv.sh: line 57: /opt/atlassian/confluence/jre//bin/java: Operation not permitted  
/opt/atlassian/confluence/bin/setenv.sh: line 59: /opt/atlassian/confluence/jre//bin/java: Operation not permitted  
---------------------------------------------------------------------------  
Using CATALINA_BASE: /opt/atlassian/confluence  
Using CATALINA_HOME: /opt/atlassian/confluence  
Using CATALINA_TMPDIR: /opt/atlassian/confluence/temp  
Using JRE_HOME: /opt/atlassian/confluence/jre/  
Using CLASSPATH: /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar  
Using CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid  
Tomcat started.

SELinux is in permissive mode, no issues found looking at the audit log, same issue on SElinux Disabled and Enabled. so I know it is not an SE Linux thing  

has to be some kind of permissions issue, google is not giving me an answers  

Tried installing 7.7.2 and 7.7.3 same result


Answers:
author: Nic Brough -Adaptavist-
body: Your account that Confluence is set up to run as does not have the right permissions to use the java installation.

My best guess is that you installed everything as user A but are trying to run it as user B (And as it is a re-install, you might not have cleared everything out properly while A was trying to install it, so user C, who did the original install is the owner.

Check and fix the ownership of the files and directories in the installation and data directories - everything should be owned by the user that is going to be running Confluence.

comments: author: Steven Peterson
body: checked ownership already see above. running as the user or with the startup scripts makes no diffrence  

traced the error down to here in the setenv script

++ export JRE_HOME  
+ echo ---------------------------------------------------------------------------  
---------------------------------------------------------------------------  
+ echo 'Using Java: /opt/atlassian/confluence/jre//bin/java'  
Using Java: /opt/atlassian/confluence/jre//bin/java  
++ /opt/atlassian/confluence/jre//bin/java -jar /bin/confluence-context-path-extractor.jar  
/opt/atlassian/confluence/bin/setenv.sh: line 57: /opt/atlassian/confluence/jre//bin/java: Operation not permitted  
+ CONFLUENCE_CONTEXT_PATH=  
+ export CONFLUENCE_CONTEXT_PATH  
+ /opt/atlassian/confluence/jre//bin/java -jar /bin/synchrony-proxy-watchdog.jar  
/opt/atlassian/confluence/bin/setenv.sh: line 59: /opt/atlassian/confluence/jre//bin/java: Operation not permitted  
+ echo ---------------------------------------------------------------------------  
---------------------------------------------------------------------------

you see these /java: Operation not permitted not permited lines, they leak out in the start up script as well.  

I can not find anything related to the error online.  
Nothing shows up in the audit logs


author: Steven Peterson
body: root can run the java installed by the installer.  
no one else can  

\[confluence@docs \~\]$ ls -la /opt/atlassian/confluence/jre/bin/java  
-rwxr-xr-x. 1 confluence confluence 13112 Apr 15 06:28 /opt/atlassian/confluence/jre/bin/java


Tags: confluence-server

redhat

server