Charon-SSP Agent not Starting due to Missing Library

Problem

After installing the Charon-SSP Agent without errors, the agent does not start and displays a general error messages in the systemctl status output:

# systemctl status ssp-agentd
× ssp-agentd.service - Charon Agent for SSP
     Loaded: loaded (/etc/systemd/system/ssp-agentd.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Mon 2023-08-28 13:44:22 CEST; 3min 20s ago
   Duration: 9ms
    Process: 4956 ExecStart=/opt/charon-agent/ssp-agent/bin/ssp-agent (code=exited, status=127)
   Main PID: 4956 (code=exited, status=127)
        CPU: 6ms


Trying to start the Agent manually results in an error message similar to the following:

# /opt/charon-agent/ssp-agent/bin/ssp-agent 
/opt/charon-agent/ssp-agent/bin/ssp-agent: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory


The information about the missing library can also be obtained using the ldd command:

# ldd /opt/charon-agent/ssp-agent/bin/ssp-agent
   linux-vdso.so.1 (0x00007ffe20783000)
   librt.so.1 => /lib64/librt.so.1 (0x00007f71aaa3e000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00007f71aaa39000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f71aaa34000)
   libcrypt.so.1 => not found
   libc.so.6 => /lib64/libc.so.6 (0x00007f71aa800000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f71aaa49000)


The cause of the problem is that the library libcrypt.so.1 is missing.

Why is this library not installed automatically from the distribution's repository during the installation?

  • To simplify the installation kit structure, there is only one Charon-SSP Agent RPM for all the Linux distributions and versions supported by a specific Charon-SSP version.
  • The library libcrypt.so.1 is provided in different RPMs by different distributions and versions.
  • Hence, the Charon Agent RPM cannot have a dependency definition while still provide one common Charon Agent RPM.

Solution

To solve the problem, identify the correct RPM package to install the missing library on your Linux distribution and version, and install it. Then restart the Charon-SSP Agent and check its status.

  1. Identify the RPM package containing the library:
    1. Linux 7.x: yum provides libcrypt.so.1
    2. Linux 8.x and 9.x: dnf provides libcrypt.so.1
  2. Install the missing package:
    1. Linux 7.x: yum install <package-name>
    2. Linux 8.x and 9.x: dnf install <package-name>
  3. Restart the Charon-SSP Agent:
    1. systemctl restart ssp-agentd
  4. Check Agent status:
    1. systemctl status ssp-agentd


Example (Rocky 9.2):

# dnf provides libcrypt.so.1
Last metadata expiration check: 0:21:49 ago on Mon 28 Aug 2023 01:41:00 PM CEST.
libxcrypt-compat-4.4.18-3.el9.i686 : Compatibility library providing legacy API functions
Repo        : appstream
Matched from:
Provide    : libcrypt.so.1


# dnf install libxcrypt-compat
Last metadata expiration check: 0:22:59 ago on Mon 28 Aug 2023 01:41:00 PM CEST.
Dependencies resolved.
===========================================================================================================================
 Package                           Architecture            Version                        Repository                  Size
===========================================================================================================================
Installing:
 libxcrypt-compat                  x86_64                  4.4.18-3.el9                   appstream                   88 k

Transaction Summary
===========================================================================================================================
Install  1 Package

Total download size: 88 k
Installed size: 198 k
Is this ok [y/N]: y
Downloading Packages:
libxcrypt-compat-4.4.18-3.el9.x86_64.rpm                                                   293 kB/s |  88 kB     00:00    
---------------------------------------------------------------------------------------------------------------------------
Total                                                                                      171 kB/s |  88 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                   1/1 
  Installing       : libxcrypt-compat-4.4.18-3.el9.x86_64                                                              1/1 
  Running scriptlet: libxcrypt-compat-4.4.18-3.el9.x86_64                                                              1/1 
  Verifying        : libxcrypt-compat-4.4.18-3.el9.x86_64                                                              1/1 

Installed:
  libxcrypt-compat-4.4.18-3.el9.x86_64                                                                                     

Complete!


# systemctl restart ssp-agentd

# systemctl status ssp-agentd
● ssp-agentd.service - Charon Agent for SSP
     Loaded: loaded (/etc/systemd/system/ssp-agentd.service; enabled; preset: disabled)
     Active: active (running) since Mon 2023-08-28 14:04:15 CEST; 6s ago
   Main PID: 5009 (ssp-agent)
 



Related articles




© Stromasys, 1999-2024  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.