websafety icon indicating copy to clipboard operation
websafety copied to clipboard

icap server keeps stopping and restarting.

Open MrErr opened this issue 2 years ago • 7 comments

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?

MrErr avatar Nov 25 '23 23:11 MrErr

The logs of ICAP are visible in UI / Web Filter / Logs - ICAP server. You can send it to [email protected] to analyze.

ra-at-diladele-com avatar Nov 26 '23 08:11 ra-at-diladele-com

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 avatar Nov 26 '23 12:11 MrErr

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 avatar Nov 26 '23 12:11 MrErr

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.

MrErr avatar Nov 26 '23 12:11 MrErr

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

ra-at-diladele-com avatar Nov 26 '23 13:11 ra-at-diladele-com

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.

MrErr avatar Nov 26 '23 13:11 MrErr