This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gethostbyname is broken on hpux 11.11
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ehab_teima, loewis
Priority: normal Keywords:

Created on 2004-06-25 19:50 by ehab_teima, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg21312 - (view) Author: Ehab Teima (ehab_teima) Date: 2004-06-25 19:50
This bug exists in Python 2.3.2, 2.3.3 and 2.3.4. 
socket.gethostbyname is broken on hpux HP-UX B.11.11 
U. This is what I'm getting when I try to call 
socket.gethostbyname('server'):

Traceback (most recent call last):
  File "../../test.py", line 2, in ?
    a=socket.gethostbyname('myserver')
socket.gaierror: (8, 'host nor service provided, or not 
known')

I got the same error when I tried getaddrinfo(server, 
port).
msg21313 - (view) Author: Ehab Teima (ehab_teima) Date: 2004-06-25 20:15
Logged In: YES 
user_id=1069522

The servername is supposed to be resolved via DNS query to 
get thje ip address. If I use the ip address instead of the 
servername, the function works fine [i.e. 
socket.gethostbyname('x.x.x.x') works fine.]
msg21314 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-06-27 20:59
Logged In: YES 
user_id=21627

Can you investigate this in more detail, and suggest a patch?

If not, it is unlikely that it will be fixed anytime soon,
because the bug is likely specific to the operating system,
and might be even specific to your installation.
msg21315 - (view) Author: Ehab Teima (ehab_teima) Date: 2004-07-14 18:49
Logged In: YES 
user_id=1069522

By looking more into this problem, I found that several 
development groups have reported the exact same problem 
with hpux 11.11. The fix for them was to install DNS patch 
PHNE_27796 along with other patches. However, these patch 
did not fix my problem. As a workaround, I commented out 
HAVE_GETADDRINFO in pyconfig.h. This allowed getaddrinfo 
from python distribution to take place as oppose to the 
broken one from HP. This workaround fixed the problem. I'm 
closing this bug as it's apparently not in python nor python 
can fix it.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40456
2004-06-25 19:50:40ehab_teimacreate