Operating System - HP-UX
1827458 Members
5483 Online
109965 Solutions
New Discussion

HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

 
SOLVED
Go to solution
PatRoy
Regular Advisor

HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

G'Day.

Running HPUX 11.31 with hpuxwsAPACHE B.2.0.59.07.03 suite.

Got about 15 virtual IPs assigned to the same nic card (lan0:1, lan0:2, etc), one for each web site.

On THAT server, if I try to `wget wget http://devintranet2/index.html` it will be SUPER slow! Will timeout after like 1 min... Stuck at Resolving devintranet2...

If I try the same thing from another server, it's fast! No problems.

I tried the same thing on the problematic server, but using the IP instead of the hostname, it's fast.

So, figured it most be a lookup problem. Tried `nslookup devintranet2`. No problem there!! Same has `ping devintranet2`.

I'm thinking it's something within Apache... but, if it's stuck at "resolving..." does it even GET to Apache?

I don't get it...

Can anyone help?

Thanks so much!

Patrick
14 REPLIES 14
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Ohhh and my /etc/nsswitch.conf reads:

hosts: files [NOTFOUND=continue] dns
ipnodes: files [NOTFOUND=continue] dns

That's all I've got in there.
Fabio Ettore
Honored Contributor
Solution

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Hi Patrick,

are you using DNS?
Check for contents of /etc/resolv.conf (if any). You see that also by nslookup devintranet2, does it use Name Server or files?
Please post an output of nslookup devintranet2.

I agree it's most likely a resolution problem, I'd think that as by IP addresses everything works well.

Best regards,
Fabio
WISH? IMPROVEMENT!
T G Manikandan
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

can you please check the apache logs?
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Fabio, yep, I'm using DNS. It's looking it up just fine :

root@pscdweb1:/ # nslookup devintranet2
Using /etc/hosts on: pscdweb1

looking up FILES
Trying DNS
Name: devintranet2.psc-cfp.gc.ca
Address: 198.73.83.73

(Note that I had just for the hell of it tried specifying it in the /etc/hosts. Doesn't change a thing.

And my resolv.conf reads :

root@pscdweb1:/ # cat /etc/resolv.conf
domain psc-cfp.gc.ca
nameserver 192.168.81.250
nameserver 198.73.83.78
nameserver 198.73.83.79
nameserver 198.73.83.249

AHH! I just tried a wget http://devintranet2.psc-cfp.gc.ca/index.html and it was fast!! (included the domain name in the the url instead of just the hostname!)

**why didn't I think of trying that before!??

Anyways... it has something to do with Apache not appending the domain name??

Looking more into it.. if anyone else can suggest something??

And TG, logs don't tell me a thing. No errors and I'll just a 200 return code in my access logs (it's just slow...)

Thanks again all.
T G Manikandan
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

what does

#grep -i servername httpd.conf

point to.
Avinash20
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

"root@pscdweb1:/ # nslookup devintranet2
Using /etc/hosts on: pscdweb1

looking up FILES
Trying DNS
Name: devintranet2.psc-cfp.gc.ca
Address: 198.73.83.73"

Why is it working with FQDN and with simple hostname.

You need to mention the hostname also in /etc/hosts

198.73.83.73 devintranet2.psc-cfp.gc.ca devintranet2
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Why would I need to force it in the host file? Doesn't make any sense... or maybe it's me not understanding something here...

Anyhow, I had tried it.

Also, ServerName reads devintranet2 in the http.conf file. I also tried it with devintranet2.psc-cfp.gc.ca. No luck...

Avinash20
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Hi Patrick,

Could you post the output of

# nslookup devintranet2

After doing the changes
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Here it is:

root@pscdweb1:/tmp# echo "198.73.83.73 devintranet2.psc-cfp.gc.ca devintranet2" >> /etc/hosts
root@pscdweb1:/tmp# nslookup devintranet2
Using /etc/hosts on: pscdweb1

looking up FILES
Name: devintranet2.psc-cfp.gc.ca
Address: 198.73.83.73
Aliases: devintranet2

It now goes to files...

Thanks again.
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Okay... here's an update...

I installed both Lynx and Links text based web browser. Going to that http://devintranet2/ is fast! But using either wget or mozilla found on the same server == slow! (??).

Plus, 'telnet devintranet2 80' is fast!

And I just picked up this:

Seems like it has nothing to do with the web stuff! It just depends on the service!

From that server, doing a 'telnet serverB' == Fast! But doing a 'ssh serverB' == Slow!!!

What should I be looking for here ??

Pat

Avinash20
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

I did face the same issue, and I turned off IPv6 for ssh

You can turn off IPv6 lookup for SSH in ssh_config via:
/opt/ssh/etc/ssh_config :
# AddressFamily any
AddressFamily inet

Restart ssh
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

A very good thread which gives an explanation

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1237313656709+28353475&threadId=1311413
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

Bingo! You're right!!

wget --inet4-only http://devintranet2/index.html works fast now! I also confirmed by doing only inet looks with ssh.

Now just got to figure out how to disable all this IPV6 stuff... or at least make it so it doesn't slow me down...

PatRoy
Regular Advisor

Re: HPUX 11.31 / Apache 2.0.59 unable to resolve hostname on same server?

It's fixed!!

Solution was to change
ipnodes: files [NOTFOUND=continue] dns

to simply:
ipnodes: files

in the /etc/nsswitch.conf file!!

I believe if ipnodes isn't there, then it should be added!

Thank you all for your help!

Pat