rlm_ python how to find imported modules?
In sites-config/python there is python_path = ${modconfdir}/${.:name} I need /usr/lib/python2.7 in the path. I don't know hoe to add it. I tried setting the PYTHONPATH environment variabe before starting radiusd but that does not help. Thanks, Jim
Hi,
In sites-config/python there is
sites-config? non standard directory layout
python_path = ${modconfdir}/${.:name}
I need /usr/lib/python2.7 in the path. I don't know hoe to add it.
....well, if you know what you are doing, this current config sets the path to values in ${modconfdir}/${.:name} so python_path = /usr/lib/python2.7/ would be a starting point.....but I dont think the result is what you want... alan
Hi alan, Clearly I am clueless about what I am doing. The file is mods-enabled/python python_path = ${modconfdir}/${.:name}:/usr/lib/python2.7/ fixed the problem. Thanks, Jim On Mon, Feb 15, 2016 at 3:51 AM, <A.L.M.Buxey@lboro.ac.uk> wrote:
Hi,
In sites-config/python there is
sites-config?
non standard directory layout
python_path = ${modconfdir}/${.:name}
I need /usr/lib/python2.7 in the path. I don't know hoe to add it.
....well, if you know what you are doing, this current config sets the path to values in ${modconfdir}/${.:name}
so
python_path = /usr/lib/python2.7/
would be a starting point.....but I dont think the result is what you want...
alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
I only got so far and even with the help of a sysadmin we cannot resulve the issue import OpenSSL works fine from the command line but radiusd fails rlm_python:EXCEPT:<type 'exceptions.ImportError'>: No module named _ssl Nothing we have tried fixes the problem. The same version of python is running in the deamon but I notice the time is an hour off. in radiusd: *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 18:01:27) command line *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 17:58:13) How do I get radiusd to run python the same as from the command line? Thanks, Jim
import OpenSSL works fine from the command line but radiusd fails rlm_python:EXCEPT:<type 'exceptions.ImportError'>: No module named _ssl
When you do a 'find / -iname _ssl.so', where is the .so located?
Nothing we have tried fixes the problem. The same version of python is running in the deamon but I notice the time is an hour off.
in radiusd: *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 18:01:27) command line *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 17:58:13)
Time's not an hour off... that's 3 minutes apart... Stefan Paetow Moonshot Industry & Research Liaison Coordinator t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet jisc.ac.uk Networkshop44, University of Manchester. Save the date: 22-24 March, 2016. #NWS44 Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200.
Thanks all for helping me find the issue. Turned out I did miss a piece of the path somehow. Finding _ssl.o exposed my oversight. I feel bad now to have bothered you and appreciate your indulgence. Finally freeradius is working wonderfully for me :-) Thanks, Jim On Mon, Feb 22, 2016 at 4:21 AM, Stefan Paetow <Stefan.Paetow@jisc.ac.uk> wrote:
import OpenSSL works fine from the command line but radiusd fails rlm_python:EXCEPT:<type 'exceptions.ImportError'>: No module named _ssl
When you do a 'find / -iname _ssl.so', where is the .so located?
Nothing we have tried fixes the problem. The same version of python is running in the deamon but I notice the time is an hour off.
in radiusd: *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 18:01:27) command line *** radlog call in authorize ***2.7.6 (default, Jun 22 2015, 17:58:13)
Time's not an hour off... that's 3 minutes apart...
Stefan Paetow Moonshot Industry & Research Liaison Coordinator
t: +44 (0)1235 822 125 gpg: 0x3FCE5142 xmpp: stefanp@jabber.dev.ja.net skype: stefan.paetow.janet
jisc.ac.uk
Networkshop44, University of Manchester. Save the date: 22-24 March, 2016. #NWS44
Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.
Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under Company No. number 2881024, VAT No. GB 197 0632 86. The registered office is: Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T 01235 822200.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 19 Feb 2016, at 04:32, Jim Whitescarver <jimscarver@gmail.com> wrote:
How do I get radiusd to run python the same as from the command line?
Depends how you run python from the command line. Are you using a virtualenv from the cli? Run 'env | grep VIRTUAL_ENV' to check. If you are, you'll need to read the virtualenv manual on how to configure it for an embedded interpreter. Run 'which python' to find the location of your interpreter. Tell FreeRADIUS to use that. Open up the REPL and run: import sys print(sys.path) Build FreeRADIUS' PYTHONPATH value from those values. Regards, Adam Bishop Systems Development Specialist gpg: 0x6609D460 t: +44 (0)1235 822 245 xmpp: adamb@jabber.dev.ja.net jisc.ac.uk | Networkshop 44: Save the date! | 22-24 March 2016 @ University of Manchester Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Adam Bishop -
Jim Whitescarver -
Stefan Paetow