Jump to content

Помогите freeradius 3 + Mikrotik


Recommended Posts

Перепробовал 7 прошивок везде одна и таже петрушка:

Release 6.43.12

Release 6.42.12

Release 6.42.11

Release 6.42.10

Release 6.42.9

Release 6.40.9

Release 6.40.8

Скрытый текст

(46) Received Accounting-Request Id 7 from 172.24.254.52:36088 to 172.24.254.50:1813 length 44
(46)   Acct-Status-Type = Accounting-On
(46)   NAS-Identifier = "NAS1"
(46)   Acct-Delay-Time = 0
(46)   NAS-IP-Address = 172.24.254.52
(46) # Executing section preacct from file /usr/local/etc/raddb/sites-enabled/default
(46)   preacct {
(46)     [preprocess] = ok
(46)     policy acct_unique {
(46)       update request {
(46)         &Tmp-String-9 := "ai:"
(46)       } # update request = noop
(46)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&      ("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i)) {
(46)       EXPAND %{hex:&Class}
(46)          -->
(46)       EXPAND ^%{hex:&Tmp-String-9}
(46)          --> ^61693a
(46)       if (("%{hex:&Class}" =~ /^%{hex:&Tmp-String-9}/) &&      ("%{string:&Class}" =~ /^ai:([0-9a-f]{32})/i))  -> FALSE
(46)       else {
(46)         update request {
(46)           EXPAND %{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
(46)              --> 8e0199da000697f976cb21e0770bd579
(46)           &Acct-Unique-Session-Id := 8e0199da000697f976cb21e0770bd579
(46)         } # update request = noop
(46)       } # else = noop
(46)     } # policy acct_unique = noop
(46)   } # preacct = ok
(46) # Executing section accounting from file /usr/local/etc/raddb/sites-enabled/default
(46)   accounting {
(46) sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query}
(46) sql:    --> type.accounting-on.query
(46) sql: Using query template 'query'
rlm_sql (sql): Closing connection (64): Hit idle_timeout, was idle for 110 seconds
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Closing connection (66): Hit idle_timeout, was idle for 110 seconds
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Closing connection (63): Hit idle_timeout, was idle for 97 seconds
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Closing connection (67): Hit idle_timeout, was idle for 97 seconds
rlm_sql (sql): You probably need to lower "min"
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Closing connection (65): Hit idle_timeout, was idle for 65 seconds
rlm_sql (sql): You probably need to lower "min"
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): Closing connection (68): Hit idle_timeout, was idle for 65 seconds
rlm_sql (sql): You probably need to lower "min"
rlm_sql_mysql: Socket destructor called, closing socket
rlm_sql (sql): 0 of 0 connections in use.  You  may need to increase "spare"
rlm_sql (sql): Opening additional connection (69), 1 of 32 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'stg' on Localhost via UNIX socket, server version 5.6.42, protocol version 10
rlm_sql (sql): Reserved connection (69)
(46) sql: EXPAND %{User-Name}
(46) sql:    -->
(46) sql: SQL-User-Name set to ''
(46) sql: EXPAND UPDATE mlg_acct SET acctstoptime = FROM_UNIXTIME(%{integer:Event-Timestamp}), acctsessiontime  = '%{integer:Event-Timestamp}' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = '%{%{Acct-Terminate-Cause}:-NAS-Reboot}' WHERE acctstoptime IS NULL AND nasipaddress   = '%{NAS-IP-Address}' AND acctstarttime <= FROM_UNIXTIME(%{integer:Event-Timestamp})
(46) sql:    --> UPDATE mlg_acct SET acctstoptime = FROM_UNIXTIME(1550759188), acctsessiontime  = '1550759188' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = 'NAS-Reboot' WHERE acctstoptime IS NULL AND nasipaddress   = '172.24.254.52' AND acctstarttime <= FROM_UNIXTIME(1550759188)
(46) sql: Executing query: UPDATE mlg_acct SET acctstoptime = FROM_UNIXTIME(1550759188), acctsessiontime        = '1550759188' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = 'NAS-Reboot' WHERE acctstoptime IS NULL AND nasipaddress   = '172.24.254.52' AND acctstarttime <= FROM_UNIXTIME(1550759188)
rlm_sql_mysql: Rows matched: 0  Changed: 0  Warnings: 0
(46) sql: SQL query returned: success
(46) sql: 0 record(s) updated
(46) sql: No additional queries configured
rlm_sql (sql): Released connection (69)
Need 2 more connections to reach min connections (3)
rlm_sql (sql): Opening additional connection (70), 1 of 31 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'stg' on Localhost via UNIX socket, server version 5.6.42, protocol version 10
(46)    


 = noop

			(46)   } # accounting = noop

			(46) Not sending reply to client.

			(46) Finished request

			(46) Cleaning up request packet ID 7 with timestamp +2881

			Ready to process requests
		
	


 

Edited by Nerofar1
Link to post
Share on other sites

Всё проблема решена) спасибо в чате помогли, большое спасибо Roman Shevchenko, как всегда виновата прокладка между стулом и компом))

Безымянный.jpg

Link to post
Share on other sites
  • 2 years later...

добрый день нужна помощь не могу разобраться с radiusd  подскажите в чем причина

 

root@ubilling:~ # radiusd -X
FreeRADIUS Version 3.0.17
Copyright (C) 1999-2017 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
Starting - reading configuration files ...
including dictionary file /usr/local/share/freeradius/dictionary
including dictionary file /usr/local/share/freeradius/dictionary.dhcp
including dictionary file /usr/local/share/freeradius/dictionary.vqp
including dictionary file /usr/local/etc/raddb/dictionary
including configuration file /usr/local/etc/raddb/radiusd.conf
including files in directory /usr/local/etc/raddb/mods-enabled/
including configuration file /usr/local/etc/raddb/mods-enabled/attr_filter
including configuration file /usr/local/etc/raddb/mods-enabled/cache_eap
including configuration file /usr/local/etc/raddb/mods-enabled/chap
including configuration file /usr/local/etc/raddb/mods-enabled/date
including configuration file /usr/local/etc/raddb/mods-enabled/detail
including configuration file /usr/local/etc/raddb/mods-enabled/detail.log
including configuration file /usr/local/etc/raddb/mods-enabled/digest
including configuration file /usr/local/etc/raddb/mods-enabled/dynamic_clients
including configuration file /usr/local/etc/raddb/mods-enabled/eap
including configuration file /usr/local/etc/raddb/mods-enabled/echo
including configuration file /usr/local/etc/raddb/mods-enabled/exec
including configuration file /usr/local/etc/raddb/mods-enabled/expiration
including configuration file /usr/local/etc/raddb/mods-enabled/expr
including configuration file /usr/local/etc/raddb/mods-enabled/files
including configuration file /usr/local/etc/raddb/mods-enabled/linelog
including configuration file /usr/local/etc/raddb/mods-enabled/logintime
including configuration file /usr/local/etc/raddb/mods-enabled/mschap
including configuration file /usr/local/etc/raddb/mods-enabled/ntlm_auth
including configuration file /usr/local/etc/raddb/mods-enabled/pap
including configuration file /usr/local/etc/raddb/mods-enabled/passwd
including configuration file /usr/local/etc/raddb/mods-enabled/preprocess
including configuration file /usr/local/etc/raddb/mods-enabled/radutmp
including configuration file /usr/local/etc/raddb/mods-enabled/realm
including configuration file /usr/local/etc/raddb/mods-enabled/replicate
including configuration file /usr/local/etc/raddb/mods-enabled/soh
including configuration file /usr/local/etc/raddb/mods-enabled/sradutmp
including configuration file /usr/local/etc/raddb/mods-enabled/unix
including configuration file /usr/local/etc/raddb/mods-enabled/unpack
including configuration file /usr/local/etc/raddb/mods-enabled/utf8
including configuration file /usr/local/etc/raddb/mods-enabled/always
including configuration file /usr/local/etc/raddb/sql.conf
including configuration file /usr/local/etc/raddb/mods-config/sql/main/mysql/queries.conf
including files in directory /usr/local/etc/raddb/policy.d/
including configuration file /usr/local/etc/raddb/policy.d/accounting
including configuration file /usr/local/etc/raddb/policy.d/canonicalization
including configuration file /usr/local/etc/raddb/policy.d/control
including configuration file /usr/local/etc/raddb/policy.d/cui
including configuration file /usr/local/etc/raddb/policy.d/debug
including configuration file /usr/local/etc/raddb/policy.d/dhcp
including configuration file /usr/local/etc/raddb/policy.d/eap
including configuration file /usr/local/etc/raddb/policy.d/filter
including configuration file /usr/local/etc/raddb/policy.d/moonshot-targeted-ids
including configuration file /usr/local/etc/raddb/policy.d/operator-name
including configuration file /usr/local/etc/raddb/policy.d/abfab-tr
including files in directory /usr/local/etc/raddb/sites-enabled/
including configuration file /usr/local/etc/raddb/sites-enabled/inner-tunnel
including configuration file /usr/local/etc/raddb/sites-enabled/default
including configuration file /usr/local/etc/raddb/sites-enabled/innet-tunnel
/usr/local/etc/raddb/sites-enabled/innet-tunnel[52]: Expecting section start brace '{' after "and other"
Errors reading or parsing /usr/local/etc/raddb/radiusd.conf
root@ubilling:~ #
 

Link to post
Share on other sites
38 минут назад, Vitaliy1984 сказав:

добрый день нужна помощь не могу разобраться с radiusd  подскажите в чем причина

судя по этому

 

38 минут назад, Vitaliy1984 сказав:

Expecting section start brace '{' after "and other"
Errors reading or parsing /usr/local/etc/raddb/radiusd.conf

причина в вас.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By camchatix
      Привет!
       
      Начались необъяснимые глюки с базой ubilling
      сделали mysqldump на старой базе 5.6.36
      На свежей freebsd mysql server 5.6.51
      сделали импорт - и в карточке при обновлении страницы баланс показывает то одну цифру то другую
       
      подскажите как такое может быть и как вылечить ?
       
      вот -126 денег это правильно
       
      mysql> select login,D0,U0,Cash, LastCashAddTime   from users where login=65369051; +----------+------------+------------+---------+-----------------+ | login    | D0         | U0         | Cash    | LastCashAddTime | +----------+------------+------------+---------+-----------------+ | 65369051 | 3619373056 | 4680515584 | -126.07 |      1634677205 | +----------+------------+------------+---------+-----------------+ 1 row in set, 1 warning (0.00 sec)  
      через 3 минуты
      mysql> select login,D0,U0,Cash, LastCashAddTime from users where login=65369051; +----------+------------+------------+-------+-----------------+ | login | D0 | U0 | Cash | LastCashAddTime | +----------+------------+------------+-------+-----------------+ | 65369051 | 3555340288 | 3879243776 | 36.61 | 1634677203 | +----------+------------+------------+-------+-----------------+ 1 row in set, 1 warning (0.00 sec)  
      а тут 36 денег
      Как такое может быть ?
       
       
       
       
    • By Иван Авилов
      Краткое описание:

      -RB3011UiAS-RM - 10-ти портовый управляемый маршрутизатор с SFP. 10х10/100/1000 RJ45 ports, 1xSFP port, 1xRJ45 Serial port, USB 3.0 type A port. Процессор двухядерный  IPQ-8064 1.4 GHz, ОЗУ 1 GB, флэш память 128 MB. PoE in/PoE out. Адаптер питания 24V 1.2A. Корпус для монтажа в стойку.
      -в новом состоянии
      - в комплекте только маршрутизатор
      цена 2900грн.

    • By bourevestnik
      Продам наружные точки доступа Mikrotik SXT 2 2HnD б/у
      В наличии 4 шт
      POE питание и блок питания в комплекте.
      Цена комплекта 850 грн/шт



    • By ppv
      Підкажіть будь ласка щось не працює параметр, або я щось не розумію. Якщо абонплата 100 грн. (для прикладу) то, якщо  AUTOFREEZE_CASH_LIMIT="-2"  то морозити буде пр стані рахунку -200 грн. і 300 грн. і дальше в мінус ?
       
      Порог денег (отрицательный) для автозаморозки пользователя. Работает только при вызове из remote API. При использовании вызова autofreezemonth данная опция рассматривается как множитель (положительный) стоимости тарифа пользователя. Пользователь будет заморожен при состоянии счета ⇐ стоимости его тарифа умноженного на значение опции. AUTOFREEZE_CASH_LIMIT="-2" в кроні  запускається (завдання спрацьовує).
      /usr/local/bin/curl -o /dev/null "http://127.0.0.1:1111/billing/?module=remoteapi&key=1111111111111111111111111111111&action=autofreezemonth&param=nocredit"  
    • By nick.vacula
      Куплю Mikrotik CRS354-48P-4S+2Q+RM, можна легко вживаний.
×
×
  • Create New...