Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

We do not support any modification of our config files (e.g. apache, .profile etc.). If you do that and the site is broken, you will run out of support, especially on the Checkmk Appliance.

We saw the bottom error several times especially when dealing with check_sql.

Error Messages

Starting apache...apache2: Syntax error on line 236 of /omd/sites/mysite/etc/apache/apache.conf
libpython3.9.so.1.0: cannot open shared object file: No such file or directory

Problem

The default for LD_LIBARY_PATH should be:

LD_LIBRARY_PATH=$OMD_ROOT/local/lib:$OMD_ROOT/lib

But for some reasons the .profile file of the site user seems to be broken and after the restart of the site you will face the following issue:

Starting apache...apache2: Syntax error on line 236 of /omd/sites/mysite/etc/apache/apache.conf: Syntax error on line 2 of /omd/sites/mysite/etc/apache/conf.d/01_wsgi.conf: Cannot load /omd/sites/mysite/lib/apache/modules/mod_wsgi.so into server: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
..........ERROR

Solution

  1. Check if env is right

    su - mysite  
    OMD[mysite]:~$ echo $LD_LIBRARY_PATH
    /omd/sites/mysite/opt/oracle/instantclient_21_4

    In that case the env is not correct. The env is pointing only to the libraries of the oracle instantclient

  2. Check if the libary is available

    OMD[mysite]:~$ find -L -name "*libpython3.9.so.1.0*"
    ./version/lib/libpython3.9.so.1.0
    ./lib/libpython3.9.so.1.0

    In that case, the library is only available in the origin and default path of LD_LIBRARY_PATH

  3. restore the default variable
    You will find the original files of .profile or .bashrc in "/omd/versions/2.1.0b7.cee/skel"

    ➜ /omd/versions/2.1.0b7.cee/skel ls -altr
    insgesamt 36
    -rw-r--r-- 1 root root 2055 Apr 25 00:02 .profile
    -rw-r--r-- 1 root root 1091 Apr 25 00:02 .bashrc

    One way would be to copy the LD_LIBRARY_PATH value from .profile and put it directly to the .profile of the site user:

    su - mysite
    OMD[mysite]:~$ vi .profile 

    and to make the changes permanent, please enter:

    OMD[mysite]:~$ source .profile 
  4. set the LD_LIBARY_PATH the right way

    OMD[mysite]:~$ vi .profile 
    OMD[mysite]:~$ source .profile

    extend the LD_LIBRARY_PATH like that ":path/to/oracle/instanclient"
    At the end it should look like that:

    OMD[mysite]:~$ echo $LD_LIBRARY_PATH
    /omd/sites/mysite/local/lib:/omd/sites/test/lib:path/to/oracle/instanclient
    
    
  5. Now after a restart of the site apache the error should be gone!

Filter by label

There are no items with the selected labels at this time.



  • No labels