diladele / websafety

Simple and powerful web filter for HTTP and HTTPS traffic
https://www.diladele.com
241 stars 24 forks source link

icap server keeps stopping and restarting. #2165

Open MrErr opened 7 months ago

MrErr commented 7 months ago

Hi,

I updated to websafety 8.7 from 8.6. The backup and restore utility was used to transfer over the settings. Now the icap server keeps stopping and restarting. It makes web browsing annoying. Are there any log files I can look at to figure out what is happening?

ra-at-diladele-com commented 7 months ago

The logs of ICAP are visible in UI / Web Filter / Logs - ICAP server. You can send it to support@diladele.com to analyze.

MrErr commented 7 months ago

Here is what I see when i go there.

Cannot read log file /opt/websafety/var/log/wsicapd.log, error: Cannot read the file /opt/websafety/var/log/wsicapd.log, stderr: sudo: unable to send audit message: Operation not permitted /usr/bin/tail: cannot open '/opt/websafety/var/log/wsicapd.log' for reading: No such file or directory , stdout:

MrErr commented 7 months ago

when i go into that directory above the only files I find are root@websafety-open:/opt/websafety/var/log# ls -rtl total 24 -rw-r--r--. 1 proxy proxy 2611 Nov 26 06:17 cron_license.log -rw-r--r--. 1 proxy root 106 Nov 26 06:17 product.version -rw-r--r--. 1 proxy proxy 13416 Nov 26 06:17 cron_update.log

When I go into cron_license.log I find this error

2023/11/26 06:17:01 map[Metadata:[true]] 2023/11/26 06:17:16 Fatal error: Get "http://169.254.169.254/metadata/instance?api-version=2017-08-01": context deadline exceeded (Client.Timeout exceeded while awaiting headers) panic: Fatal error: Get "http://169.254.169.254/metadata/instance?api-version=2017-08-01": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

goroutine 1 [running]: log.Panicf({0x6b436b?, 0x12?}, {0xc000099d00?, 0xe?, 0x6b2970?}) /home/builder/diladele/websafety-core/contrib/go/1.18.6/amd64/linux/go/src/log/log.go:392 +0x67 main.main() /home/builder/diladele/websafety-core/src.go/src/diladele/license/licenser/main.go:42 +0x66d

In cron_update.log I find this error

2023/11/26 06:17:25 Deploying definition files from /opt/websafety/var/temp/updater_temp_iwf into /opt/websafety/var/spool/iwf... 2023/11/26 06:17:25 PANIC CRITICAL: cannot rename /opt/websafety/var/temp/updater_temp_iwf directory to /opt/websafety/var/spool/iwf 2023/11/26 06:17:25 Fatal error: rename /opt/websafety/var/temp/updater_temp_iwf /opt/websafety/var/spool/iwf: invalid cross-device link

MrErr commented 7 months ago

I can create the file wsicapd.log using touch, but the file never gets updated and the icap server keeps restarting.

I am using the docker image for version 8.7.

ra-at-diladele-com commented 7 months ago

Something is wrong with permissions most probably, what os you run the docker on? RHEL?

MrErr commented 7 months ago

This is being tested on fedora 39. Downgrading to Websafety-8.6 works. If you can duplicate the problem on RHEL, it should be good enough. I have a test version of the Websafety-8.7 running in another container.

I was able to create the file using touch, which led me to believe it is not a permission problem. Also there is enough disk space, so that isn't a problem too.