Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

build symlink for activemq-data dir #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cliles
Copy link

@cliles cliles commented Jan 13, 2015

When using this module with the puppetlabs activemq rpm on an el7 box, the data dir is not setup correctly. This results in a java process that is forever stuck trying to start activemq, no ports bound, just infinite loop in the log about how the data directory can not be created.

@rilindo
Copy link

rilindo commented Jan 28, 2015

The problem is that activemq package as of 5.9 has a different set of configuration. The one provided in the rpm package is correct. The one in puppet module (the static as well as the template), though, appears to be outdated, so it is not pointing activemq to the right data directories.

if $::osfamily == 'RedHat' and ($version == 'present' or versioncmp($version, '5.9') < 0) {
file { '/usr/share/activemq/activemq-data':
ensure => link,
target => '/usr/share/activemq/data',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the target here be /var/cache/activemq/data? (which is where /usr/share/activmeq/data links to)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here with ActiveMQ 5.9.1 on EL7

activemq-5.9.1-2.el7.noarch

2015-08-20 20:19:13,627 [main ] INFO SharedFileLocker - Database activemq-data/puppetserver4.hacklab/KahaDB/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: Failed to create directory 'activemq-data/puppetserver4.hacklab/KahaDB'

Thanks for the patch jlambert121

@ikke-t
Copy link

ikke-t commented Jun 16, 2015

Just to add that the same applies to RHEL6. I fixed it manually by adding the missing link, just a quick workaround test, and the activemq started to work. The patch above is wrong as @jlambert121 jlambert121 says. The version check should be the other way imo. I made a check that if greater than 5.9, do the link. This made it work:

  if $::osfamily == 'RedHat' and versioncmp($version, '5.9') > 0 {
    file { '/usr/share/activemq/activemq-data':
      ensure => link,
      target => '/var/cache/activemq/data',
    }
  }

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants