1829594 Members
1402 Online
109992 Solutions
New Discussion

getty error

 
Rushank
Super Advisor

getty error

I've configured modem to dial-in on 10.2 D class box.

On my syslog I get following error:

getty: cannot open ttyd1p0 : error no. 6

If I run stty -a
sh: /dev/ttyd1p0 cannot find or open file
but file is present in dev
ls -al /dev/ttyd1p0
crw--w--w- 1 root bin 1 0x010002 Mar 19 16:21 /dev/ttyd1p0
inittab is set to 'respawn' Modem still does not pickup, I can not change this to off because modem should answer the call
What could be the problem??
21 REPLIES 21
Michael Tully
Honored Contributor

Re: getty error

Try this link on setting up of modems:

http://www.docs.hp.com//hpux/onlinedocs/B2355-90698/00/00/27-con.html

Michael
Anyone for a Mutiny ?
Rushank
Super Advisor

Re: getty error

Michael,
This Modem was configured and was working but now I'm started getting this error.
pap
Respected Contributor

Re: getty error

your tty device file needs to be owned by "bin" and not by root.

Try changing the owner to bin and then see what happens.

One more thing, if you are unable to get your problem fixed, try to create device file using mknod.

Hope it works for you.

"Winners don't do different things , they do things differently"
pap
Respected Contributor

Re: getty error

One more thing. If you are still unable to solve your problem,

Try to connect modem at some other free available port and see what happens.



"Winners don't do different things , they do things differently"
Rushank
Super Advisor

Re: getty error

Pap,
I tried changing owner to bin. No success. I don't have any other port free on this box. What's the syntex for mknod for a perticular device.


pap
Respected Contributor

Re: getty error

Hi We are using modems connected to MDP.
I have following entry for the same port which you are using.

Keep user for this file as root only. Sorry about that.
One more thing try to change permission for the device file as below :

crw-rw-rw- 1 root bin 193 0x010102 Nov 19 2000 ttyd1p1

* Also it seems that the major and minor numbers are different in your case.Look at that and let me know if you still have any problems.

syntex for mknod is :

mknod /dev/ttyd1p1 c 193 0x010102

This is for my case...you can do this step only if above other steps are not working fine.


Good luck.

-Piyush.
"Winners don't do different things , they do things differently"
A. Clay Stephenson
Acclaimed Contributor

Re: getty error

Hi:

You don't need to run mknod; your major and minor device numbers are correct. If this modem was working, I suspect one of two things:
1) Bad or misconfigured modem 2) Bad Port

Has the modem been 'borrowed' and used on a PC recently? If so, almost certainly, the NVRAM settings have been 'improved' or the DIP switches have been reset. I assume that this modem is configured for incoming use only and thus the use of getty is correct rather than uugetty.

You might try this method to see if you can talk to the modem.

1) Edit /etc/inittab and change the entry to off.
2) init q
3) Kill the getty (if present).

4) Attempt to connect to the modem via kermit.
kermit
SET LINE /dev/ttyd1p0
SET SPEED 9600
CONNECT

AT
If the modem responds, then exit kermit
and reset inittab to respawn and do an init q.



If it ain't broke, I can fix that.
Ross Martin
Trusted Contributor

Re: getty error

Hello Rushank,

I am an HP Response Center Engineer who specializes in datacomm.

It looks like you are using the UPS Serial port 2 to access a modem. Refer to the document KBRC00005786 located in the ITRC Knowledge Base for details. Use of this port is unsupported for modem use -- however, some people have had success in getting it to work.

Edit /etc/inittab and look for a line that contains the following:

ZZ:W:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd1p0 nnnn

where ZZ is a 2 character id, nnnn is baud rate and W is the run state. This number should be '234'.

If it is not, change it, save your changes and then type 'init q'. An example (for port tty1p0):

a0:234:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd1p0 9600

Verify that getty is running on port and that it is in a pending state, meaning there should be a ? mark in the tty field.

If it still doesn't respawn, then:

1. remove the cable and modem
2. login as root,
# fuser -ku /dev/ttyd1p0
3. ps -ef|grep ttyd0p1
check for the ? mark as above.
4. If it is OK, then reconnect the cable and modem.

You may need to contact your modem manufacturer for correct modem settings to work in an HPUX environment.

Bottomline:
The port you are using is unsupported.

The document suggested can work in some cases when trying to use that port.

Make sure the run levels in the /etc/inittab are '234'

The getty should spawn with no cable or modem connected to the port.

Shutdown, and powercycle the system - does the port spawn a getty now? If not, then hardware is suspected.

If connecting the cable and modem keeps the getty from spawning, then one of them is bad.

Replace cable with an HP 24542M 9pin to 25pin. You may order this cable from HP by dialing 1-800-637-7740.

Contact the modem manufacturer for modem support.

Hope that helps.

Rushank
Super Advisor

Re: getty error

Ross,

I've configured this modem to serial port. This is a D-Class server running 10.20 Every thing was OK till last week. I tried removing device and to tried creating again. I've tried connecting different modem with no success.
It seems it is not able to read file /dev/ttyd1p0 though file is present with proper permissions. I'm using the same cable you've mentioned.
My inittab line looks like this
a0:3:respawn:/usr/sbin/getty -h ttyd1p0 19200

Clay,
On Kermit prompt if I type set line /dev/ttyd1p0, I get this error.
Sorry, can't open connection: /dev/ttyd1p0
Uday_S_Ankolekar
Honored Contributor

Re: getty error

Hi,
I'm not sure but try this.

- First remove device from sam
- Disconnect cable from server
- Recreate device from sam
- Reconnect the cables.

This might help you.

-USA..
Good Luck..
Rushank
Super Advisor

Re: getty error

Hello Uday,

I tried the way you explained and it did work and stopped generatating the those error message Thanks ,
but when I try dialing second time the modem is not respoding why..??

Sandip Ghosh
Honored Contributor

Re: getty error

First try to find out that whether the getty is spawning or not.
do ps -aef|grep ttyd1p0. Nothing will happen until and unless the getty is running for the port.

Sandip
Good Luck!!!
Ross Martin
Trusted Contributor

Re: getty error

It is possible that the port is keeping a lock file and not releasing it.

# ll /var/spool/uucp/locks

Look for any files beginning with LCK... if they exist, remove the LCK file that corresponds to to the port you are having problems with.

Q. On Kermit prompt if I type set line /dev/ttyd1p0, I get this error.
Sorry, can't open connection: /dev/ttyd1p0

A. If the ttyd1p0 has a lock on it or the system thinks it is in use, you are blocked from accessing the port.

Login as root

type 'fuser -ku /dev/ttyd1p0'

That should release the port -- then it might work. Kermit doesn't always work with using ttyd device files when getty's are spawned to the port you are addressing. It can provide unreliable results.

Use vi editor to open /etc/inittab and comment out the line that spawns that port. Read the attached document on using Kermit with a tty file instead of a ttyd file.

Verify that you can access the modem.

Then re-enable the line in /etc/inittab when yo know you can address the port and modem.

I believe the reason you can't get it to may be one of the following:

1. you should modify the getty line /etc/inittab to include the run states of '234' and not just '3' as you show. (Sometimes the getty line won't kick off if it is set to the same run state as what the system is currently running).

2. the modem may have lost it's configuration settings due to an extended power off and weak batteries in the modem -- it may be set to factory defaults -- try using the modem at 9600 baud and set it up for software flow control (xon/xoff not rts/cts), turn off data compression, set DTR and CD to be controlled by the interface and not held high in the modem. (There are lots of ways to get a modem to work, but only one of the ways wil make it work reliably -- xon/xoff is the most reliable).

3. check /etc/inittab for a double entry for the same port -- you may have conflicting gettys running and they are competing for the same port

4. the hardware port or the cable may be intermittent

That's about all there is to that situation:

Test thing out in the order I suggested and see if helps -- I'l check back with any other results you might have. What make and modem of modem are you using?
A. Clay Stephenson
Acclaimed Contributor

Re: getty error

Hi:

I can think of one last thing to try. Because this port is on the System Board, I would put everything back as it's supposed to be and cold boot.
If it ain't broke, I can fix that.
Rushank
Super Advisor

Re: getty error

Hello Ross,

I use Multitech mom (Model MT1932ZDX) I'm sure that there is no problem with modem since the same modem works perfectly fine with If I connect it to other server.

I've made changes in inittab file (added level 234) and I'm testing it out now

There is no lock files in /usr/spool/uucp directory.
Ross Martin
Trusted Contributor

Re: getty error

Hi Rushank,

Modems are strange beasts. If the modem strings aren't set right then they can cause a multitude of realiability issues.

I have attached the modem strings that were provided by Multitech for that modem.

If the modem is set to RTS/CTS or HW Flow Control and the port is configured for Xon/Xoff (which is standard default with SAM creation) then you run into problems like you are seeing.

The stop/start bits are embedded into the send/receive lines with Xon/Xoff. When using RTS/CTS, the stop/start signals are broken out onto separate pins on the port -- without these signals being recognized, the port may be runing into a buffer overrun condition.

What this means to you is unreliable connections -- one time it works another time it doesn't -- depends on how the port handles the overrun condition at that moment.

How does the modem get that way? It loses it's string information and defaults back to what was burned into the modem as factory defaults.

Resetting the string information can correct that.
19200 Baud is meant for HW Flow Control. 9600 and lower is meant for SW flow control.

But SAM doesn't create HW Flow control device files unless you have one of the latest SAM patches which shows the option when creating a modem port. Just setting the modem to 19200 doesn't mean the port will work at that speed and automatically assume you are using HW Flow Control.

1. Try slowing the baud rate down to 9600

2. Use SAM to create default SW Flow control device files.

3. Use the attached modem settings from Multitech for SW Flow Control

Let's see if that works.

You can always go to HW Flow Control after making sure things work at Software Flow, which is more reliable and is the official HP recommended method of using modems on these kinds of servers.

BTW. If this is an HP Supportlink Modem -- (some are the MT1932ZDX with modifications from Multitech) try the following settings if the attached document doesn't work. It's meant only for the SupportLink not the off-the-shelf version (but, it can't hurt to try, right?):

&f - load factory defaults
&q1 - selects AT command set
&c1 - carrier detect acts normally
$sb9600 - serial port set to 9600
&w0 - store current settings in nvram
and use as default

The

Hope this helps ;^)

Ross
Rushank
Super Advisor

Re: getty error

Well,

I treid changing modem settings, and changed the baud rate to 9600 now I get only junk charecter on screen. Modem does not pick up if I try next time. I had to disconnect the modem cable from modem at the server end and connect back to get connection again.


Ross Martin
Trusted Contributor

Re: getty error

Depending on what the garbage looks like, it may be a parity issue or a flow control/handshaking issue with the modem strings.

Check the /etc/gettydefs file for modifications.

# diff /etc/gettydefs /usr/newconfig/etc/gettydefs

If it has not been modified, then a # (prompt) will return with nothing after it.

If text starts flying by, then modifications may have been made -- you can vi the file /etc/gettydefs and compare the 9600 entry with the 19200 entry to see if they are different (should be the same other than the B9600 vs B19200).

What the 19200 entry should look like:

19200 # B19200 HUPCL IGNPAR PARENB ICRNL IXON OPOST ONLCR CS7 CREAD
ISIG ICANON ECHO ECHOK PARENB ISTRIP IXANY TAB3
# B19200 SANE CS7 PARENB ISTRIP IXANY TAB3 HUPCL
#login: #19200

If all looks good, then the modem strings need to be checked with Multitech -- they know how to set up the strings to work in an HPUX environment -- the document I had you use was originated from them, but HP doesn't try to keep up with every modem manufacturer's settings.

Once the settings have been corrected by Multitech, I am confident you'll be back in business!

The rest looks like it is working -- I presume that the getty is now respawning?

I also attached a document on setting the gettydefs to 8 bit no parity if you have a parity issue instead of a flow control issue.

Ross

Rushank
Super Advisor

Re: getty error

Hello Ross,

Thanks for your help.
My connections are now ok. I'm able to login first time without any problem, but if I try connect again the server modem doesnot pickup the line. Just rings...why..? In order to connect agian I have disconnect server modem cable and connect it back..

Ross Martin
Trusted Contributor

Re: getty error

Rushank,

Hmmm. Let me explain what the modem needs to answer the phoneline:

1. a getty must be available and it must be able to respawn once the getty is released by the modem dropping off.

Hence, check ps -ef|grep ttyd1p0 and see if the getty goes back to the ready state. The getty needs to have a ? mark after the date/time.

If the getty is not respawning, make sure the entry in /etc/inittab looks like:

a0:234:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd1p0 9600

2. The modem needs to have Auto Answer to pick up on the first ring:

ATS0=1
&W

3. Check permissions and owner on /dev = dr-xr-xr-x 15 bin bin

and ttyd1p0 = crw--w---- 1 uucp bin

4. If the modem doesn't drop Carrier Detect (CD) and Data Terminal Ready (DTR), then the port remains busy, conversely, if the port doesn't recognize CD and DTR dropping but the modem does actually drop it, then either the cable is supect or the port has a problem with hardware.

Disconnecting the cable and modem frees up the signals and the port resets after a timeout period -- this could be a clue that something with the modem or the cable is holding the port busy.

If you have another modem and cable, you can try to isolate which component is giving you the grief.

5. Shutdown the system, powercycle the modem and the Server. Then reboot.

6. Lastly, try and apply the latest mux/pty patch from the ITRC. Maybe the filesets for controlling the port got corrupt somehow.

10.20 PHNE_21872 Cumulative MUX PTY

11.00 PHNE_25913 Cumulative MUX PTY

7. After this, it looks like the Server's hardware is intermittent and holding the port busy.

Ross
Sanjay_6
Honored Contributor

Re: getty error

Hi Rushank,

Change the port and try. Looks like the port is blown. Error no 6 means the system is unable to find the port. The device file is available and the modem is connected to the port, but the port / card needs to be replaced.

Hope this helps.

Regds