AIX 5.3 - There is no process to read data written to a pipe


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users AIX 5.3 - There is no process to read data written to a pipe
# 1  
Old 04-18-2005
AIX 5.3 - There is no process to read data written to a pipe

I have the following code which works on AIX 4.3 but fails at times on AIX 5.3
with:

cat: 0652-054 cannot write to output. There is no process to read data written to a pipe.


Code:
validator="${validator_exe} ${validator_parms}"
               cmd_line="${CAT} ${data_file} | ${validator} 2>${validator_errors}"
               if [ "${create_new_files}" = "Y" ]
               then
                  #
                  # update the command-line to redirect the translated data to a file
                  #
                  cmd_line="${cmd_line} 1> ${new_file}"
                  print "         Input file : ${real_data_file}"
                  print "         Output file: ${new_file}"
               fi
               #
               # run the validator and save the return code
               #
               eval ${cmd_line}
               validator_rc=$?

If I switch the code to use a redirect instead of a pipe for the following line of code it works everytime.

From This:
Code:
cmd_line="${CAT} ${data_file} | ${validator} 2>${validator_errors}"

To This:
Code:
cmd_line="${validator} < ${data_file} 2>${validator_errors}"

Does anyone know anything about why this might occur. Smilie

Last edited by vigsgb; 04-18-2005 at 11:59 AM..
# 2  
Old 04-20-2005
methinks your "validator" maybe having issues handling input from a pipe since the no-pipe command line always works ... check your "validator" for the bug ...
# 3  
Old 04-21-2005
I just had this issue occur on a .sh script with the following command:

Code:
cat $filename | head -1

Same thing, change to

Code:
cat $filename > head -1

and it works.

Both of these examples I listed in this post so far, did run for without issues on an AIX 4.3 using sp2 nodes.

I am migrating to P5 running aix 5.3 and that is where the issues are occuring.

I guess it is time to have IBM take a look at this.

Thanks
# 4  
Old 06-13-2006
Question

Hi Unix gurus,
I have problem executing remote ssh from cygwin on WIN XP SP2. I have the the public key in the host to have SSH login without the need of password.
I am sure this is not due to path or environment as I can run this within the shell and I added PATH and all necessary LIBPATH within the script.


From windows DOS prompt, i am executing:
ssh user@host /home/user/tmp/prog.ksh


output:

*******************************************************************************
* *
* *
* Welcome to AIX Version 5.2! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
exec(): 0509-036 Cannot load program /home/user/util/bin/tracking because of the following errors:
0509-150 Dependent module liborbixmt.so could not be loaded.
0509-022 Cannot load module liborbixmt.so.
0509-026 System error: A file or directory in the path name does not exist.
/home/user/tmp/prog.ksh: There is no process to read data written to a pipe
# 5  
Old 06-21-2006
vigsgb : the only thing i know about that is your file may be bigger than 2 gb
# 6  
Old 05-22-2009
The following script tickles this bug quite nicely in AIX 5.3. Running the same script in Solaris and Linux is fine - you won't get the error. If anyone knows if IBM released a fix for this issue, please post details on this page.

Code:
#!/bin/ksh
#
# Test for pipe bug in AIX
#
function testpipe
{
    typeset -i count=1 maxcount=$1
    print "Testing $maxcount output lines ..."

    while [ $count -le $maxcount ]; do
        print "Output line $count"
        ((count+=1))
    done | head -1 > /dev/null
}

testpipe 50
testpipe 500
testpipe 5000
sleep 1

Here is the output on AIX 5.3:
Testing 50 output lines ...
Testing 500 output lines ...
Testing 5000 output lines ...
testpipe: There is no process to read data written to a pipe.
# 7  
Old 05-22-2009
I've stumbled upon a solution of sorts:

Code:
#!/bin/ksh93
...

does not display this bug. Doesn't mean that IBM shouldn't fix it in the older version of ksh though ... Smilie (walks away whistling coyly)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to read a fast written log file at Real time speed?

Hello All, I am building a real time parser for a log file in my application. The log file is continuously written at a very fast pace and gets rolled over every 10 minutes. I have measured the speed and observed that around 1000 lines are written to it every second, each line about 30-40... (7 Replies)
Discussion started by: cool.aquarian
7 Replies

2. Shell Programming and Scripting

Read pipe data

Hello, I need to read the pipe data as:- cat abc.txt | uuencode abc.txt | mailx -s hi xyz@xyz.com I will override the mailx function so that when mailx is called, it calls my version of maix and in that function I want to read the file which is attached in progional mailx function- abc.txt... (7 Replies)
Discussion started by: shubh05
7 Replies

3. Shell Programming and Scripting

Perl: How to read text from file and process $variable in that data too.

In the hello.htm have the sentenses: Hello $name How are you? The perl script: $name = "David"; open(HEADER,"hello.htm"); while(<HEADER>) { $html .= $_; } close(HEADER); print "$html";I making something about template. But it can't process the $name variable. (4 Replies)
Discussion started by: natong
4 Replies

4. UNIX for Dummies Questions & Answers

No process to read data written to a pipe on AIX

We use SAP application cluster on AIX. Communication between 2 of its instances is failing randomly with the following error: java.net.SocketException: There is no process to read data written to a pipe. The above error causes a cluster restart if an important communication fails. Can... (0 Replies)
Discussion started by: RoshniMehta
0 Replies

5. AIX

Tape drive problem - no process to read data written to a pipe

Hi Everyone, The machine I'm working on is an AIX 5.3 LPAR running on a P650. oslevel -r shows 5300-08. I'm trying to take a backup to a SCSI tape drive, which has been working up until this point. I know of nothing that has changed recently to cause this problem. But when I try to take a... (0 Replies)
Discussion started by: need2bageek
0 Replies

6. Shell Programming and Scripting

Read/Search file being written to giving error due to timing issues

The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN) RESULT="" sleep 30 while ; do sleep 10 RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}` if ; then RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}` fi done mv... (3 Replies)
Discussion started by: sonorous
3 Replies

7. UNIX for Dummies Questions & Answers

restrict data from getting written to Logs

$SYBASE/bin/isql -U $DB_USERID -S $DB_SERVER << ! >> $OUTFILE `echo $DB_PASSWD` use $db go Print " The processing" go ! # Extract data to file echo $DB_PASSWD | $SYBASE/bin/bcp $WRK_DB..open out $CONV_DIR/open".csv -t\, -c -U $DB_USERID -S $DB_SERVER -b 1000 | tail -3 I am able to... (0 Replies)
Discussion started by: w020637
0 Replies

8. Shell Programming and Scripting

Perform action file name written to the pipe

Hello, I have a script that monitors files uploaded via ftp. After a successful upload, the file name is written to the pipe. There is another program that reads this pipe and allows automatically run any program or script ( say test.sh ) to process the newly uploaded file. cat test.sh... (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies

9. Programming

How to clear the content of a pipe (STDIN) after it is written to another program?

PROGRAM A <-> PROGRAM B PROGRAM A sends data as STDIN ro PROGRAM B and when PROGRAM B is executed from PROGRAM A, it sends output back to PROGRAM A. This is implemented using 2 pipes (fd1 & fd2). The above process happens in a loop and during the second run, the previous data that had been... (10 Replies)
Discussion started by: vvaidyan
10 Replies

10. Linux

check written data

I'm using growisofs to write DVD, e.g. $ growisofs -Z /dev/dvd -V "Personal Data, `date +"%b, %d %Y"`" -R -J /mnt/d/* How can I test whether data was written correctly? md5sum or so? (0 Replies)
Discussion started by: Hitori
0 Replies
Login or Register to Ask a Question