Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook error for monitors_relation_joined: FileNotFoundError for nrpe_exporter-amd64 #125

Closed
sed-i opened this issue Feb 27, 2024 · 1 comment

Comments

@sed-i
Copy link
Contributor

sed-i commented Feb 27, 2024

Charm went into error status in the following deployment:

series: jammy
applications:
  cp:
    charm: cos-proxy
    channel: edge
    revision: 70
    num_units: 1
  nrpe:
    charm: nrpe
    channel: edge
    revision: 117
  ub2:
    charm: ubuntu
    channel: edge
    revision: 24
    num_units: 1
relations:
- - cp:monitors
  - nrpe:monitors
- - nrpe:general-info
  - ub2:juju-info
unit-cp-0: 14:06:22.282 DEBUG unit.cp/0.juju-log monitors:16: ops 2.11.0.dev0 up and running.
unit-cp-0: 14:06:22.302 DEBUG unit.cp/0.juju-log monitors:16: Emitting Juju event monitors_relation_joined.
unit-cp-0: 14:06:22.325 ERROR unit.cp/0.juju-log monitors:16: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-cp-0/charm/./src/charm.py", line 498, in <module>
    main(COSProxyCharm)
  File "/var/lib/juju/agents/unit-cp-0/charm/venv/ops/main.py", line 456, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-cp-0/charm/venv/ops/main.py", line 144, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-cp-0/charm/venv/ops/framework.py", line 352, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-cp-0/charm/venv/ops/framework.py", line 865, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-cp-0/charm/venv/ops/framework.py", line 955, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-cp-0/charm/./src/charm.py", line 203, in _nrpe_relation_joined
    self._setup_nrpe_exporter()
  File "/var/lib/juju/agents/unit-cp-0/charm/./src/charm.py", line 216, in _setup_nrpe_exporter
    st.chmod(st.stat().st_mode | stat.S_IEXEC)
  File "/usr/lib/python3.10/pathlib.py", line 1097, in stat
    return self._accessor.stat(self, follow_symlinks=follow_symlinks)
FileNotFoundError: [Errno 2] No such file or directory: 'nrpe_exporter-amd64'
@sed-i sed-i changed the title Hook error for monitors_relation_joined: FileNotFoundError: [Errno 2] No such file or directory: 'nrpe_exporter-amd64' Hook error for monitors_relation_joined: FileNotFoundError for nrpe_exporter-amd64 Feb 27, 2024
@sed-i
Copy link
Contributor Author

sed-i commented Feb 27, 2024

Duplicate of #124. Closing.

@sed-i sed-i closed this as completed Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant