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

KeyError: 'pg_receivexlog_path #322

Closed
OpakAlex opened this issue Mar 13, 2019 · 5 comments
Closed

KeyError: 'pg_receivexlog_path #322

OpakAlex opened this issue Mar 13, 2019 · 5 comments

Comments

@OpakAlex
Copy link

OpakAlex commented Mar 13, 2019

2019-03-13 17:48:59,996 pghoard MainThread ERROR Unexpected exception in PGHoard
When i run, i have this error:

main loop
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 483, in run
    self.handle_site(site, site_config)
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 422, in handle_site
    self.receivexlog_listener(site, chosen_backup_node, xlog_path + "_incoming")
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 177, in receivexlog_listener
    if not self.check_pg_versions_ok(site, pg_version_server, "pg_receivexlog"):
  File "/usr/lib/python3.5/site-packages/pghoard/pghoard.py", line 125, in check_pg_versions_ok
    pg_version_server, self.config[command + "_path"], pg_version_client)
KeyError: 'pg_receivexlog_path

My config file via default... Any ideas?
pghoard version is: 2.0.0
postgres version is: 10.1

@OpakAlex
Copy link
Author

@OpakAlex
Copy link
Author

when i am trying to run it on same machine as postgres:

2019-03-14 12:35:37,870 pghoard MainThread      DEBUG   Loading JSON config from: 'config.json', signal: None
Error: pg_wrapper: pg_receivexlog was not found in /usr/lib/postgresql/10/bin
2019-03-14 12:35:38,032 pghoard MainThread      ERROR   Invalid config file 'config.json': CalledProcessError: Command '['/usr/bin/pg_receivexlog', '--version']' returned non-zero exit status 1

But i put "active_backup_mode": "walreceiver", why it check pg_receivexlog ?

@Sanghren
Copy link

Hello , did you found what was the cause of your issue ?
I'm having the exact same stacktrace/error message as you

rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
rdunklau added a commit that referenced this issue Aug 4, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
@rdunklau
Copy link
Contributor

This is likely a duplicate of #388 and #429

rdunklau added a commit that referenced this issue Aug 17, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
rdunklau added a commit that referenced this issue Aug 17, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References #388, #429, #322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
@rdunklau
Copy link
Contributor

Hello !
This should be fixed by 7df6714.
Feel free to reopen if that's not the case.

jason-adnuntius pushed a commit to Adnuntius/pghoard that referenced this issue Aug 20, 2021
Several bugs / inconveniences are fixed by this:
 - the way we looked for pg_receivexlog / pg_receivewal doesn't work on
   postgresql versions not installed using the "multiple versions" RPM /
   DEB packages. So now we always try both when asked about one or the
   other. (References Aiven-Open#388, Aiven-Open#429, Aiven-Open#322)
 - do not hardcode "/usr/bin/" without checking anything but instead
   walk the PATH.
 - handle postgresql versions a bit differently
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

3 participants