Confluence server 7.1.0 two processes running on Ubuntu, service unavailable
Asked by Povilas Lazauskas:

When trying to access Confluence via proxy, I get "Service unavailable".  
When running " ps -eaf \| grep -i confl", I get

```
admin@ubuntu:~$ ps -eaf | grep -i confl
conflue+ 1538 1 0 Sep25 ? 02:16:46 /opt/atlassian/confluence/jre/bin/java -classpath /opt/atlassian/confluence/temp/3.1.0-master-0f086db5.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/postgresql-42.1.4.jar -Xss2048k -Xmx1g synchrony.core sql
conflue+ 9607 1 0 08:00 ? 00:00:00 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -Djdk.tls.server.protocols=TLSv1.1,TLSv1.2 -Djdk.tls.client.protocols=TLSv1.1,TLSv1.2 -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Djava.locale.providers=JRE,SPI,CLDR -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2021-09-25_09-41-41.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/opt/atlassian/confluence/logs/gc-2021-09-25_09-41-41.log::filecount=5,filesize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -XX:+IgnoreUnrecognizedVMOptions -Dignore.endorsed.dirs= -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
djan-dev 9609 6546 0 08:00 pts/0 00:00:00 grep --color=auto -i confl
conflue+ 14537 1 99 Oct04 ? 8-09:13:37 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -Djdk.tls.server.protocols=TLSv1.1,TLSv1.2 -Djdk.tls.client.protocols=TLSv1.1,TLSv1.2 -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Djava.locale.providers=JRE,SPI,CLDR -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2021-09-25_09-41-41.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/opt/atlassian/confluence/logs/gc-2021-09-25_09-41-41.log::filecount=5,filesize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -XX:+IgnoreUnrecognizedVMOptions -Dignore.endorsed.dirs= -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
admin@ubuntu:~$
```

I am running on Ubuntu 16.04.7 LTS.

"sudo /etc/init.d/confluence stop" does not stop these processes.

"sudo /etc/init.d/confluence stop" has no effect either.

Please help to get Confluence running.


Answers:
author: Nic Brough -Adaptavist-
body: As you've somehow managed to get two copies running, it's utterly broken, and not able to respond to your shutdown commands.

You'll need to maunally kill both of them, undo whatever it was that allowed you to run it twice, and restart one copy.

comments: author: Povilas Lazauskas
body: I can not tell why server is starting two copies of confluence. When I try to kill these processes, they are respawning.   

admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
29730 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$  
admin@ubuntu:\~$ sudo kill -9 29730  
admin@ubuntu:\~$  
admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
30039 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$ sudo kill -9 30039  
admin@ubuntu:\~$  
admin@ubuntu:\~$  
admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
30207 ? 00:00:00 /opt/atlassian/ \<defunct\>  
30209 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$ sudo kill -9 30207  
admin@ubuntu:\~$  
admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
30595 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$ sudo kill -9 30595  
admin@ubuntu:\~$  
admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
30770 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$ sudo kill -9 30770  
admin@ubuntu:\~$ ps -U confluence1  
PID TTY TIME CMD  
30917 ? 00:00:00 /opt/atlassian/  
admin@ubuntu:\~$  

I affraid only reinstall will fix this.


author: Nic Brough -Adaptavist-
body: As there's no way to know what you've set up to keep running it, or allow more than one copy to run, yes, I think you may need to re-install clean.


author: Povilas Lazauskas
body: I have installed confluence on new machine and imported previously xml exported spaces.


author: karenann
body: Running 7.19.x Confluence on Ubuntu 16.04.

Our Confluence env seems to run with both /opt/atlassian/confluence/jre//bin/java and /opt/atlassian/confluence/jre/bin/java.

It seems that the jre//bin version starts first and the jre/bin starts after it.

When we run service confluence stop, both stop. When we run service confluence start, both start.

I'm only just noticing it because we were having 502s on one env that exhibited this. But our other env that isn't 502ing has this same double process issue.

I'm planning on opening a ticket since I can't seen to find out if this is normal or not.

comments: author: karenann
body: Atlassian support reported back that 2 processes is normal when running Synchrony.

And that the double slashes (jre//bin) is normal when using the Confluence installer.

I see that the OPs problem was far more complex than, and completely unrelated, to the question that Google pointed me here for. Reporting back only in the event someone else lands here with the same question I had.


Tags: confluence-server

server