send: spawn id exp3 not open


 
Thread Tools Search this Thread
Operating Systems AIX send: spawn id exp3 not open
# 1  
Old 09-22-2009
send: spawn id exp3 not open

Hi,

AIX 5.3

Trying to implement script that change oracle password. Getting following errors:

send: spawn id exp3 not open
while executing
"send "xxx\r"

Any idea?
# 2  
Old 09-22-2009
Looks like you're using "expect". I think we'll have to see the relevant part of your script if you want any useful feedback. (Also not sure if this is AIX-related.)
# 3  
Old 09-22-2009
Yes it does uses expect. Here is script which gives error. Thanks for looking at this.

#!/bin/ksh

#Set Oracle Home Directory
OHD=/xxx
#Change Directory
cd /xx/yyy
#Define Script Return Code
integer RC=0
export oldpass=`cat ${OHD}/.oracle.pw`
export newpass=`cat ${OHD}/.oracle_new.pw`

/site/bin/expect <<EOF

spawn passwd oracle

expect "oracle's Old password:"
send "$oldpass\r"
expect "oracle's New password:"
send "$newpass\r"
expect "Enter the new password again:"
send "$newpass\r"
expect eof
EOF
#Set Return Code From passwd Script
RC=$?
exit ${RC}
# 4  
Old 09-23-2009
Guess: Does this error mean that the "passwd" process has already exited, or didn't start, before the first send?
"send: spawn id exp3 not open"
# 5  
Old 09-23-2009
Quote:
Originally Posted by garethr
Guess: Does this error mean that the "passwd" process has already exited, or didn't start, before the first send?
"send: spawn id exp3 not open"

I figured this out. Send that use old password had wrong password which was reading from one of the files. Once I corrected value in file for old password all worked fine.

Thanks for looking at this for me.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Couldn't read packet: Connection reset by peer send: spawn id exp4 not open while executing

Hi All, I am having an issue with my script which I am using to get files from a remote server. In my script I am going to server:- REMOTESERVER and directory:- /Interface/Upload, and then getting files from there to my local server directory:- /ftp/jail_nextview_LMS/home/nextview_LMS/outbox. ... (1 Reply)
Discussion started by: Hero6438
1 Replies

2. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

3. Shell Programming and Scripting

Expect script error : send: spawn id exp4 not open

Hi, I am executing a expect script in while loop for doing telnet on list of servers stored in file as below : expect script : #!/usr/bin/expect -f set timeout 20 set ip set port if { == 0} { send_user "Usage: scriptname ip port\n" exit 1 } #exp_internal 1 log_user 0 spawn... (3 Replies)
Discussion started by: omkar.jadhav
3 Replies

4. UNIX for Advanced & Expert Users

spawn() Vs. fork()

what is diffenrence between spawn and fork ? "fork() system call spawns the processess" what is mean by this sentence. (1 Reply)
Discussion started by: anandgodse
1 Replies

5. Shell Programming and Scripting

can i send shell commands to a open window

i want to write a script that automatically fills in a form and pushes a few buttons. can i do that with bash or something similar? (1 Reply)
Discussion started by: magiling
1 Replies

6. Solaris

Spawn Not Found

I need to run the spawn command but when I typed it in, I got "ksh: spawn: not found". So, I downloaded spawn-fcgi but it required to be compiled first. The compile failed when I tried it. I need a copy that's ready to be used. Unix system info: OS: Sun Solaris 2.8 Shell: ksh Does... (4 Replies)
Discussion started by: april
4 Replies

7. Shell Programming and Scripting

howto use a for(( exp1; [ test exp2 ]; exp3 )); construct

Hi, I am fairly novice at bash but not bad at C and so wondered if a for loop could be done as shown below:#!/bin/sh echo "Enter some strings , terminate with a single 'x':"; REPLY=; #I am trying to replace this with a arithmetic for statement: j=0; while ; do ((j++)); # My logic: ... (3 Replies)
Discussion started by: HowardL
3 Replies

8. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

9. UNIX for Dummies Questions & Answers

spawn: not found

Hi, I'm very new to UNIX. I need to FTP a file to a remote host. It happens through a port 2222.I need to automate the process as the SCP command prompts for a password. 1) The regular ftp, tells me that the connection is refused 2) The sftp login@remotehost gives me... (0 Replies)
Discussion started by: sandy.cog
0 Replies
Login or Register to Ask a Question