Error: gaierror: (-2, 'Name or service not known')
Hello, I get the following error: gaierror: (-2, 'Name or service not known') This happens with some objects in Zope, not all. Does anybody know what this means ? Zope : 2.8.5 OS: CentOS 4.2 Python: 2.3.4 Here are the details: Time 2006/03/13 21:59:52.768 GMT+1 User Name (User Id) Martin Koekenberg (Martin Koekenberg) Request URL http://klanten.digital-adventures.nl/swsportmassage/Downloads/achillespeesbl essure.pdf/index_html Exception Type gaierror Exception Value (-2, 'Name of service not known') Traceback (innermost last): * Module ZPublisher.Publish, line 113, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 40, in call_object * Module OFS.Image, line 386, in index_html * Module OFS.Image, line 269, in _range_request_handler * Module mimetools, line 130, in choose_boundary gaierror: (-2, ' Name of service not known ') Who can help me ? Regards, Martin Koekenberg
On 3/13/06, Martin Koekenberg <martin@digital-adventures.nl> wrote:
I get the following error: gaierror: (-2, 'Name or service not known')
http://plone.org/documentation/error/gaierror Seems to be a failure to do a ns lookup. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
On 3/13/06, Martin Koekenberg <martin@digital-adventures.nl> wrote:
Module OFS.Image, line 269, in _range_request_handler Module mimetools, line 130, in choose_boundary
gaierror: (-2, ' Name of service not known ')
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. -- Martijn Pieters
Hi!
I get the following error: *gaierror: (-2, 'Name or service not known')*
I've seen error: 'Name or service not known' when I was working with sending email with smtplib. It was a problem with lack of entry in /etc/hosts on my system (linux). I don't know what exactly you're doing but I think it is something with your network setup. -- Maciej Wisniowski
participants (4)
-
Lennart Regebro -
Maciej Wisniowski -
Martijn Pieters -
Martin Koekenberg