Bug 28656 - consecutive ssh commands from a CGI timeout
Summary: consecutive ssh commands from a CGI timeout
Status: RESOLVED DUPLICATE of bug 22030
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.0.49
Hardware: Sun Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-28 14:08 UTC by John E
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John E 2004-04-28 14:08:00 UTC
from the logs I see:

(70007)The timeout specified has expired: ap_content_length_filter:
apr_bucket_read() failed

this script workds from command line even as nobody but as a CGI with 2.0.48 and
2.0.49 it timesout.

with 1.3 this works as a CGI ???

#!/bin/sh -

echo Content-type: text/plain
echo


PATH=/usr/local/bin:/usr/bin:/bin:.; export PATH


ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"

echo "10 done"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"

echo "20 done"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"

echo "30 done"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"

echo "40 done"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"
ssh -i /var/tmp/id_dsa -o UserKnownHostsFile=/var/tmp/known_hosts
jeismeie@lad0165 "/bin/uname"

echo "50 done"



exit 5
Comment 1 André Malo 2004-04-28 14:40:36 UTC
Hmm. Does the script writes somehting to stderr (i.e. a lot of stuff)?
Comment 2 John E 2004-04-28 14:59:58 UTC
All the script does is connect to another server with ssh and execute the
command uname.
Comment 3 Paul Querna 2004-07-10 06:57:52 UTC
Works for me here with a few simple tests.

Is there anything else unique about your setup John?

-Paul Querna
Comment 4 John E 2004-07-12 13:19:37 UTC
No special setup for either Linux RH 8.0 or Solaris 8 and I see the CGI not
completing on apache 2.x but working on 1.3.x ???

Is there anything special to put in the conf files for ssh's executed from a CGI?

Why do I see a difference on success (or not) depending on what major revision I
use as the server?

thanks
Comment 5 Joshua Slive 2004-07-12 13:54:33 UTC
As Andre pointed out, this is almost certainly the cgi-stderr issue.  See bug
22030. Trap the stderr on the script to /dev/null and rerun it verify.

(ie, name your script script2.cgi, then create script1.cgi that looks like

#!/bin/sh
/path/to/script2.cgi 2>/dev/null

and run script1.cgi from the web.)
Comment 6 John E 2004-07-12 15:10:14 UTC
Hi All,

just tried 2.0.50 on RH 8.0 with success with no chagnes to the script that was
failing.

thanks for the fix in 2.0.50.

John
Comment 7 Joe Orton 2004-07-12 15:19:39 UTC
Thanks for letting us know.

*** This bug has been marked as a duplicate of 22030 ***