- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Error stty: "Not a typewriter" when rebooting serv...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 06:33 PM
тАО07-26-2001 06:33 PM
I have a problem with oracle's .profile (I think) It is producing the above error when I reboot the server.
Does anyone know a way around or a fix to this problem?
Thanks
Maria
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 06:43 PM
тАО07-26-2001 06:43 PM
Re: Error stty: "Not a typewriter" when rebooting server
I suspect you have a startup script which is calling svrmgrl or lsnrctl.
Your script should redirect both stderr & stdout to a file.
If you are doing a su - oracle svrmgrl < myfile
change it to su oracle myscript
myscript should then set and export env vars and call svrmgrl while redirecting stdout & stderr. The su - sources the .profile which has the side effect of running commands like stty.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 06:48 PM
тАО07-26-2001 06:48 PM
Re: Error stty: "Not a typewriter" when rebooting server
This is most commonly seen when you cron scripts involving an 'su - user -c script' syntax.
The 'su - user' causes the user's $HOME/.profile to be sourced (read). This is often desired to obtain $PATH and other environmental variables present in the profile. The problem is that the profile contains 'stty' commands for terminal settings. When there is no terminal, as with a cron-inititated run or with a boot startup script, then the "not a typewriter" message is generated. The message means you executed a program that expects to deal with a terminal and you have forced the program to deal with a different device.
This is not so much a problem as a nuisance. One way to avoid this is to put any PATH and environmental variables needed in your actual script or in there own file which can be sourced by your script (and by your $HOME/.profile too).
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 07:00 PM
тАО07-26-2001 07:00 PM
Re: Error stty: "Not a typewriter" when rebooting server
thanks for the information it helps some.
I have the following as oracle's .profile.
# @(#) $Revision: 72.2 $
# Default user .profile file (/usr/bin/sh initialization).
#!/usr/bin/sh
# Set up oracle environment variavles
if [ -o interactive ]; then
# Interactive commands go here
stty erase ^h
stty erase ^?
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
fi
# Non-interactive commands go here
export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export ORACLE_BASE=/u01/app/oracle
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_SID=HELPDESK
export SHLIB_PATH=$ORACLE_HOME/lib
# Set up the search paths:
PATH=$PATH:$ORACLE_HOME/bin:/etc/:/usr/local/bin
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
export HISTFILE=~/.sh_history
export HISTSIZE=100
export DISPLAY=57.192.2.179:0.0
umask 022
# set up prompts
export PS1='$ORACLE_SID.'`whoami`@'$PWD $'
export PS2='$>'
My understanding was that
"
if [ -o interactive ]; then
# Interactive commands go here
stty erase ^h
stty erase ^?
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
fi
"
was meant to take care of this problem. Oracle is using a Korn shell environment. Have I set it up wrong?
Maria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 07:01 PM
тАО07-26-2001 07:01 PM
Re: Error stty: "Not a typewriter" when rebooting server
Also, in some programs, a call to stdio(3) sets an ERRNO that does not get cleared up. Then, if you get another error, this message also pops up.
Also, when you start cron, and when a person changes cron's FIFO (/usr/lib/cron/FIFO) to be a regular file (-rw-rw-rw-) instead of a pipe
(prw-------), the message can be appended to cronlog, and this can keep going until the system runs out of disk space. Kill cron, remove the FIFO, and restart cron. Cron creates a new FIFO the correct way.
In some cases, the message can mean nothing; just continue to work.
Hope this can helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 07:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 07:21 PM
тАО07-26-2001 07:21 PM
Re: Error stty: "Not a typewriter" when rebooting server
I have tried your suggestion, but I am still getting this error
"
Output from "/sbin/rc2.d/S99dbora start":
----------------------------
Oracle Startup in progress
stty: : Not a typewriter
(c)Copyright 1983-1997 Hewlett-Packard Co., All Rights Reserved.
"
I have checked to see if the scripts have mysterious control character but I can't see any.
Any other suggestions?
I have rebooted the server sooo many times now that I am getting a bit desperate :).
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 07:46 PM
тАО07-26-2001 07:46 PM
Re: Error stty: "Not a typewriter" when rebooting server
If you were in Sydney I would KISS you!!!
your a genius.
It worked (sort of) I am still getting the error message in my rc.log. I made some modifications to the script as well.
changed from
/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart &"
/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start &"
to
/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
/usr/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
The database comes up and so does the listener.
Thanks heaps :)
If you got anymore suggestions on getting rid of that error in the rc.log my ears are wide open.
Thanks again
Maria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2001 08:34 PM
тАО07-26-2001 08:34 PM
Re: Error stty: "Not a typewriter" when rebooting server
TTY=`tty`
if [ "$TTY" = "not a tty" ]
then
TTY=/dev/console
fi
HTH
Michael