Debugging Web Safety Crashes

Warning

Please ensure your license key is not expired. If it is expired, Web Safety cannot start and ICAP connections from Squid will fail.

If Web Safety crashed due to some internal error (bug) Squid cannot connect to ICAP server port and shows the ICAP Connection Error page. First thing to check in this case is if wsicapd is running when you see this error. To check if it is running, go to server console and type:

# ps aux | grep wsicapd

The output of this command should look like this

../../_images/ps_aux.png

If /opt/websafety/bin/wsicapd process is up and running then it means Web Safety did not crash and the reason is probably some misconfiguration on the Squid side. To be sure this is the case, run the telnet command telnet 127.0.0.1 1344, type GET / and press Enter two times. The output should look like the following:

../../_images/telnet.png

The correct answer from Web Safety ICAP daemon indicates it is up and running and ready to process connections from ICAP clients (Squid).

If there is no successful connection and/or no Web Safety ICAP daemon running, try to do the following:

  • Try to click Save and Restart from the UI or from console by typing systemctl restart wsicapd.

  • See if there are any core dump files present on the system. For example in Ubuntu the core dumps are stored in /var/crash folder. Pack and send this core dump file to support@diladele.com.

  • If there is no core dump, try to run Web Safety ICAP daemon in the GDB debugger and reproduce the crash according to these instructions:

    1. Stop the daemon (systemctl stop wsicapd)

    2. Type as root in the terminal

      $ gdb /opt/websafety/bin/wsicapd --nodaemon
      
      handle SIGPIPE pass nostop noprint
      handle SIGTERM pass nostop noprint
      handle SIGUSR1 pass nostop noprint
      handle SIGSEGV stop
      handle SIGABRT stop
      run -DNYCX
      [wait for crash]
      backtrace
      generate-core-file
      quit
      
    3. Restart Squid and wait until crash occurs. Please send the core file to support@diladele.com and describe as fully as possible the situation when crash occurred.