Gaierrors occur when the server network services are
not correctly configured or when a firewall is blocking nameserver
lookups.
Summary
Your server's domain name resolution (DNS lookup, name lookup) is not working correctly for some reason. Typically, this problem surfaces when sending mail from the Plone site, such as password recovery mails or new account registration mails.What to do
Ask your system administrator to configure the network correctly. Note that this could also be due to a firewall blocking nameserver access from the host, in which case your network administrator would be the person to call.Other indicators
- If you receive this error, you will also see that commands that access the network given in a command shell, such as
ping plone.org
, also are failing.
Example error screenshot
Technical description
Quoted from the Python documentation:
- exception gaierror
- This exception is raised for address-related errors, for getaddrinfo() and getnameinfo(). The accompanying value is a pair
(error, string)
representing an error returned by a library call. string represents the description of error, as returned by the gai_strerror() C function. The error value will match one of the EAI_* constants defined in this module.
In order to send partial responses (such as Acrobat Reader might issue for a web-optimized PDF), the File object uses the mimetypes.choose_boundary method to serve multiple such partial responses.
The choose_boundary method, in turn, attempts to generate a unique boundary string, and uses various OS parameters to do so. One of these is the ip address of the host, which choose_boundary obtains by looking at the current hostname, then asking for the ip address belonging to that hostname. The latter step fails.
You can reproduce this by opening a python interpreter prompt and typing the following:
>>> import socket >>> hostname = socket.gethostname() >>> print hostname yourhostnamehere >>> socket.gethostbyname(hostname) 'your.ip.address.here'The latter will probably throw the same error as above. To fix this you'll have to either bug your system admin, or acquire enough UNIX sysop knowledge to fix the problem yourself. I suspect that the hostname has no DNS entry anywhere; adding it to /etc/hosts should be enough.
No comments:
Post a Comment