Header Shadow Image


touch: cannot touch /atlas/atlassian/confluence/logs/catalina.out: Permission denied

Getting this?

[confluence@atlas02 logs]$ logout
[root@atlas02 atlassian]# systemctl status confluence.service -l
â confluence.service – LSB: Atlassian Confluence
   Loaded: loaded (/etc/rc.d/init.d/confluence; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2019-09-10 22:07:18 EDT; 2min 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 11361 ExecStop=/etc/rc.d/init.d/confluence stop (code=exited, status=0/SUCCESS)
  Process: 11925 ExecStart=/etc/rc.d/init.d/confluence start (code=exited, status=1/FAILURE)

Sep 10 22:07:18 atlas02.nix.mds.xyz confluence[11925]: at com.atlassian.confluence.bootstrap.SynchronyProxyWatchdog.main(SynchronyProxyWatchdog.ja   va:47)
Sep 10 22:07:18 atlas02.nix.mds.xyz confluence[11925]: 2019-09-10 22:07:18,348 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog]    A Context element for ${confluence.context.path}/synchrony-proxy is found in /atlas/atlassian/confluence/conf/server.xml. No further action is re   quired
Sep 10 22:07:18 atlas02.nix.mds.xyz confluence[11925]: —————————————————————————
Sep 10 22:07:18 atlas02.nix.mds.xyz confluence[11925]: touch: cannot touch â/atlas/atlassian/confluence/logs/catalina.outâ: Permission denied
Sep 10 22:07:18 atlas02.nix.mds.xyz confluence[11925]: /atlas/atlassian/confluence/bin/catalina.sh: line 464: /atlas/atlassian/confluence/logs/cat   alina.out: Permission denied
Sep 10 22:07:18 atlas02.nix.mds.xyz runuser[11930]: pam_unix(runuser:session): session closed for user confluence1
Sep 10 22:07:18 atlas02.nix.mds.xyz systemd[1]: confluence.service: control process exited, code=exited status=1
Sep 10 22:07:18 atlas02.nix.mds.xyz systemd[1]: Failed to start LSB: Atlassian Confluence.
Sep 10 22:07:18 atlas02.nix.mds.xyz systemd[1]: Unit confluence.service entered failed state.
Sep 10 22:07:18 atlas02.nix.mds.xyz systemd[1]: confluence.service failed.
[root@atlas02 atlassian]# ls -altri /atlas/atlassian/confluence/conf/server.xml.
ls: cannot access /atlas/atlassian/confluence/conf/server.xml.: No such file or directory
[root@atlas02 atlassian]#

 

And seeing this from journalctl -xe:

— Unit confluence.service has begun starting up.
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: To run Confluence in the foreground, start the server with start-confluence.sh -fg
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: executing using dedicated user: confluence1
Sep 10 22:11:18 atlas02.nix.mds.xyz runuser[12246]: pam_unix(runuser:session): session opened for user confluence1 by (uid=0)
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: If you encounter issues starting up Confluence, please see the Installation guide at http:/
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: Server startup logs are located in /atlas/atlassian/confluence/logs/catalina.out
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: —————————————————————————
Sep 10 22:11:18 atlas02.nix.mds.xyz confluence[12241]: Using Java: /atlas/atlassian/confluence/jre//bin/java
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: st_expire: state 1 path /n
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: expire_proc: exp_proc = 140606617675520 path /n
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: expire_proc_indirect: expire /n/mds.xyz
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: 1 remaining in /n
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: expire_cleanup: got thid 140606617675520 path /n stat 3
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: expire_cleanup: sigchld: exp 140606617675520 finished, switching from 2 to 1
Sep 10 22:11:18 atlas02.nix.mds.xyz automount[5344]: st_ready: st_ready(): state = 2 path /n
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: log4j:ERROR setFile(null,true) call failed.
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: java.io.FileNotFoundException: /atlas/atlassian/confluence/logs/synchrony-proxy-watchdog.lo
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at java.io.FileOutputStream.open0(Native Method)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at java.io.FileOutputStream.open(FileOutputStream.java:270)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at com.atlassian.confluence.bootstrap.SynchronyProxyWatchdog.addLogFileAppender(SynchronyPr
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: at com.atlassian.confluence.bootstrap.SynchronyProxyWatchdog.main(SynchronyProxyWatchdog.ja
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: 2019-09-10 22:11:19,321 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog]
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: —————————————————————————
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: touch: cannot touch â/atlas/atlassian/confluence/logs/catalina.outâ: Permission denied
Sep 10 22:11:19 atlas02.nix.mds.xyz confluence[12241]: /atlas/atlassian/confluence/bin/catalina.sh: line 464: /atlas/atlassian/confluence/logs/cat
Sep 10 22:11:19 atlas02.nix.mds.xyz runuser[12246]: pam_unix(runuser:session): session closed for user confluence1
Sep 10 22:11:19 atlas02.nix.mds.xyz systemd[1]: confluence.service: control process exited, code=exited status=1
Sep 10 22:11:19 atlas02.nix.mds.xyz systemd[1]: Failed to start LSB: Atlassian Confluence.
— Subject: Unit confluence.service has failed
— Defined-By: systemd

 

It turns out that confluence creates a new user everytime you install it.  Why?  Who knows.  First time I have ever seen anything like that in an application.  It's very unusual and annoying especially if you try to reinstall confluence only to find it made itself a new user.  And also when searching for the real user using standard process commands can be misleading when two or more of these exist:

[root@atlas02 logs]# ps -ef|grep -Ei confluence|grep logs
conflue+ 10256     1 43 01:23 ?        00:01:30 /atlas/atlassian/confluence/jre//bin/java

To fix this, do the following.  

Change the user to the earlier confluence user.  In our case, change confluence1 to confluence:

[root@atlas02 bin]# grep -Ei confluence1 *
grep: synchrony: Is a directory
user.sh:CONF_USER="confluence1" # user created by installer
[root@atlas02 bin]#
[root@atlas02 bin]#
[root@atlas02 bin]#
[root@atlas02 bin]# vi user.sh
[root@atlas02 bin]# pwd
/atlas/atlassian/confluence/bin
[root@atlas02 bin]#

Next change the directory permissions on the confluence folder:

[root@atlas02 atlas]# pwd
/atlas
[root@atlas02 atlas]# ls -altri
total 17
11318803973829525516 -rw-r–r–.  1 root       root          8 Nov 15  2018 you.there
                 128 dr-xr-xr-x. 24 root       root       4096 Mar 12 21:23 ..
12124534773086893833 drwxr-xr-x.  4 root       root       4096 Mar 23 12:34 atlassian.bak
                   1 drwxr-xr-x.  5 root       root       4096 Mar 23 13:23 .
13456417161533701348 drwxr-xr-x.  4 confluence confluence 4096 Mar 23 13:28 atlassian
[root@atlas02 atlas]# chown -R confluence.confluence atlassian

And restart confluence using:

systemctl restart confluence

Cheers,
TK

 


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License