1837242 Members
4746 Online
110115 Solutions
New Discussion

New machine setup issues

 
SOLVED
Go to solution
Dave Goodwin_1
Advisor

New machine setup issues

We've got a loaner Itanium machine with HP/UX on it that I've just set up. I seem to be having two problems that may end up being related. I wonder if anyone might have any ideas on these...

1. DNS resolution doesn't seem to be working. I have a resolv.conf in /etc that contains a domain line with my domain name, minus the hostname part. I then have 3 nameserver lines pointing to the IPs of our DNS boxes. I can ping those IP addresses fine. Trying nslookup gives no result for any of our hostnames, failing after DNS, NIS and FILES. When nslookup is started, it correctly reports the name and IP of the first nameserver in the resolv.conf file. Is there something else I need to do to get DNS resolution going?

2. I cannot telnet into the system on port 23. If I telnet to port 25, I can see the SMTP session fine, and communicate with it, so I'm sure network connectivity is OK. I can ping to and from the HP machine fine also. When I try telneting into the HP box, I get an immediate "Connection Lost" message and ma returned to the prompt. I get no chance to login so I don't think it's a root permissions issue. The only thing I can come up with is that perhaps reverse DNS is needed for telnet access? Any thoughts on solving this would also be appreciated.

Thanks!

Dave
20 REPLIES 20
Pete Randall
Outstanding Contributor
Solution

Re: New machine setup issues

Dave,

In regards to your first question, do you have a /etc/nsswitch.conf file? If so, what does it contain?


Pete

Pete
harry d brown jr
Honored Contributor

Re: New machine setup issues

1. What does /etc/nsswitch.conf file have?

I have this:
hosts: dns[NOTFOUND=continue UNAVAIL=continue FOUND=return] files[NOTFOUND=return UNAVAIL=return FOUND=return]

2. it could be a result of not having dns working properly.

?? Are you running "named" ?? if so, what does the /etc/named.conf file look like?

live free or die
harry
Live Free or Die
Dave Goodwin_1
Advisor

Re: New machine setup issues

Further information:

I have no nsswitch file in /etc. There are a few nsswitch files in there with extensions, but I assume those are samples. There is no file named as "nsswitch". I have files named nsswitch.compat, nsswitch.files, nsswitch.nis, nsswitch.nisplus and nsswitch.hp_defaults.
Dave Goodwin_1
Advisor

Re: New machine setup issues

In answer to another question, I do not have named running and there is no named.conf in /etc. Nor is there an nsswitch.conf there. Should there be?

Thanks for all the help...
Pete Randall
Outstanding Contributor

Re: New machine setup issues

Dave,

You need to have a nsswitch file. You can probably use the nsswitch.file sample - just cp /etc/nsswitch.file /etc/nsswitch.conf and see what that does.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: New machine setup issues

Dave,

Oops, you don't want to use the "files" sample. Set up one that looks like Harry's.


Pete

Pete
Michael Duthie
Trusted Contributor

Re: New machine setup issues

Dave,

you will need a /etc/nsswitch.conf file similar to Harrys example. This defines the order for gethostbyname, DNS then files.

Use nslookup to check its working.
Michael Duthie
Trusted Contributor

Re: New machine setup issues

meant to add files=/etc/hosts

Mike
Dave Goodwin_1
Advisor

Re: New machine setup issues

OK, I set up a nsswitch.conf file with a host line that looks like Harry's. I restarted to be sure things were properly loaded. No change in behavior. The nslookup tool still shows the name of the DNS server correctly when started, but any search for a name record files after the FILES check. It had been doing DNS, NIS and FILES, now it does just DNS and FILES so I'm pretty sure it's read the new nsswitch.conf file.

Any other ideas??

Thanks!
Dave Goodwin_1
Advisor

Re: New machine setup issues

Slight clarification - with the addition of the nsswitch.conf file, the machine now recognizes localhost and its own name and can ping itself using both. Telnet to itself still gives an immediate "Connection closed" message as if telnet were not allowed. Still no response at all when trying any of our other hosts though....

Dave
harry d brown jr
Honored Contributor

Re: New machine setup issues



What does this return:

grep -i telnet /etc/services /etc/inetd.conf

mine shows this (for 11i):

/etc/services:telnet 23/tcp # Virtual Terminal Protocol
/etc/inetd.conf:telnet stream tcp nowait root /usr/lbin/telnetd telnetd -TCP_DELAY -z10 -b /etc/issue

Does /var/adm/inetd.sec exist? if so, what does it contain?

live free or die
harry
Live Free or Die
Dave Goodwin_1
Advisor

Re: New machine setup issues

Thansk for the help Harry. My /etc/services is just like yours for telnet. My inetd.conf line for telnet ends after the second instance of telnetd. It doesn't have the same parameters at the end as yours does.

I have no file in /var/adm with that name.
Michael Duthie
Trusted Contributor

Re: New machine setup issues

Dave,

I have never seen a system without a /var/adm/inetd.sec You can get the file from /usr/newconfig/var/adm and add the following at the end.

dtspc allow 127.0.0.1 loopback hostame

Replace hostname with your hostname

harry d brown jr
Honored Contributor

Re: New machine setup issues


What does your /etc/hosts file contain? it needs at least something like this:

127.0.0.1 localhost.YOURDOMAIN.com localhost local.YOURDOMAIN.com local loghost.YOURDOMAIN.com loghost
YOURIP YOURHOSTNAME YOURHOSTNAME.YOURDOMAIN.com

And what does your /etc/rc.config.d/netconf look like?

cat /etc/rc.config.d/netconf | sed "s/\s+/ /g" | grep -v -e "^#" -e "^$"


mine looks like this:

HOSTNAME="YOURHOSTNAME"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=HOSTIPADDR
SUBNET_MASK[0]=HOSTNETMASK
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=DEFAULTROUTER
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""
GATED=0
GATED_ARGS=""
RDPD=0
RARP=0

Where HOSTNAME is hostname, HOSTIPADDR is your hosts IP, HOSTNETMASK is the net mask like 255.255.252.0 or such, and DEFAULTROUTER is your gateway router.

live free or die
harry
Live Free or Die
Dave Goodwin_1
Advisor

Re: New machine setup issues

The output of the command to cat the netconf file is the same as yours, Harry. My host file looks rather different. Its entries are as follows:

127.0.0.1 localhost loopback
x.x.x.x FQDN hostname
x.x.x.x DNS FQDN dns host

I think that looks pretty typical to other hosts files I've seen before.

I've gotten the DNS resolution working, thanks to everyone's help, but telnet still fails, returning immediately with a "Connection Closed" message when used either remotely, or to localhost. Seems likely to be a permissions issue of some kind. Suggestions are still welcome :^)

Dave
Jeff Schussele
Honored Contributor

Re: New machine setup issues

Hi Dave,

Couple of more DNS issues to check:

1) Verify BOTH forward (hostname) & reverse (IP) resolution on both telnet client and server.

2) Verify that the DNS server does NOT have an entry for localhost other than 127.0.0.1. Believe it or not, this does happen & can cause all sorts of weirdness.

Also do you have tcp-wrappers installed? Can it have a deny statement shooting you down?

I'd recommend turning up inetd logging (inetd -l) to get some better clues.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
doug hosking
Esteemed Contributor

Re: New machine setup issues

Often there will be some hints in /var/adm/syslog/syslog.log. Have you checked there immediately after a failed
telnet?
Dave Goodwin_1
Advisor

Re: New machine setup issues

Good call on checking syslog. It cannot allocate a pty. I assume that means I have to create those device files. I'll look into that and see what I can find on how to do it with HP/UX. As you might guess, I know just enough UNIX to be dangerous :^)

Dave
Michael Duthie
Trusted Contributor

Re: New machine setup issues

1. execute the following line for ptym and ptys pseudo drivers



insf -d pty -n 400 (Or what ever parameter is set in the kernel for npty & nstrpty)



if this did not fix the problem, follow the steps below.
2. Execute the following commands.



insf -evd tlclts



insf -evd tlcotsod



insf -evd tlcots



insf -d tels



insf -d telm



Mike
Dave Goodwin_1
Advisor

Re: New machine setup issues

Bingo! Thanks Mike. I had already tried upping the kernel limits, rebuilt the kernel and recreated the pty devices without success. Was just getting ready to post the results when I saw your note. Those commands did the trick!

Dave