Log full of openconnect errors

My log is full of this error. I have configured openconnect client vpn connections on my router to not have to configure vpns on a laptop. It all works but log is full of this error, what can be the cause of this? I do not have openconnect server on my router just clients.

daemon.err uhttpd[2866]: error connecting to ocserv socket '/var/run/occtl.socket': No such file or directory

there's got to be some current or old OC config on the router, or uhttpd wouldn't try to access this ...

what's in /etc/config/uhttpd ?

Contents of that file is.

I also have disabled ocserv

config uhttpd 'main'
        #list listen_http ''
        list listen_http ''
        #list listen_http '[::]:80'
        #list listen_https ''
        list listen_https ''
        #list listen_https '[::]:443'
        option redirect_https '0'
        option home '/www'
        option rfc1918_filter '1'
        option max_requests '3'
        option max_connections '100'
        option cert '/etc/uhttpd.crt'
        option key '/etc/uhttpd.key'
        option cgi_prefix '/cgi-bin'
        list lua_prefix '/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua'
        option script_timeout '60'
        option network_timeout '30'
        option http_keepalive '20'
        option tcp_keepalive '1'
        option ubus_prefix '/ubus'

config cert 'defaults'
        option days '730'
        option key_type 'ec'
        option bits '2048'
        option ec_curve 'P-256'
        option country 'ZZ'
        option state 'Somewhere'
        option location 'Unknown'
        option commonname 'OpenWrt'

I assume you don't have multiple uhttpds running ... ?

are/were there any OC packages ever installed on the router ?

Currently there are installed these

luci-proto-openconnect - git-23.039.28644-b200e0e
openconnect - 9.01-1

I do not run multiple uhttpd.

Can you show the output of the following command please?

ubus call system board;

I could imagine the luci package trying to connect to the OC daemon,
which would generate the error message, if it wasn't started.

Here is output of that command

        "kernel": "5.15.93",
        "hostname": "OpenWrt",
        "system": "Atheros AR9344 rev 2",
        "model": "Netgear WNDR3700 v4",
        "board_name": "netgear,wndr3700-v4",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r22075-8c3bcc1989",
                "target": "ath79/nand",
                "description": "OpenWrt SNAPSHOT r22075-8c3bcc1989"

Why would it try to connect to openconnect server when i did not configure it and even have ocserv stopped/disabled.

because it's part of the openwrt webui, and it doesn't know the server is stopped/disabled.
if you want to get rid of it, uninstall the luci package.

you might also consider using stable, instead of snapshot, but it won't solve this "problem".

I am using snapshot for more then 6 years and never had any problem with it.

I think i got it. For client to work i do not need that luci package i guess openconnect package is enough. i'll build now firmware excluding that package and see if it helps.

probably, you could rewrite the luci code to have it check the status of the daemon or file, before it'd try to connect to it.

you just said OC daemon wasn't enabled, do you need those packages at all ?

Oh i found package which is a problem. luci-app-ocserv did not notice it because i was grepping openconnect from installed pacakges. :smiley:

I updated firmware and remove that package it fixed this problem.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.