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

[BUG] libpq.so.5 postgresql module is missing #158

Open
jengsala opened this issue Apr 25, 2022 · 0 comments
Open

[BUG] libpq.so.5 postgresql module is missing #158

jengsala opened this issue Apr 25, 2022 · 0 comments
Labels

Comments

@jengsala
Copy link
Contributor

jengsala commented Apr 25, 2022

When we include the collectd.postgresql state, the service launch fails because of the missing libpq.so.5 module with this error message on debian-10 platform:

To reproduce the error :

  • Add on kitchen.yml

      state_top:
        base:
          '*':
            .....
            - collectd.postgresql 
  • Run

$ kitchen converge default-debian-10-tiamat-py3

Error on converge :

       ----------
                 ID: collectd-service
           Function: service.running
               Name: collectd
             Result: False
            Comment: Job for collectd.service failed because the control process exited with error code.
              See "systemctl status collectd.service" and "journalctl -xe" for details.
            Started: 14:31:09.789580
           Duration: 47.465 ms
            Changes:   

Debug :

$ kitchen login default-debian-10-tiamat-py3

We can find on the journalctl the error in details :


Apr 25 14:31:55 0397fcc4b0a3 collectd[662]: dlopen ("/usr/lib/collectd/postgresql.so") failed: libpq.so.5: cannot open shared object file: No such file or directory. The most common cause for this problem is missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
Apr 25 14:31:55 0397fcc4b0a3 collectd[662]: plugin_load: Load plugin "postgresql" failed with status 1.
Apr 25 14:31:55 0397fcc4b0a3 collectd[662]: Error: Reading the config file failed!
Apr 25 14:31:55 0397fcc4b0a3 collectd[662]: Read the logs for details.
Apr 25 14:31:55 0397fcc4b0a3 systemd[1]: collectd.service: Main process exited, code=exited, status=1/FAILURE
Apr 25 14:31:55 0397fcc4b0a3 systemd[1]: collectd.service: Failed with result 'exit-code'.
Apr 25 14:31:55 0397fcc4b0a3 systemd[1]: Failed to start Statistics collection and monitoring daemon.
Apr 25 14:31:55 0397fcc4b0a3 systemd[1]: collectd.service: Consumed 5ms CPU time.
....
....

The solution I could find would be to install the required dependency by:

sudo apt-get install libpq-dev

It would therefore be necessary to add this dependency in the postgresql modules to be installed if we want to use the state collectd.postgresql

@jengsala jengsala added the bug label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant