Skip to content

aem_installer is failing after calling stop script for AEM process #139

@mbloch1986

Description

@mbloch1986

Hi @bstopp,

I'm encountering an issue where the method monitor_site is failing after calling the stop script.

Error message:

aws: Error: Could not set 'present' on ensure: Failed to open TCP connection to localhost:4502 (Address family not supported by protocol - socket(2) for "localhost" port 4502) (file: /tmp/packer-puppet-masterless/module-0/aem/manifests/instance.pp, line: 143)

aws: Error: Could not set 'present' on ensure: Failed to open TCP connection to localhost:4502 (Address family not supported by protocol - socket(2) for "localhost" port 4502) (file: /tmp/packer-puppet-masterless/module-0/aem/manifests/instance.pp, line: 143)

System Infos:
OS: RHEL 7
Ruby version: 2.4.0

After some debugging I found out that two approaches fixes the issue:

First approach:
Change localhost to 127.0.0.1

https://github.com/bstopp/puppet-aem/blob/master/lib/puppet/provider/aem_installer/default.rb#L130

Second approach:

Add Errno::EAFNOSUPPORT to the rescue call when trying to connect to AEM

https://github.com/bstopp/puppet-aem/blob/master/lib/puppet/provider/aem_installer/default.rb#L145

I can't really determine why it doesn't like localhost on my instance but extending the resuce method seems like the better solution. Hence why I'll raise a PR for this approach.

Cheers
Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions