Bug #383
Exception thrown: Name or service not known
0%
Description
On one installation the following error when attempting to test a user:
Unexpected error "<class 'socket.gaierror'>" from python handler: "[Errno -2] Name or service not known"
Below is the traceback:
Traceback (most recent call last): File "/opt/splunk/lib/python2.7/site-packages/splunk/admin.py", line 64, in init hand.execute(info) File "/opt/splunk/lib/python2.7/site-packages/splunk/admin.py", line 447, in execute if self.requestedAction == ACTION_EDIT: self.handleEdit(confInfo) File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth_rest_handler.py", line 84, in wrapper r = fx(self, *args) File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth_rest_handler.py", line 291, in handleEdit cleaned_params = RadiusAuthRestHandler.checkConf(new_settings, name, confInfo) File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth_rest_handler.py", line 338, in checkConf validator.validate( stanza, cleaned_params ) File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth_rest_handler.py", line 77, in validate values['test_password'] ): File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth_rest_handler.py", line 56, in testSettings return ra.authenticate(username, password, False) File "/opt/splunk/etc/apps/radius_auth/bin/radius_auth.py", line 461, in authenticate reply=srv.SendPacket(req) File "/opt/splunk/etc/apps/radius_auth/bin/pyrad/client.py", line 159, in SendPacket return self._SendPacket(pkt, self.authport) File "/opt/splunk/etc/apps/radius_auth/bin/pyrad/client.py", line 123, in _SendPacket self._socket.sendto(pkt.RequestPacket(), (self.server, port)) gaierror: [Errno -2] Name or service not known
History
#1 Updated by Luke Murphey almost 12 years ago
This is being thrown by the pyrad client when attempting to send the packet:
self._socket.sendto(pkt.RequestPacket(), (self.server, port)
_socket is an instance of socket (imported from socket). See http://svn.python.org/projects/python/trunk/Lib/socket.py.
The gaierror seems to be thrown for errors related to inability to resolve the host name:
- socket.gaierror: exception raised for getaddrinfo/getnameinfo errors,
a subclass of socket.error
[Reference socketmodule.c]
I'm guessing this is due to an invalid host name (or some other reason that prevents the host name from being resolved).
#2 Updated by Luke Murphey almost 12 years ago
- Status changed from New to In Progress
#3 Updated by Luke Murphey almost 12 years ago
Here is a link to a description of the gaierror: http://docs.python.org/library/socket.html#socket.gaierror
#4 Updated by Luke Murphey almost 12 years ago
Issue was apparently due to an incorrect IP address being enter for the RADIUS server.
#5 Updated by Luke Murphey almost 12 years ago
- Status changed from In Progress to Rejected