using multiple python modules.
Hello. I'm trying to use rlm_python module. but, I cannot use two modules. I want to know that is using two python modules possible or not. If you have some experience for Python module, a little help would be appreciated. thanks. -- radiusd logs Mon Feb 16 19:30:52 2015 : Debug: Loading library using absolute path "/usr/lib64/freeradius/rlm_python.so" Mon Feb 16 19:30:52 2015 : Debug: Loaded rlm_python, checking if it's valid Mon Feb 16 19:30:52 2015 : Debug: # Loaded module rlm_python Mon Feb 16 19:30:52 2015 : Debug: # Instantiating module "python2" from file /etc/raddb/mods-enabled/python2 Mon Feb 16 19:30:52 2015 : Debug: python python2 { Mon Feb 16 19:30:52 2015 : Debug: mod_instantiate = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_instantiate = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: mod_authorize = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_authorize = "authorize" Mon Feb 16 19:30:52 2015 : Debug: mod_authenticate = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_authenticate = "authenticate" Mon Feb 16 19:30:52 2015 : Debug: mod_preacct = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_accounting = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_checksimul = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_pre_proxy = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_post_proxy = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_post_auth = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_recv_coa = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_send_coa = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_detach = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_detach = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: } Mon Feb 16 19:30:52 2015 : Debug: mod_init done .... Mon Feb 16 19:30:52 2015 : Debug: # Instantiating module "python1" from file /etc/raddb/mods-enabled/python1 Mon Feb 16 19:30:52 2015 : Debug: python python1 { Mon Feb 16 19:30:52 2015 : Debug: mod_instantiate = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_instantiate = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: mod_authorize = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_authorize = "authorize" Mon Feb 16 19:30:52 2015 : Debug: mod_authenticate = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_authenticate = "authenticate" Mon Feb 16 19:30:52 2015 : Debug: mod_preacct = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_accounting = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_checksimul = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_pre_proxy = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_post_proxy = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_post_auth = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_recv_coa = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_send_coa = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_detach = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_detach = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: } Mon Feb 16 19:07:55 2015 : Error: rlm_python:mod_load_function: module 'example1' is not found Mon Feb 16 19:07:55 2015 : Error: rlm_python:EXCEPT:: local variable 'bError' referenced before assignment Mon Feb 16 19:07:55 2015 : Error: rlm_python:mod_load_function: failed to import python function example1.instantiate' Mon Feb 16 19:07:55 2015 : Error: /etc/raddb/mods-enabled/python1[9]: Instantiation failed for module "python1" -- execution environments export PYTHONPATH=/etc/raddb/mods-config/python i exported python module path. -- mods-enabled python python1 { module = example1 mod_instantiate = ${.module} func_instantiate = instantiate mod_detach = ${.module} func_detach = instantiate mod_authorize = ${.module} func_authorize = authorize mod_authenticate = ${.module} func_authenticate = authenticate mod_preacct = ${.module} # func_preacct = preacct mod_accounting = ${.module} # func_accounting = accounting mod_checksimul = ${.module} # func_checksimul = checksimul mod_pre_proxy = ${.module} # func_pre_proxy = pre_proxy mod_post_proxy = ${.module} # func_post_proxy = post_proxy mod_post_auth = ${.module} # func_post_auth = post_auth mod_recv_coa = ${.module} # func_recv_coa = recv_coa mod_send_coa = ${.module} # func_send_coa = send_coa } python python2 { module = example2 mod_instantiate = ${.module} func_instantiate = instantiate mod_detach = ${.module} func_detach = instantiate mod_authorize = ${.module} func_authorize = authorize mod_authenticate = ${.module} func_authenticate = authenticate mod_preacct = ${.module} # func_preacct = preacct mod_accounting = ${.module} # func_accounting = accounting mod_checksimul = ${.module} # func_checksimul = checksimul mod_pre_proxy = ${.module} # func_pre_proxy = pre_proxy mod_post_proxy = ${.module} # func_post_proxy = post_proxy mod_post_auth = ${.module} # func_post_auth = post_auth mod_recv_coa = ${.module} # func_recv_coa = recv_coa mod_send_coa = ${.module} # func_send_coa = send_coa }
On 16 Feb 2015, at 20:04, Kyuyoung Kim <jadebrill@gmail.com> wrote:
Hello.
I'm trying to use rlm_python module. but, I cannot use two modules. I want to know that is using two python modules possible or not.
Should be.
If you have some experience for Python module, a little help would be appreciated.
Error messages look consistent with the module (example1) not being found? -Arran
thanks.
-- radiusd logs
Mon Feb 16 19:30:52 2015 : Debug: Loading library using absolute path "/usr/lib64/freeradius/rlm_python.so" Mon Feb 16 19:30:52 2015 : Debug: Loaded rlm_python, checking if it's valid Mon Feb 16 19:30:52 2015 : Debug: # Loaded module rlm_python Mon Feb 16 19:30:52 2015 : Debug: # Instantiating module "python2" from file /etc/raddb/mods-enabled/python2 Mon Feb 16 19:30:52 2015 : Debug: python python2 { Mon Feb 16 19:30:52 2015 : Debug: mod_instantiate = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_instantiate = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: mod_authorize = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_authorize = "authorize" Mon Feb 16 19:30:52 2015 : Debug: mod_authenticate = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_authenticate = "authenticate" Mon Feb 16 19:30:52 2015 : Debug: mod_preacct = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_accounting = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_checksimul = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_pre_proxy = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_post_proxy = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_post_auth = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_recv_coa = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_send_coa = "example2" Mon Feb 16 19:30:52 2015 : Debug: mod_detach = "example2" Mon Feb 16 19:30:52 2015 : Debug: func_detach = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: } Mon Feb 16 19:30:52 2015 : Debug: mod_init done
....
Mon Feb 16 19:30:52 2015 : Debug: # Instantiating module "python1" from file /etc/raddb/mods-enabled/python1 Mon Feb 16 19:30:52 2015 : Debug: python python1 { Mon Feb 16 19:30:52 2015 : Debug: mod_instantiate = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_instantiate = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: mod_authorize = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_authorize = "authorize" Mon Feb 16 19:30:52 2015 : Debug: mod_authenticate = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_authenticate = "authenticate" Mon Feb 16 19:30:52 2015 : Debug: mod_preacct = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_accounting = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_checksimul = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_pre_proxy = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_post_proxy = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_post_auth = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_recv_coa = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_send_coa = "example1" Mon Feb 16 19:30:52 2015 : Debug: mod_detach = "example1" Mon Feb 16 19:30:52 2015 : Debug: func_detach = "instantiate" Mon Feb 16 19:30:52 2015 : Debug: } Mon Feb 16 19:07:55 2015 : Error: rlm_python:mod_load_function: module 'example1' is not found Mon Feb 16 19:07:55 2015 : Error: rlm_python:EXCEPT:: local variable 'bError' referenced before assignment Mon Feb 16 19:07:55 2015 : Error: rlm_python:mod_load_function: failed to import python function example1.instantiate' Mon Feb 16 19:07:55 2015 : Error: /etc/raddb/mods-enabled/python1[9]: Instantiation failed for module "python1"
-- execution environments export PYTHONPATH=/etc/raddb/mods-config/python
i exported python module path.
-- mods-enabled
python python1 { module = example1
mod_instantiate = ${.module} func_instantiate = instantiate
mod_detach = ${.module} func_detach = instantiate
mod_authorize = ${.module} func_authorize = authorize
mod_authenticate = ${.module} func_authenticate = authenticate
mod_preacct = ${.module} # func_preacct = preacct
mod_accounting = ${.module} # func_accounting = accounting
mod_checksimul = ${.module} # func_checksimul = checksimul
mod_pre_proxy = ${.module} # func_pre_proxy = pre_proxy
mod_post_proxy = ${.module} # func_post_proxy = post_proxy
mod_post_auth = ${.module} # func_post_auth = post_auth
mod_recv_coa = ${.module} # func_recv_coa = recv_coa
mod_send_coa = ${.module} # func_send_coa = send_coa }
python python2 { module = example2
mod_instantiate = ${.module} func_instantiate = instantiate
mod_detach = ${.module} func_detach = instantiate
mod_authorize = ${.module} func_authorize = authorize
mod_authenticate = ${.module} func_authenticate = authenticate
mod_preacct = ${.module} # func_preacct = preacct
mod_accounting = ${.module} # func_accounting = accounting
mod_checksimul = ${.module} # func_checksimul = checksimul
mod_pre_proxy = ${.module} # func_pre_proxy = pre_proxy
mod_post_proxy = ${.module} # func_post_proxy = post_proxy
mod_post_auth = ${.module} # func_post_auth = post_auth
mod_recv_coa = ${.module} # func_recv_coa = recv_coa
mod_send_coa = ${.module} # func_send_coa = send_coa }
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (2)
-
Arran Cudbard-Bell -
Kyuyoung Kim