rakasatria / ovpn-radius

OpenVPN Radius Plugin | Go-based OpenVPN with Radius Authentication and Accounting
GNU General Public License v2.0
4 stars 5 forks source link

row not exists error, client authenticates but then auth fails #5

Open nandish486 opened 1 month ago

nandish486 commented 1 month ago
time="2024-07-06T08:31:20Z" level=info msg="main: running with username root"
time="2024-07-06T08:31:20Z" level=info msg="main: running with execution type 'auth'"
time="2024-07-06T08:31:20Z" level=info msg="authenticate: Autentication using filepath: /tmp/openvpn_up_44731ad83e96020112a1e84b7f8d8fc9.tmp"
time="2024-07-06T08:31:20Z" level=info msg="authenticate: trying to authenticate to 0.0.0.0:1812"
time="2024-07-06T08:31:20Z" level=info msg="authenticate: user 'xxx' with class '' is authenticated sucessfully"
time="2024-07-06T08:31:20Z" level=info msg="main: running with username root"
time="2024-07-06T08:31:20Z" level=info msg="main: running with execution type 'acct'"
time="2024-07-06T08:31:20Z" level=info msg="accountingRequest: prepare send request to 0.0.0.0:1813 with request type: start"
time="2024-07-06T08:31:20Z" level=info msg="accountingRequest: get user data with Id x.x.x.x:4332"
time="2024-07-06T08:31:20Z" level=error msg="accountingRequest: Error: row not exists"
time="2024-07-06T08:31:20Z" level=info msg="main: running with username root"
time="2024-07-06T08:31:20Z" level=info msg="main: running with execution type 'stop'"
time="2024-07-06T08:31:20Z" level=info msg="accountingRequest: prepare send request to 0.0.0.0:1813 with request type: stop"
time="2024-07-06T08:31:20Z" level=info msg="accountingRequest: get user data with Id x.x.x.x:4332"
time="2024-07-06T08:31:20Z" level=error msg="accountingRequest: Error: row not exists"

Above are the logs.

User authenticates but fails next, due to error row not exits. I think this problem is related to the db file. please help me regarding.

schwichtgit commented 1 week ago

please note my comment of class in https://github.com/rakasatria/ovpn-radius/issues/7 that will address your issue.