Operating System - HP-UX
1833625 Members
3857 Online
110062 Solutions
New Discussion

Some questions! Its urgent

 
SOLVED
Go to solution
Becke
Super Advisor

Some questions! Its urgent


Hi Team,

I have some questions below and I need answers for these urgently...Thanks

Q.1 A user is attempting to telnet to an HP-UX server using the hostname but is unable to connect. The user is able to ping the IP address of the HP-UX server but but when they try and telnet to the IP address it also fails. You are able to both ping and telnet to the server from your PC. Explain the steps you would take to diagnose this problem.

Please note that i need a brief answer for the above question..

Q.2.A system has a file system with a mount poing of /fredo which is automatically mounted at boot time. It has 3 other file systems with mount points of /fredo/frog/flipper, /fredo/frog/flapper and /fredo/frog/chocolate which also mount at boot time. One day the system has a disk problem causing all these filesystems to become corrupt. An fsck is run on each and they are manually mounted. During the next system reboot however /fredo mounts OK but the other three fail to mount. They all can be mounted once the system is rebooted however and they all appear to be clean. What is the most likely cause of the problem? I need answer in detail for this one as well guys..


Q.3. What is the following entry define in syslog.conf file

*.info;user.crit;mail.none /var/adm/syslog

Q.4. What entry is required if I want to log debug information to the console?

Q.5. A server is logging disk temporary disk errors every night. These errors always occur at 22:30. The hdisk logging the error is a RAID5 SSA array but it is not always the same pdisk logging the error at the same time. Should you...

a, Ignore the errors because they are only temporary and happening in small numbers

b, Run diagnostics on all the pdisks and replace every disk that fails the diags.

c, Take the array offline and run diagnostics on the SSA adapter and check the cable

What is the answer for above (a,b or c)

Thanks for your help guys, its very urgent..I look forward to hearing from you soon...

Cheers,
Raf
27 REPLIES 27
Bill Hassell
Honored Contributor
Solution

Re: Some questions! Its urgent

1. Telnet problem. Is telnet enabled on your HP-UX machine? The defasult is yes, but some previous admin may have disabled telnetd in the /etc/inetd.conf file. Look also at the file /var/adm/inetd.sec (if it exists) to see if telnet access is disabled. It's very important to understand the subnets you are working with. If the user trying to telnet is on another subnet, the likely cause is router restrictions.

2. Whenever the system boots, a record of what happened during bootup is recorded in /etc/rc.log so look in there to find mount errors. I am assuming you know that all mount points must be listed in /etc/fstab if they are going to be automatically mounted on reboot.

3. The entry: *.info;user.crit;mail.none /var/adm/syslog means:

All facilities (*) will be logged at the info level, but user facility messages will only be logged if they are at the crit level and no mail messages will be logged. The logfile is /var/adm/syslog WHICH IS WRONG. /var/adm/syslog is a directory in HP-UX so syslog will fail if /etc/syslog.conf a destination is not a file.

4. debug messages are usually VERY verbose (lots of data very fast). But to answer your question:

*.debug /dev/console

Don't be surprised if it is difficult to find a console login prompt if you add the above line. You have to signal syslogd to re-read the syslog.conf file when changes are made.

5. Disks errors should never be ignored unless you don't care about the data. A single error is an error. If this error deletes your paycheck, I'm sure you would want it fixed. An error might be due to other items on the same bus, an intermittant cable, a missing terminator or another device that is causing errors. Disks are NOT the only thing that fails. All the electronics from the computer's I/O card to the array controller and memory to the disk controller logic are failure points.


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent


Dear Bill,

Thank you so much for your prompt response and help, your help has given me all the answers I was looking for, I have one more question on which I'm unsure, below is the question

Q Users are logging into a system but are not being placed in their usual home directory, but in some 'guest' directory. They are unable to access their directory once logged in and can't perform their normal work. You check to see if their home directory exist and it does

a What do you suspect the problem is?



b. What steps would you take to diagnose this problem?



My assumption is that users home direcotry may have been removed or doesn't exist so they are logging into the guest directory and being unable to perform their usual work.

You should also check to see the permissions on their home directories if they have got the access to the directories and that they are the owner of their direcotries, if root is the owner of their home directoies and the group is system, that the normal users belongs to staff group would not be able to work in their home direcotries for example they won't be able to create files or perform their usual work...

Please let me know if my answer is spot on otherwise please add your comments...

Thanks again to help me. We have a great team here.

Cheers
Raf
Bill Hassell
Honored Contributor

Re: Some questions! Its urgent

Sorry about the double posting -- the ITRC website is having java problems .

The user's HOME directory is normally defined in the /etc/passwd file. We'll assume that a problem user is called usera and the /etc/passwd file says the HOME directory is /home/usera. If /home/usera is missing, then swomething if wrong with the system (perhaps several things) and a thorough investigation is needed. Now it's possible that there is no entry for usera in the /etc/passwd file. That means that logins are controlled by another computer using NIS. Getting the proper HOME directory setup on the local system will take some research to find out why the system has been setup this way.

If you find that the HOME directory is owned by someone else (ie, root, sys), it sounds like the /home directory was incorrectly copied from another computer. That will create a number of problems.

Now if the user's entry in /etc/passwd has a HOME directory like /home/guest, someone has setup this system in a very non-standard way. If the user's entry in /etc/passwd says HOME is /home/usera but the user ends up in something like /home/guest, then the HOME variable and a cd to /home/guest has been placed into either /etc/profile or the user's .profile.

Any of these situations are non-standard and will require research as to the reason. It might be that a previous administrator had some plan or maybe the admin was trying to copy some other computer system. And while you can fix the problems by setting and/or creating the /home/XXXXX directories, this may cause other problems if tghis computer is part of a larger set of systems. You may need some help (and documentation) sorting all this out correctly.


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent

Dear Bill,

Thanks for your time and help, you have certainly delivered and helped me expand my knowledge. I'm so happy as I have got all the answers I was looking for and they were extremly urgent. I have assigned points for this and I will close this thread now.

"Edited to cpmply with ITRC Guidelines"
Have a great day

Kind Regards,
Raf
Arunvijai_4
Honored Contributor

Re: Some questions! Its urgent

Hi Raf,

Q1) Check /etc/inetd.conf whether telnet is enabled. Enable, if not. Restart inetd # inetd -c

Q2) A detailed description and other infos available at, http://www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


Q3)
"A ship in the harbor is safe, but that is not what ships are built for"
Becke
Super Advisor

Re: Some questions! Its urgent


Hi Arun,

Thanks for your post and help mate but Bill has already given me answers that I was urgently looking for. I'm now going to close this thread.

Have a great day.

Cheers
Raf
Arunvijai_4
Honored Contributor

Re: Some questions! Its urgent

Hi Raf,

My post didnt get in fully. I tried from 7.30 AM IST, didnt go anyhow :(

Anyways, good to see you got Bill's excellent answers.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Becke
Super Advisor

Re: Some questions! Its urgent


Arun, as always thanks and I know you are always spot on with your responses mate.

Have a good day

Raf
Becke
Super Advisor

Re: Some questions! Its urgent


Dear Bill,

I have got some additional question to ask in relation to my previous questions. Subsequently I have got one new question (ie Q3). Most importantly I need to know the problem determination method that I should apply in order to diagnose the problem. Thanks as always for your help.

Q.1 usera is attempting to telnet to a UNIX server using hostname from his PC but is unable to connect. The usera is able to ping the IP-address of the same unix server but when he try and telnet to the IP address it also fails. Userb are able to both ping and telnet to the unix server from his PC. Usera was able to telnet before but now he has a problem. Mind you the problem is not with the telnet in usera case and he is on the right subnet as he is able to ping to unix server. On Unix server telnet is enalbed both in /etc/inetd.conf and /etc/services file as usera was previously able to telnet to the unix server and nothing has changed in the unix server side of things.

I need to know the steps you would take to diagnose the problem and resolve it as to why usera is unable to telnet anymore.


Q.2.A unix system has a file system with a mount poing of /fredo which is automatically mounted at boot time. It has 3 other file systems with mount points of /fredo/frog/flipper, /fredo/frog/flapper and /fredo/frog/chocolate which also mount at boot time. One day the system has a disk problem causing all these filesystems to become corrupt. An fsck is run on each and they are manually mounted. During the next system reboot however /fredo mounts OK but the other three fail to mount. They all can be mounted once the system is rebooted however and they all appear to be clean. To take HP-UX machine as an example these three filesystems are defined in /etc/fstab file to be mounted automatically at next system restart. The bootlog only shows a message that unable to mount filesystems.There mounts points exist as they can be mounted manually.What is the most likely cause of the problem? I need to the problem determination methods you would apply to diagnose this problem...

Q.3 A tape drive in unix machine reports dirty read/write head errors in the system error log and the backup fails. It also says in the error log that this happened due to probably bad tape. What is the correct problem determination method we should apply.

Bill Hassell
Honored Contributor

Re: Some questions! Its urgent

Q.1 ping is a low level test and other than it uses the LAN card and low level driver code, has no relationship to telnet. Indeed, ping is often disabled in security appliances such as routers yet the router responds to telnet just fine. Start by using telnet by IP address, not by name. To convert a hostname into an IP address requires a lot code unrelated to telnet. Is the error message: "Connection refused" or no response? For Connection refused, somewhere along the line, the incoming telnet connection is recognized but purposely blocked.

If you get Connection refused, go to a machine that is on the same switch to avoid network router problems. If you have another HP-UX or other Unix box on the same network (switch), try telnet there. If that is OK, are there other machines on the other side of the router that can get through?

If nothing gets through, or only specific machines can get through, look at the file /var/adm/inetd.sec to see if telnet has exclusions.

Q.2 You may need to change the order for the submounts in /etc/fstab. Put the primary mountpoint /fredo last and the /fredo/frog/.. mounts earlier in fstab. Depending on your version of HP-UX, mount -a may perform the mounts in reverse order as listed in fstab. Also test fstab while the system is running by unmounting all the /fredo mounts, then run mount -av to see if there are any errors (ignore messages about filesystems that are already mounted)

3. Naturally, you run the cleaning tape first. If you don't have several cleaning tapes you'll have to replace the drive (or buy cleaning tapes immediately). After running the cleaning tape, use a new tape and run the backup again. If it fails again, the tape drive must be replaced. The small tape drives such as DLT or DDS cannot be repaired in the field and must be replaced. These drives have a limited lifespan so if this is an old machine running daily backups for more than 3 or 4 years, it is time to replace the drive.


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent


Hi Bill,

Thank you very much for your elaboration, you have really sorted out my questions so well and helped me build my knowledge.

Kind Regards,
Raf
Becke
Super Advisor

Re: Some questions! Its urgent


I have got a new question in relation to my original question no1 that I have asked. I have reopened the thread.

I have had some more hints for couple of questions that I have asked when I opened this thread,


The new question is:
Q.1.A user is attempting to telnet to a UNIX server from his PC using the hostname but is unable to connect. The user is able to ping the hostname and IP address of the UNIX server but when they try and telnet to the IP address it also fails. The description of the failure you get from the user is "It just sits there for about a minute or so and then just fails." You are both ping and telnet to the server from your PC and from other UNIX servers on the same subnet. What is the cause of the problem? Explain the steps you would take to diagnose this problem. Note :The hint is that this user is coming from a different subnet and the problem is in the network...

Any further input on the above Bill???

Cheers
Raf
Bill Hassell
Honored Contributor

Re: Some questions! Its urgent

First, ping is a simple test and does not guarentee any network service is running on the remote server. You start with ping to see if the box is actually connected, electrically as well as through routers. Second, hostnames are highly unstable. telnet (or any other TCP/IP network service) uses an IP address. The simplest way to connect an IP to to a hostname is with the hosts file. In a PC, this is typically found in c:\windows\system32\drivers\etc.

However, PCs seldom use their hosts file but instead rely on a DNS server. Now it gets complicated. The PC is told to ping a hostname. The PC usually gets a DNS server when it boots up and that DNS server is responsible to provide the IP address. However, many Windows-based DNS administrators forget to put in reverse lookup records and HP-UX tries to validate telnet connections both ways (by hostname and reverse by IPaddr).

Generally, these long pauses are due to one or more bad DNS servers that are either dead, won't answer queries, or worst, they don't know an address and don't know where to get it.

Now the term "fails" is not very useful. Most network tools like telnet will provide a reason such as timeout, no such hostname, connection closed, or connection refused. So, on the HP-UX server, you look for /var/adm/inetd.sec and if present, check if telnetd has allow or deny statements. Then check the routers to see if they are refusing to pass a telnet request.

Now this was a long explanation for all the possibilites, but I'm wondering why you ask if you know it's a network problem?


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent


Dear Bill,

Thanks for your continous help and support, with your help I have found out that the DNS admin forget to put in reverse lookup records, I'm fully confident that this is the problem but I was unable to determine this...and DNS admin kept saying that DNS entries are fine...

I will need to confirm with the user as well as he is on holidays but I pretty sure we have found the problem..

You are the LEGEND...thank sooo much for helping me along the way...I will let you know...

Cheers
Raf
Bill Hassell
Honored Contributor

Re: Some questions! Its urgent

Two of the most common answer from DNS-admins and Database-admins: "I have checked and everything is fine". nslookup will query your DNS server both ways (nslookup host-or-ip) and also mx (mail delivery records). Since Windows doesn't use all of these items, they are veryu often left out. Tell your DNS admin to read up on DNS security issues.


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent

Dear Bill,

I have confirmed with the user and he can now telnet O.K, thank you very much for your help and support. I think I have learned a lot by communicating with you, thanks for always been there for us.

"Edited to comply with ITRC Guidelines"
Becke
Super Advisor

Re: Some questions! Its urgent


Hi Bill and all,

Long time no hear, Hope you are doing O.K.

I'm trying to resolve a mksysb backup problem on the Unix server, the mksysb backup script was working fine however all of a sudden it has stopped working.

What this script does is, it checks to see it the day is Sunday and the time is in between 1am to 3m it kicks off the nfsd daemon and performs the mksysb, however the script hasn't been changed but stopped working. Can please help me debug it. I have viewed it and couldn't find anything unusal. I have attahced the script for your view.

Thanks as always
Raf
Bill Hassell
Honored Contributor

Re: Some questions! Its urgent

For the script you posted, you would debug it by inserting a trace statement, namely set -x at the beginning. Now set -x will only affect the current code and must also be set inside all functions to trace them.

As far as code changes, here are some suggestions:

> line 1 of every script should start with:
#!/usr/bin/sh (or whatever interpreter you are using)

> In POSIX shells like sh and ksh, you can export an assignment on one line:

export PATH=/usr/bin:/usr/sbin
export LogFile=/var/opt/ux/log/uxnfs.log

> You can change stdout and stderr on the same line:

exec > $LogFile 2> $LogFile

> backticks have been deprecated for more than 10 years (see shell man page). Use $() as in:

mksysbDay=$(date +"%a")
mksysbTime=$(date +"%H")

> The start/stop for NFS is probably more cleanly handled with the HP-UX start/stop scripts:

/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.core stop

---

/sbin/init.d/nfs.server start
/sbin/init.d/nfs.client start
/sbin/init.d/nfs.core start


Bill Hassell, sysadmin
Becke
Super Advisor

Re: Some questions! Its urgent


Thanks for always being there when I needed you Bill. I have fixed the problem, the problem wasn't with the script itself, there were some files already exported by someone.

So when I unexported those file and restarted the nfs services and then I ran the script and it worked like a charm....

I really appreciate your help and being there for us... Have a good weekend
Becke
Super Advisor

Re: Some questions! Its urgent


Hi Bill

By the way thanks for always correcting my scripts, I have learned lot of new things from you and the team here.

Many Regards
Raf
Becke
Super Advisor

Re: Some questions! Its urgent


Thanks for your quick response Bill and my apology for the late response as I wasn't at work.

I'm doing some reading on ipsec and will be asking you questions later on...actually i'm doing this on aix server..

talk to you soon.

Many thanks
Raf
Becke
Super Advisor

Re: Some questions! Its urgent


Hi Bill,

I need to set up a cron job, I need only three days output would be required of the data, between 00:00 and 02:00 each day.

"Suspect an overflow is occurring. I need to see the output from this command run 15 minutes apart. The problem would be it might not occur for any given 15 minutes, I really need it every 15 minutes between midnight and 2 am., so I would need to set up a script to run from cron, to run the command below and sleep for 15 minutes etc.

date +"%T"; ps -eo "%x %C %t %g %u %P %p %n %z %c" | grep ldapdb2
"

Would you please advise how to create a small script, is it just a matter of putting sleep after the above command ie "sleep 900".
Please let me know and also how to put an entry in crontab for every 15 minutes starting from midnight until 2am everyday

Thanks for your help
Raf
Becke
Super Advisor

Re: Some questions! Its urgent


Bill

I have worked it how to put an entry in cron it should be like this

0,15,30,45 00-2 * * * /scriptname > /output

But I still need to know;

need to set up a cron job, I need only three days output would be required of the data, between 00:00 and 02:00 each day.

"Suspect an overflow is occurring. I need to see the output from this command run 15 minutes apart. The problem would be it might not occur for any given 15 minutes, I really need it every 15 minutes between midnight and 2 am., so I would need to set up a script to run from cron, to run the command below and sleep for 15 minutes etc.

date +"%T"; ps -eo "%x %C %t %g %u %P %p %n %z %c" | grep ldapdb2

can you please tell me how to put above command in a script so it gets run seamlessly

Steven E. Protter
Exalted Contributor

Re: Some questions! Its urgent

I'm not Bill, but will try to answer your latest question.


0,15,30,45 00-2 * * * /scriptname > /output

But I still need to know;

need to set up a cron job, I need only three days output would be required of the data, between 00:00 and 02:00 each day.
>>>>
If you data has a time stamp in it, you will need to pipe the output to grep to filter it.

>>>
Set your command up in a script.

Add this line right after the shell statemenent at the top:
set -x

This will create verbose output which will possibly help with diagnostics.

"Suspect an overflow is occurring. I need to see the output from this command run 15 minutes apart. The problem would be it might not occur for any given 15 minutes, I really need it every 15 minutes between midnight and 2 am., so I would need to set up a script to run from cron, to run the command below and sleep for 15 minutes etc.

Make a script with this in it:
>>>
date +"%T"; ps -eo "%x %C %t %g %u %P %p %n %z %c" | grep ldapdb2
>>>
Have cron call the script. Make sure the PATH variable in the script is set to include the location of grep.
whence grep to find grep.
>>>>

It is going to take some work to make things work seamlessly. The difficulty in providing assistance at this time is not knowing what the data looks like. Perhaps you can give a little sample. Then the great scriptwriters here at ITRC may be abel to help create a seamless solution.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com