Shared object "libldap-2.4.so.2" not found



  • Fresh install of 2.2.1-x64, Squid3, SquidGuard, Lightsquid, Sarg.

    Saw this error in /var/squid/logs/cache.log:

    WARNING: redirector #Hlpr0 exited
    Shared object "libldap-2.4.so.2" not found, required by "SquidGuard"



  • Hi,

    I saw this message also in /var/squid/logs/cache.log. I guess there is a missing softlink.

    :(



  • Try rebuilding blacklist db apply save and reboot!



  • Has anyone solved the problem?
    Found one solution for me.
    After entering the command in pfsense console

    /usr/local/bin/squidGuard -v
    

    Squid starts until reboot



  • @firstzerg:

    Has anyone solved the problem?
    Found one solution for me.
    After entering the command in pfsense console

    /usr/local/bin/squidGuard -v
    

    Squid starts until reboot

    Thanks for that info. This has been driving me crazy. I'm a BSD noob. Is there somewhere I can put this command to run at startup?

    Does everyone with 2.2.2  see this problem? It doesn't seem like 'everyone' is seeing it. Is it the way I installed?

    thanks

    -Tracy



  • @trahajopro86:

    Is there somewhere I can put this command to run at startup?

    I tried put this script:```
    #!/bin/sh

    rc_start() {
    /usr/local/bin/squidGuard -v
    }

    rc_stop() {
    /usr/bin/killall squidGuard
    }

    case $1 in
    start)
    rc_start
    ;;
    stop)
    rc_stop
    ;;
    restart)
    rc_stop
    rc_start
    ;;
    esac

    in **/usr/local/etc/rc.d/squidguard.sh**
    this worked before pfSense 2.2.2


  • Found temporary solution:

    upload to pfsense squidguard.sh and setup.sh files
    and exec command```
    chmod +x setup.sh && ./setup.sh && reboot

    
    **squidguard.sh**
    

    #!/bin/sh

    rc_start() {
    /usr/local/bin/squidGuard -v
    }

    rc_stop() {
    /usr/bin/killall squidGuard
    }

    case $1 in
    start)
    rc_start
    ;;
    stop)
    rc_stop
    ;;
    restart)
    rc_stop
    rc_start
    ;;
    esac

    
    **setup.sh**
    

    #!/bin/sh
    arch=$(uname -p)
    chmod 0755 squidguard.sh
    mv squidguard.sh /usr/local/etc/rc.d/squidguard.sh
    sed 's/^.*squidGuard</executable>/<rcfile>squidguard.sh</rcfile>
    &/' /cf/conf/config.xml > /cf/conf/config.xml.new
    mv /cf/conf/config.xml /cf/conf/config.xml.old
    mv /cf/conf/config.xml.new /cf/conf/config.xml</rcfile>

    
    this will start squidguard.sh on boot


  • I tried this and now I can't connect to my box. I am remote so I can't see what is on the screen and I can't connect via ssh or webui. I will check it and report back when I get home.

    Here are my steps.

    1. created squidguard.sh and setup.sh in /usr/local/etc/rc.d/ (I'm guessing I shouldn't have done this)
    2. executed chmod +x setup.sh && ./setup.sh && reboot
    3. Tried connecting to webui and got error "RCFILE at line 1242 cannot occur more than once"
    4. Connected via ssh and moved squidguard.sh and setup.sh from /usr/local/etc/rc.d/ to /tmp
    5. executed chmod +x setup.sh && ./setup.sh && reboot
    6. cant connect via web or ssh. … assuming my config got squished?

    -Tracy



  • @trahajopro86:

    I tried this and now I can't connect to my box. I am remote so I can't see what is on the screen and I can't connect via ssh or webui. I will check it and report back when I get home.

    Here are my steps.

    1. created squidguard.sh and setup.sh in /usr/local/etc/rc.d/ (I'm guessing I shouldn't have done this)
    2. executed chmod +x setup.sh && ./setup.sh && reboot
    3. Tried connecting to webui and got error "RCFILE at line 1242 cannot occur more than once"
    4. Connected via ssh and moved squidguard.sh and setup.sh from /usr/local/etc/rc.d/ to /tmp
    5. executed chmod +x setup.sh && ./setup.sh && reboot
    6. cant connect via web or ssh. … assuming my config got squished?

    -Tracy

    setup.sh and squidguard.sh must be not in /usr/local/etc/rc.d/
    setup.sh make changes in pfsense config and must be launched only one time

    instead setup.sh you may do manualy next steps:
    1. create /usr/local/etc/rc.d/squidguard.sh
    2. chmod +x /usr/local/etc/rc.d/squidguard.sh
    3. find this text in /cf/conf/config.xml

                    <service><name>squidGuard</name>
    
                            <executable>squidGuard</executable></service> 
    

    and add line <rcfile>squidguard.sh</rcfile> like this

                    <service><name>squidGuard</name>
    
                            <rcfile>squidguard.sh</rcfile>
                            <executable>squidGuard</executable></service> 
    

    4. reboot

    @trahajopro86:

    6. cant connect via web or ssh. … assuming my config got squished?

    multiple execution of setup.sh duplicated line <rcfile>squidguard.sh</rcfile> in you config.xml file

    P.S.
    some backups of you config.xml you can find in /cf/conf/backup



  • I was able to get back to a good state by restoring a backup config.xml from /cf/conf/backup.

    After that I created setup.sh and squidguard.sh in /temp and executed setup. It looks like it worked like a champ this time. I rebooted and squiq/squidguard started up as expected.

    Thanks for all your help firstzerg!

    -Tracy



  • @alxbob:

    Try rebuilding blacklist db apply save and reboot!

    Hello,

    I had the same problem (missing libldap-2.4.so.2) after upgrading squidGuard to 1.4.7 (1.9.14). For me rebuilding the blacklist database solved the problem.

    Thank you!
    Gabor



  • @gaborozzo:

    @alxbob:

    Try rebuilding blacklist db apply save and reboot!

    Hello,

    I had the same problem (missing libldap-2.4.so.2) after upgrading squidGuard to 1.4.7 (1.9.14). For me rebuilding the blacklist database solved the problem.

    Thank you!
    Gabor

    Rebuilding the DB worked for me too, don;t know if it will survive a reboot but it got back up to running.



  • Not working here;  I can rebuild the DB and squid/squidguard start.  After a reboot they don't .


  • Netgate Administrator

    This can be worked around by creating and enabling at least one custom target category. For some reason if you're using downloaded blacklists only the required file/folder isn't created and at boot Squidguard fails to start filling the squid logs in cache.log with this error.
    We had to do some testing on this during the week for a customer and I was seeing this exact symptom. Jim found this workaround.
    This happens on both Squid 2.7 and 3.

    Steve



  • @stephenw10:

    This can be worked around by creating and enabling at least one custom target category.

    Really working (after reboot too) after creating at custom target category!
    Thanks.



  • @stephenw10:

    This can be worked around by creating and enabling at least one custom target category. …

    Yes, it fixed same error for me, thanks.



  • First post and using pfsense now for a year but at a dead end trying to find a solution for not getting squidguard to work on my Pfsense box (2.2.2 64bit).
    The following shows up in cache.log:

    2015/05/07 20:57:40 kid1| Starting Squid Cache version 3.4.10 for amd64-portbld-freebsd10.1…Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    Shared object "libdb41.so.1" not found, required by "squidGuard"
    2015/05/07 20:57:40 kid1| WARNING: redirector #Hlpr0 exited
    FATAL: The redirector helpers are crashing too rapidly, need help!
    Squid Cache (Version 3.4.10): Terminated abnormally.

    CPU Usage: 0.305 seconds = 0.196 user + 0.110 sys
    Maximum Resident Size: 154768 KB
    Page faults with physical i/o: 0

    I already tried to create a custom target category it still doesn’t work. Also reinstalling Squidguard with and without prior de-installing it is not helping.
    Not trying to hijack this thread but my cache.log looks very similar to OP’s observation. Thank you all for helping.

    Jaap


  • Netgate Administrator

    You have added the category to the common ACLs and set it to allow/deny?
    The system log is full of the squid 'help respawing too fast' errors?

    Steve



  • Hi Steve,

    Thanks for answering. I added a whitelist category set to whitelist and a blacklist category set to deny showing on top of the list according to this article .

    Jaap


  • Netgate Administrator

    That should do it.
    What Squid and Squidguard versions are you running?

    Steve



  • @stephenw10:

    What Squid and Squidguard versions are you running?

    Hi, Steve

    Running Squid 3.4.10 pkg 0.2.8 and squidguard 1.4.7. pkg 1.9.14 on 2.2.2 64 bit. Didn't use squidguard devel because pkg manager mentions it is working with squid 2.x only.

    Jaap


  • Netgate Administrator

    Hmm, I installed that same combination on Thursday to a fresh 2.2.2 install and it's running fine. It was 32bit but if anything that's the less well tested branch.
    I just booted it now and it all comes up fine. Even ClamAV. What hardware are you running it on? Ram? Disk size?

    Steve



  • @stephenw10:

    What hardware are you running it on? Ram? Disk size?

    Steve,

    Squid by itself runs fine (AV included) as soon as squidguard is installed the drama happens, no internet connection with squid in transparant mode. Squid tries to restart but fails filling the log as posted earlier.
    My hardware:
    2 CPUs: 1 package(s) x 2 core(s), Intel(R) Atom(TM) CPU D2500 @ 1.86GHz . 4Gig RAM, 250 Gig HDD.
    Dual Intel NIC.
    Thanks,

    Jaap


  • Netgate Administrator

    Just coming back to this I again installed and see this only when the blacklist isn't loaded.

    Steve



  • Hi Steve,

    Thanks for still hanging in. There is a blacklist in /var/db/Squidguard I see all the shallalist categories. The only thing is that downloading the shallalist is suspiciously quick but returns no errors. Also tried removing and re-installing squid and squidGuard with Jims's script but keep getting shared object not found error in cache.log
    Is there a special command to load the list after downloading, or maybe I should switch from transparent to WPAD proxy operation.
    For now I am keeping an eye on the E2guardian package.
    Thanks again.

    Jaap


  • Netgate Administrator

    Nope there's no special trick. Once the list has downloaded and the categories are set it should work. You are seeing a different missing object to everyone else though which is odd. Check this video to make sure you are doing it right. It's a bit old but still applies.
    https://www.youtube.com/watch?v=H-6_13P8pS8&feature=youtu.be
    The only thing they don't do there is add the custom target which is required currently to prevent having to download the blacklist at each boot.

    Steve



  • Hi Steve,

    Just to report I solved my issue. I found my Pfsense setup to contain two /usr/pbi/squidguard directories: /usr/pbi/squidguard-amd64/.. and /usr/pbi/squidguard-squid3-amd64/..
    In the squid integrations section the squidGuard –c  command referred to the squidguard-squid3-amd64 directory, while the updates of the blacklist for some reason were handled within the /usr/pbi/squidguard-amd64 realm. Apparently the/usr/pbi/squidguard-squid3-amd64 directory was a remnant of earlier attempts and was never properly cleaned up by a de-installation routine.
    Anyway de-installing squidguard, removing /usr/pbi/squidguard-squid3-amd64/.. and /var/db/squidGuard directories, rebooting and installing squidguard devel 1.5 and then running the shalla-list update rendered a system with a running proxy filter.
    Although a stubborn issue it very much deepened my knowledge of the system.
    Thank you for your support and time.

    Jaap


  • Netgate Administrator

    Thanks for coming back with that. Yeah Squidguard-squid3 is no longer necessary as the current version can run with both Squid 2.7 and 3.
    Well spotted.  :)

    Steve



  • @stephenw10:

    This can be worked around by creating and enabling at least one custom target category. For some reason if you're using downloaded blacklists only the required file/folder isn't created and at boot Squidguard fails to start filling the squid logs in cache.log with this error.
    We had to do some testing on this during the week for a customer and I was seeing this exact symptom. Jim found this workaround.
    This happens on both Squid 2.7 and 3.

    Steve

    Thank you, we all love you (?)