Hey folks. Long time lurker, first time poster. I'm a bit of a newbie at "coding" (obviously, scripting is a teensy bit different than coding) and I've run into a problem that I just can't seem to get around.
I'm going through a list of servers to check their name, IP, reverse-NSLOOKUP name and ping status (whether pinging the server was successful). The thing is, every time I try to run through a list of servers, I get hung up on servers that aren't found in the domain.
I want to catch those servers and make sure I know they're not in the domain, but I don't want it to lock up the program that's running.
Here's my code:
Let's say I run a list of servers by using only the first part of their names (i.e. instead of "node_name1.domain-name.org", I use "node_name1"). I want NSLOOKUP to see if those servers are in the domain and for part of the resulting output to be the full name of that server instead of just the beginning part of it.
And there it stays. The only way for me to stop it is to exit the command line entirely!
Here's what the file output looks like:
Quote:
node_name1,node_name1.domain-name.org,127.0.0.1 [I'm substituting a fake IP here for you guys],NODE_NAME1.domain-name.org,YES
node_name2,node_name2.domain-name.org,127.0.0.2 [I'm substituting a fake IP here for you guys],NODE_NAME2.domain-name.org,YES
In other words, the first two nodes are processed. When node_name3 comes around, the entire program hangs after it fails to find node_name3 in the domain.
Is it because I'm using only part of the hostname that I'm trying to look up? If this is so, why do the first two names work fine? Obviously I could delete the offending node name out of the list but I'd rather not have to do that every time there's a node name that doesn't work.
Anyone have any clues? And yes, I tried "timeout". It didn't work.
hi,
I am new in Solaris 10 , i am installing a software in solaris 10, while performing pre requisite nslookup command should return without error, and the IP address and host should match those listed in the etc/hosts file,
but nslookup command show the below error , can anybody tell me how i... (4 Replies)
Hi guys,
I'm back to get some help again :)
I have a file that has a list of IP addresses, and I use nslookup in my script to resolve hostnames of those IPs.
the problem I'm facing is that I not all the hostnames got resolved! and I don't know why. sometimes the same duplicate IP returns a... (8 Replies)
Hi ,
I have a requirement to find the aliases by doing an nslookup on the Cname.
If i do an nslookup on the alias name i get the Cname , but i need the cname from alias name.
eg: Hostname = acb.example.com
Virtual name= abcvirtual.example.com
nslookup abcvirtual.example.com will... (3 Replies)
Hi All,
If I give the hostname followed by nslookup, I get the output like below,
commandprompt>nslookup efgh
Using /etc/hosts on: xyz
looking up FILES
Trying DNS
Non-authoritative answer:
Name: abcd
Address: 47.47.47.47
Aliases: efgh
I am not sure on the bolded ones. Can... (4 Replies)
I am having trouble configuring BIND 8.3 on Solaris 9. When I run nslookup, I get this error/message:
test# nslookup
*** Can't find server name for address 192.168.1.31: Non-existent host/domain
*** Default servers are not available
I double checked everything and I can't figure this out. I... (8 Replies)
Hi
I usually use solaris but Im working right now with a Linux box and I cannot find the nslookup command. Does Linux use this command or have an other one to do dns querys??
Thanks and sorry for such a dumb question.. :) (2 Replies)
Guys ,
Am using Linux - Red Hat 6.1 .
My DNS and nslookup command was working fine and ppl. can resolve through this server .
but i changed something in /etc/named.conf , that stopped the DNS .
The named proccess is working , but nslookup command is not , i get this error message :
... (3 Replies)