Centos 7 Minimal - Abills 0.75(radiusd -X error)

Установка, настройка, поддержка
Ответить
darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Пн ноя 19, 2018 4:09 am

Всем привет!

Появилась задача подключить небольшой колхоз(~30 домов) к интеренету. Опыта в этом целый ноль. Ну ладно, сетью займется друг, который вроде шарит, моя задача биллинг. Ну а теперь по проблеме :D

Ставлю на средненький ноутбук(4 GB, 2 core) Lenovo, делаю все по инструкции http://abills.net.ua/wiki/doku.php/abil ... _centos:ru
Ставлю на Centos 7 Minimal(нравится мне Centos), на шаге - Копируем конфигурационные скрипты (выполнять построчно):, у меня нет папки - modules - cp /usr/abills/misc/freeradius/v3/perl /usr/local/freeradius/etc/raddb/modules/, OK не проблема, MKDIR. Далее установка Freeradius, но на шаге - Запуск radius в режиме отладки - # radiusd -X выходит вот такое:

Код: Выделить всё

[root@localhost modules]# 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/freeradius/share/freeradius/dictionary
including dictionary file /usr/local/freeradius/share/freeradius/dictionary.dhcp
including dictionary file /usr/local/freeradius/share/freeradius/dictionary.vqp
including dictionary file /usr/local/freeradius/etc/raddb/dictionary
including configuration file /usr/local/freeradius/etc/raddb/radiusd.conf
including configuration file /usr/local/freeradius/etc/raddb/clients.conf
including files in directory /usr/local/freeradius/etc/raddb/modules/
including configuration file /usr/local/freeradius/etc/raddb/modules/perl
including configuration file /usr/local/freeradius/etc/raddb/sql.conf
including configuration file /usr/local/freeradius/etc/raddb/policy.conf
Unable to open file "/usr/local/freeradius/etc/raddb/policy.conf": No such file or directory
Errors reading or parsing /usr/local/freeradius/etc/raddb/radiusd.conf
, ну чтож продолжаем далее:

Код: Выделить всё

[root@localhost tmp]# service radiusd start
Redirecting to /bin/systemctl start radiusd.service
Job for radiusd.service failed because the control process exited with error code. See "systemctl status radiusd.service" and "journalctl -xe" for details.
[root@localhost tmp]# service radiusd status
Redirecting to /bin/systemctl status radiusd.service
● radiusd.service - FreeRADIUS Server
   Loaded: loaded (/etc/systemd/system/radiusd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-11-19 10:03:49 +06; 9s ago
  Process: 1546 ExecStartPre=/usr/local/freeradius/sbin/radiusd -C (code=exited, status=1/FAILURE)
  Process: 1544 ExecStartPre=/usr/bin/chown -R freerad:freerad /var/run/radiusd (code=exited, status=0/SUCCESS)
  Process: 1542 ExecStartPre=/usr/bin/mkdir -p /var/run/radiusd (code=exited, status=0/SUCCESS)
  Process: 1540 ExecStartPre=/usr/bin/chown freerad:freerad /usr/local/freeradius/var/log/radius.log (code=exited, status=0/SUCCESS)
  Process: 1539 ExecStartPre=/usr/bin/touch /usr/local/freeradius/var/log/radius.log (code=exited, status=0/SUCCESS)

Nov 19 10:03:49 localhost.localdomain systemd[1]: Starting FreeRADIUS Server...
Nov 19 10:03:49 localhost.localdomain systemd[1]: radiusd.service: control process exited, co...=1
Nov 19 10:03:49 localhost.localdomain systemd[1]: Failed to start FreeRADIUS Server.
Nov 19 10:03:49 localhost.localdomain systemd[1]: Unit radiusd.service entered failed state.
Nov 19 10:03:49 localhost.localdomain systemd[1]: radiusd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Ну и вот, не поднимается Radius(
Помогите пожалуйста

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Пн ноя 19, 2018 3:47 pm

Или что, Centos плохо поддерживается Abills' ом? Посоветуйте пожалуйста тогда стабильную OS для Abills'а. Я так понимаю это FreeBSD?

vitaliy.k
Сообщения: 7
Зарегистрирован: Вт окт 30, 2018 7:33 pm

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение vitaliy.k » Пн ноя 19, 2018 9:31 pm

Актуальная и свежая документация в конфлюэнс.
Вам сюда : Установка ABillS на CentOS
Но вообще есть авто-инсталлер, почитать можна тут : Автоматическая установка

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Вт ноя 20, 2018 4:33 pm

Спасибо большое за актуальную версию, но и тут не вышло (( когда ставил пакеты - cd /usr/abills/misc/ && perl perldeps.pl rpm -batch - никак не получалось установить пакет Devel::NYTProf

Код: Выделить всё

[root@localhost misc]# cpanm Devel::NYTProf
--> Working on Devel::NYTProf
Fetching http://www.cpan.org/authors/id/T/TI/TIMB/Devel-NYTProf-6.06.tar.gz ... OK
Configuring Devel-NYTProf-6.06 ... OK
==> Found dependencies: File::Which, Test::Differences, JSON::MaybeXS
--> Working on File::Which
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/File-Which-1.22.tar.gz ... OK
Configuring File-Which-1.22 ... OK
Building and testing File-Which-1.22 ... FAIL
! Installing File::Which failed. See /root/.cpanm/work/1542702782.3870/build.log for details. Retry with --force to force install it.
--> Working on Test::Differences
Fetching http://www.cpan.org/authors/id/D/DC/DCANTRELL/Test-Differences-0.64.tar.gz ... OK
Configuring Test-Differences-0.64 ... OK
==> Found dependencies: Capture::Tiny
--> Working on Capture::Tiny
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz ... OK
Configuring Capture-Tiny-0.48 ... OK
Building and testing Capture-Tiny-0.48 ... OK
Successfully installed Capture-Tiny-0.48
Building and testing Test-Differences-0.64 ... OK
Successfully installed Test-Differences-0.64
--> Working on JSON::MaybeXS
Fetching http://www.cpan.org/authors/id/H/HA/HAARG/JSON-MaybeXS-1.004000.tar.gz ... OK
Configuring JSON-MaybeXS-1.004000 ... OK
==> Found dependencies: JSON::PP
--> Working on JSON::PP
Fetching http://www.cpan.org/authors/id/I/IS/ISHIGAKI/JSON-PP-2.97001.tar.gz ... OK
Configuring JSON-PP-2.97001 ... OK
Building and testing JSON-PP-2.97001 ... OK
Successfully installed JSON-PP-2.97001 (upgraded from 2.27202)
Building and testing JSON-MaybeXS-1.004000 ... OK
Successfully installed JSON-MaybeXS-1.004000
! Installing the dependencies failed: Module 'File::Which' is not installed
! Bailing out the installation for Devel-NYTProf-6.06.
4 distributions installed
Установил "насильственно" cpan -f Devel::NYTProf
Надеюсь это нормально?

Далее все по инструкции прошло без сюрпризов, но на шаге Запуск radius в режиме отладки /usr/sbin/radiusd -X после большого числа строк система как будто бы зависла с сообщением - ready to process requests ну чтож ОК, ctrl+C продолжаем и вот после - service radiusd start выходит ошибка что радиус не поднялся, в логах вижу вот это:

Код: Выделить всё

Tue Nov 20 21:09:45 2018 : Info: Debugger not attached
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Tue Nov 20 21:09:45 2018 : Warning: [/usr/local/freeradius/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay" 	found in filter list for realm "DEFAULT". 
Tue Nov 20 21:09:45 2018 : Warning: [/usr/local/freeradius/etc/raddb/mods-config/attr_filter/access_reject]:11 Check item "FreeRADIUS-Response-Delay-USec" 	found in filter list for realm "DEFAULT". 
Tue Nov 20 21:09:45 2018 : Warning: rlm_eap (EAP): Ignoring EAP method tls because we don't have OpenSSL support
Tue Nov 20 21:09:45 2018 : Warning: rlm_eap (EAP): Ignoring EAP method ttls because we don't have OpenSSL support
Tue Nov 20 21:09:45 2018 : Warning: rlm_eap (EAP): Ignoring EAP method peap because we don't have OpenSSL support
Tue Nov 20 21:09:45 2018 : Info: rlm_sql_mysql: libmysql version: 5.7.23-24
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Attempting to connect to database "abills"
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Opening additional connection (0), 1 of 10 pending slots used
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Opening additional connection (1), 1 of 9 pending slots used
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Opening additional connection (2), 1 of 8 pending slots used
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Opening additional connection (3), 1 of 7 pending slots used
Tue Nov 20 21:09:45 2018 : Info: rlm_sql (sql): Opening additional connection (4), 1 of 6 pending slots used
Tue Nov 20 21:09:45 2018 : Info: Loaded virtual server <default>
Tue Nov 20 21:09:45 2018 : Info: Loaded virtual server default
Tue Nov 20 21:09:45 2018 : Info: Ready to process requests
Tue Nov 20 21:11:15 2018 : Info: Signalled to terminate
Tue Nov 20 21:11:15 2018 : Info: Exiting normally
Tue Nov 20 21:11:15 2018 : Info: rlm_sql (sql): Closing connection (4)
Tue Nov 20 21:11:15 2018 : Info: rlm_sql (sql): Closing connection (3)
Tue Nov 20 21:11:15 2018 : Info: rlm_sql (sql): Closing connection (2)
Tue Nov 20 21:11:15 2018 : Info: rlm_sql (sql): Closing connection (1)
Tue Nov 20 21:11:15 2018 : Info: rlm_sql (sql): Closing connection (0)
проблема в БД? потому как ну очень старый ноут, и там еле еле крутится винт

journalctl -xe

Код: Выделить всё

-- The start-up result is done.
Nov 20 20:55:27 localhost.localdomain polkitd[671]: Registered Authentication Agent for unix-process:1658:19226 (system bus name :1.27
Nov 20 20:55:27 localhost.localdomain systemd[1]: Starting FreeRADIUS Server...
-- Subject: Unit radiusd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit radiusd.service has begun starting up.
Nov 20 20:55:27 localhost.localdomain systemd[1]: PID file /var/run/radiusd/radiusd.pid not readable (yet?) after start.
Nov 20 20:56:57 localhost.localdomain systemd[1]: radiusd.service start operation timed out. Terminating.
Nov 20 20:56:57 localhost.localdomain systemd[1]: Failed to start FreeRADIUS Server.
-- Subject: Unit radiusd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit radiusd.service has failed.
-- 
-- The result is failed.
Nov 20 20:56:57 localhost.localdomain systemd[1]: Unit radiusd.service entered failed state.
Nov 20 20:56:57 localhost.localdomain systemd[1]: radiusd.service failed.
Nov 20 20:56:57 localhost.localdomain polkitd[671]: Unregistered Authentication Agent for unix-process:1658:19226 (system bus name :1.
lines 2441-2482/2482 (END)

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Ср ноя 28, 2018 3:31 am

Я так понимаю я поймал какую то супер непонятную ошибку, связанную с фиг пойми чем, и это может быть все что угодно? или мне откатиться на более раннюю версию freeradius'а? 2.10.10 как такая идея?

vitaliy.k
Сообщения: 7
Зарегистрирован: Вт окт 30, 2018 7:33 pm

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение vitaliy.k » Чт ноя 29, 2018 8:40 am

Откат не надо.
Что выдает если непосредственно запустить :

Код: Выделить всё

/usr/local/freeradius/sbin/radiusd -d /usr/local/freeradius/etc/raddb -X
?

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Вт дек 04, 2018 5:21 am

выдает лог действий как от команды radiusd -X
там много текста и вот конец

Код: Выделить всё

   }
rlm_sql (sql): Opening additional connection (0), 1 of 10 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'abills' on Localhost via UNIX socket, server version 5.7.23-25, protocol version 10
rlm_sql (sql): Opening additional connection (1), 1 of 9 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'abills' on Localhost via UNIX socket, server version 5.7.23-25, protocol version 10
rlm_sql (sql): Opening additional connection (2), 1 of 8 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'abills' on Localhost via UNIX socket, server version 5.7.23-25, protocol version 10
rlm_sql (sql): Opening additional connection (3), 1 of 7 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'abills' on Localhost via UNIX socket, server version 5.7.23-25, protocol version 10
rlm_sql (sql): Opening additional connection (4), 1 of 6 pending slots used
rlm_sql_mysql: Starting connect to MySQL server
rlm_sql_mysql: Connected to database 'abills' on Localhost via UNIX socket, server version 5.7.23-25, protocol version 10
rlm_sql (sql): Processing generate_sql_clients
rlm_sql (sql) in generate_sql_clients: query is SET sql_mode=''; SELECT ip, INET_NTOA(ip), CONCAT('NAS_', id), nas_type, DECODE(mng_password, 'test12345678901234567890') FROM nas  WHERE disable=0 GROUP BY ip
rlm_sql (sql): Reserved connection (0)
rlm_sql (sql): Executing select query: SET sql_mode=''; SELECT ip, INET_NTOA(ip), CONCAT('NAS_', id), nas_type, DECODE(mng_password, 'test12345678901234567890') FROM nas  WHERE disable=0 GROUP BY ip
rlm_sql (sql): Adding client 127.0.0.1 (NAS_1) to global clients list
rlm_sql (127.0.0.1): Client "NAS_1" (sql) added
rlm_sql (sql): Released connection (0)
 } # modules
radiusd: #### Loading Virtual Servers ####
server { # from file /usr/local/freeradius/etc/raddb/radiusd.conf
} # server
server default { # from file /usr/local/freeradius/etc/raddb/sites-enabled/abills_default
 # Loading authenticate {...}
 # Loading authorize {...}
 # Loading preacct {...}
 # Loading accounting {...}
 # Loading post-auth {...}
} # server default
radiusd: #### Opening IP addresses and Ports ####
listen {
  	type = "auth"
  	ipaddr = *
  	port = 0
   limit {
   	max_connections = 16
   	lifetime = 0
   	idle_timeout = 30
   }
}
listen {
  	type = "acct"
  	ipaddr = *
  	port = 0
   limit {
   	max_connections = 16
   	lifetime = 0
   	idle_timeout = 30
   }
}
listen {
  	type = "auth"
  	ipv6addr = ::
  	port = 0
   limit {
   	max_connections = 16
   	lifetime = 0
   	idle_timeout = 30
   }
}
listen {
  	type = "acct"
  	ipv6addr = ::
  	port = 0
   limit {
   	max_connections = 16
   	lifetime = 0
   	idle_timeout = 30
   }
}
Listening on auth address * port 1812 bound to server default
Listening on acct address * port 1813 bound to server default
Listening on auth address :: port 1812 bound to server default
Listening on acct address :: port 1813 bound to server default
Listening on proxy address * port 40861
Listening on proxy address :: port 39584
Ready to process requests
и все, тишина...
могу весь лог скинуть, если надо

~AsmodeuS~
Site Admin
Сообщения: 5604
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение ~AsmodeuS~ » Вт дек 04, 2018 6:35 am

Нет запросов к радиус серверу

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Ср дек 05, 2018 3:22 am

~AsmodeuS~ писал(а):
Вт дек 04, 2018 6:35 am
Нет запросов к радиус серверу
я так понимаю, что еще не запускаю сам радиус, идет обыкновенная установка(пошагово), устанавливаю всё-всё на 1 виртуальную машину и тут такая ошибка

пожалуйста разъясните

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Ср дек 05, 2018 3:56 am

короче чето с правами походу...

darkJazz
Сообщения: 8
Зарегистрирован: Пт ноя 16, 2018 11:20 am

Re: Centos 7 Minimal - Abills 0.75(radiusd -X error)

Сообщение darkJazz » Ср дек 05, 2018 4:24 am

darkJazz писал(а):
Ср дек 05, 2018 3:56 am
короче чето с правами походу...
сделал тыщу движений с правами, случайно перегрузил комп, заработало

Код: Выделить всё

[root@localhost bin]# ./radtest test 123456 127.0.0.1:1812 0 secretpass 0 127.0.0.1
Sent Access-Request Id 238 from 0.0.0.0:55728 to 127.0.0.1:1812 length 74
	User-Name = "test"
	User-Password = "123456"
	NAS-IP-Address = 127.0.0.1
	NAS-Port = 0
	Message-Authenticator = 0x00
	Cleartext-Password = "123456"
Received Access-Accept Id 238 from 127.0.0.1:1812 to 127.0.0.1:55728 length 44
	Acct-Interim-Interval = 300
	Session-Timeout = 2372342
	Framed-IP-Address = 10.0.0.45
	Framed-IP-Netmask = 255.255.255.255

Ответить