1846290 Members
3399 Online
110256 Solutions
New Discussion

Re: Oracle cannot start

 
Seymour
Advisor

Oracle cannot start

Hello guys!

When I'm trying start the oracle package I receive the following error from oracle control file:

ttytype: couldn't open /dev/tty for reading
stty: : Not a tpewriter

....

Not a terminal
stty: : Not a tpewriter
stty: : Not a tpewriter

Coul you please help me about this problem?
7 REPLIES 7
Seymour
Advisor

Re: Oracle cannot start

I use the toolkit.sh file. If you want can post the config and sctipt files.
Fat Scrape
Honored Contributor

Re: Oracle cannot start

Stephen Doud
Honored Contributor

Re: Oracle cannot start

This problem is discussed in a knowledge document titled "Pkg control log contains "stty: : Not a typewriter""
DOC ID UMCSGKBRC00012842

The messages come from stty settings listed in .profile or similar shell-configuring files when no terminal is associated to the session, such as when an 'su -c ...' is performed.

The resolution is to code the .profile (or similar files) to avoid any tty configuring commands when no terminal is associated with the session. The document and previously mentioned thread discusses how.
Seymour
Advisor

Re: Oracle cannot start

I cannot solve the problem. I post the oracle package log file.
Seymour
Advisor

Re: Oracle cannot start

here's my syslog file
Seymour
Advisor

Re: Oracle cannot start

and package control script log file
Asif Sharif
Honored Contributor

Re: Oracle cannot start

The stty message is caused by running commands where there is no controlling
tty device; that is, no interactive terminal is present. This would be true
for a script that uses a "su -" to start the application:

su - -c "command"

Embedding this sort of command in a script causes the 's .profile
(and /etc/profile) to be read. If .profile (or .kshrc) executes stty,
ttytype, or output-generating commands that expect a non-existent TTY,
the "stty: : Not a typewriter" messages are generated.

To avoid such errors, the .profile and related file(s) should test the calling
process for "standard out" and skip the terminal-expecting commands when no
std-out exists.

Try one of these two methods to skip the terminal-related lines:

if [ "$-" != "${-%%*i*}" ]
then
(stty, ttytype, output-generating commands)
fi

-OR-

if [ -t 1 ] # standard out device exists
then
(terminal-setting or output-generating commands here)
fi

Explanation from sh-posix(1):
-t fildes True, if file descriptor number fildes is
open and is associated with a terminal
device.

If the error messages still occur after updating .profile (and /etc/profile if
needed), add a "set -x" to the section of the script that invokes the
application so that every command action is displayed in the log. This can
help isolate the message source. Use "set -" later in the script to
terminate the tracing.

Another method is to send all output from a non-root user command to
/dev/null.

Example:
su - oracle -c "script_path >/dev/null 2>&1" 2>/dev/null 1>&2


### END ###

Regards,
Asif Sharif
Regards,
Asif Sharif