Служба Freeradius не работает: процесс: 6181 ExecStartPre = / usr / sbin / freeradius $ FREERADIUS_OPTIONS -Cxm -lstdout (код = выход, статус = 1 / отказ) - PullRequest
0 голосов
/ 07 ноября 2019

Я взял сервер-радиус у коллеги, и он использовал freeradius 2.2.8.

Я установил freeradius 3.0.16 на Linux Ubuntu 18.04 с sudo apt-get install freeradius, но когда я пытаюсь использоватьего старые файлы конфигурации, мой сервис freeradius не запускается.

Как вы можете видеть ниже, я получил 2 ошибки.

Я не очень специалист в этой теме.

Кто-нибудь может мне помочь, чтобы направиться в правильном направлении?

Большое спасибо заранее.

admin@ubuntu-de-01:/etc$ service freeradius status
● freeradius.service - FreeRADIUS multi-protocol policy server
   Loaded: loaded (/lib/systemd/system/freeradius.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2019-11-07 10:13:24 CET; 3s ago
     Docs: man:radiusd(8)
           man:radiusd.conf(5)
           http://wiki.freeradius.org/
           http://networkradius.com/doc/
  Process: 8651 ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout (code=exited, status=1/FAILURE)

admin@ubuntu-de-01:/etc/freeradius$ sudo /usr/sbin/freeradius -C -lstdout -xxx


/etc/freeradius/3.0/modules/otp
Thu Nov  7 10:15:30 2019 : Debug: including configuration file /etc/freeradius/3.0/modules/krb5
Thu Nov  7 10:15:30 2019 : Debug: including configuration file /etc/freeradius/3.0/modules/unix
Thu Nov  7 10:15:30 2019 : Debug: including configuration file /etc/freeradius/3.0/modules/sql_log
Thu Nov  7 10:15:30 2019 : Error: /etc/freeradius/3.0/modules/sql_log[79]: Syntax error: Expected comma after 'UPDATE radacct     SET        acctstoptime       =  '%S',             acctsessiontime    =  unix_timestamp('%S') -                                  unix_timestamp(acctstarttime),       acctterminatecause =  '%{Acct-Terminate-Cause}',        acctstopdelay      =  %{%{Acct-Delay-Time}:-0}       WHERE acctstoptime IS NULL      AND nasipaddress      =  '%{NAS-IP-Address}'       AND acctstarttime     <= '%S'': "
Thu Nov  7 10:15:30 2019 : Error: Errors reading or parsing /etc/freeradius/3.0/radiusd.conf


sql_log from line 70 to 79:

    Accounting-On = "UPDATE ${acct_table} \
      SET \
         acctstoptime       =  '%S', \
         acctsessiontime    =  unix_timestamp('%S') - \
                               unix_timestamp(acctstarttime), \
         acctterminatecause =  '%{Acct-Terminate-Cause}', \
         acctstopdelay      =  %{%{Acct-Delay-Time}:-0} \
      WHERE acctstoptime IS NULL \
      AND nasipaddress      =  '%{NAS-IP-Address}' \
      AND acctstarttime     <= '%S'""

1 Ответ

1 голос
/ 08 ноября 2019

закрыть с; "вместо" ":

Accounting-On = "UPDATE ${acct_table} \
  SET \
  acctstoptime       =  '%S', \
 acctsessiontime    =  unix_timestamp('%S') - \
                       unix_timestamp(acctstarttime), \
 acctterminatecause =  '%{Acct-Terminate-Cause}', \
 acctstopdelay      =  %{%{Acct-Delay-Time}:-0} \
 WHERE acctstoptime IS NULL \
AND nasipaddress      =  '%{NAS-IP-Address}' \
AND acctstarttime     <= '%S';"
...