Open andrewwippler opened 7 years ago
We are seeing the same behaviour. It is the fact which picks up the java version instead of the confluence one. To be honest, looking for 'a process with atlassian-confluence in the name and then taking the first thing which looks a bit like a version' is not ideal.
Unfortunately there doesn't seem to be an easy way to get the version from the rest API like in jira.
This might work?
curl -s http://localhost:8090/nonexisting_page |grep ajs-version-number
<meta name="ajs-version-number" content="6.0.3">
For now I've changed:
confluence_process.scan(%r{\d+\.\d+\.\d+}).first
to:
confluence_process.scan(%r{\d+\.\d+\.\d+}).last
Which does the trick for now
I've created pull request #124
@andrewwippler @senax I merged the PR. Can you confirm that this is now fixed?
@oranenj, Sorry, I think this still doesn't work. It's still restarting for me. I've confirmed that the version on my machine and the expected version is the same, but it's still restarting.
FWIW, I had this problem with Oracle JDK and v2.3.0 of this module, using commit 64e3d64152a04ae18119a70492401a76b9564162 instead resolved the confluence_version
fact incorrectly catching Java's version.
The output of my host's pgrep --list-full --full java.*atlassian-confluence-[0-9].*org.apache.catalina.startup.Bootstrap
command looks like:
17945 /usr/java/jdk1.8.0_131/jre/bin/java -Djava.util.logging.config.file=/data/atlassian/confluence/atlassian-confluence-6.1.2/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms4G -Xmx8G -XX:MaxPermSize=512m -XX:+UseLargePages -Dhttp.proxyHost=example.com -Dhttp.proxyPort=3128 -Dhttps.proxyHost=example.com -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=localhost|127.*.*.* -Djava.awt.headless=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.endorsed.dirs=/data/atlassian/confluence/atlassian-confluence-6.1.2/endorsed -classpath /data/atlassian/confluence/atlassian-confluence-6.1.2/bin/bootstrap.jar:/data/atlassian/confluence/atlassian-confluence-6.1.2/bin/tomcat-juli.jar -Dcatalina.base=/data/atlassian/confluence/atlassian-confluence-6.1.2 -Dcatalina.home=/data/atlassian/confluence/atlassian-confluence-6.1.2 -Djava.io.tmpdir=/data/atlassian/confluence/atlassian-confluence-6.1.2/temp org.apache.catalina.startup.Bootstrap start
As for the fact based on an HTTP call... Why not use curl
on the login page to detect the fact perhaps? Confluence has long put the version its running at the bottom of the page...
# curl -s http://localhost:8090/wiki/login.action | grep 'Atlassian Confluence [0-9]\.[0-9]\.[0-9]'
<li class="print-only">Printed by Atlassian Confluence 6.1.2</li>
I see the same behaviour on Debian 9 stretch, Confluence is restarted at every puppet run. Going to give the other commit a shot tomorrow
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Then apply:
What are you seeing
Confluence is being restarted every puppet run after an upgrade
What behaviour did you expect instead
Restart only for the upgrade
Output log
Any additional information you'd like to impart
I removed the offending lines locally to bypass the constant restart.