GNU bug report logs - #33292
Piped log program failed unexpectedly when using sed with Apache at windows

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: sed; Reported by: Assaf Gordon <assafgordon@HIDDEN>; Keywords: moreinfo; dated Tue, 6 Nov 2018 17:43:01 UTC; Maintainer for sed is bug-sed@HIDDEN.
Added tag(s) moreinfo. Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 33292 <at> debbugs.gnu.org:


Received: (at 33292) by debbugs.gnu.org; 6 Nov 2018 17:51:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 12:51:33 2018
Received: from localhost ([127.0.0.1]:37647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gK5Vk-0002Qf-Op
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 12:51:32 -0500
Received: from mail-pl1-f174.google.com ([209.85.214.174]:38849)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1gK5Vj-0002QN-5y; Tue, 06 Nov 2018 12:51:31 -0500
Received: by mail-pl1-f174.google.com with SMTP id p4-v6so4158761plo.5;
 Tue, 06 Nov 2018 09:51:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:from:to:references:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=qm1XbCq6ZsTsAf62xdnA465kY2n3rSQbSVDE6DZlLKc=;
 b=bS/r8ZaVBfU2m0fcUVt73IDXzRBxyBoVj1ECLIGnKYJUj8B6/3jn+LHifhy8agWQwT
 7GYW2giSdIqS5E73elTphRMuyhPyaX/QXVxtqtl+Nhjs+KA3wayE+xvidgW7eroz0ovY
 L/3B3ZjGZIEBw60H32ymotu6AqmviphY4KvWD8NC8ow509VH7ckmknDrSd5mILcqFEo4
 Ta8adoVvT9rw0NL3NAY9JIDwPaaV8JgkhSYwuyDhuZJBRO7xZ349J07oynUT8hLNeiQv
 N85Tj/jKibhr5GaGnw1jDo3qIFHfs3OuxlRGOjXI2WjIdIY0oVx/3aT3xjY/jhLXyrrS
 0OiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:from:to:references:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=qm1XbCq6ZsTsAf62xdnA465kY2n3rSQbSVDE6DZlLKc=;
 b=WqpKyNUjqNEcozrgyMRVh0jrBo9pHIkVSYtJkXJPI6tT+F93OGmn++2qugjRCrPRsF
 YiivVaetZjWcFkUc6X4aHb8vCay8lyk8KVgLtck/okoNsNzIwqb/tyVvspSuuOePkDSu
 3cNq05lvEF3Y/PlgD3W+FqhHxoyrddbM6ymDlJNYuAw3eS+r2ActDh2TORf+kuXA4vEP
 mYM+Ywl6kb65ySD6YwWl/xuNkAfTsuWFJGiyhTcxsiRxXtgDtjuMAr9RPQqQc3+edoDl
 Dks2GkuXlLEElHj2/d1oSR8mXaZK9rXLH0Crn9+DMoc9eByQykOvlnU3C3rHGUAeYsyX
 va7Q==
X-Gm-Message-State: AGRZ1gKTGzLKqXnmuFKB7eWeDhk4ybXDTwQHEwzxDut3zEK8+oN2wG8H
 J+HLzoJtKBhR4Vc9B+LCYADaiVva
X-Google-Smtp-Source: AJdET5fjrdm2TOEH/ogYs/0LNV83/cyvcWAdFHndS3cXqkrmnHiB4GR4qzsFrbzggjdztgKdQhzqow==
X-Received: by 2002:a17:902:7082:: with SMTP id
 z2-v6mr4736413plk.78.1541526684604; 
 Tue, 06 Nov 2018 09:51:24 -0800 (PST)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 u2-v6sm33835585pfn.50.2018.11.06.09.51.23
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 06 Nov 2018 09:51:23 -0800 (PST)
Subject: Re: bug#33292: Piped log program failed unexpectedly when using sed
 with Apache at windows
From: Assaf Gordon <assafgordon@HIDDEN>
To: 33292 <at> debbugs.gnu.org
References: <ae538957-d855-4942-7c48-a13a9d5f8582@HIDDEN>
Message-ID: <e0c09814-4cde-b95d-506c-5d830fc88d15@HIDDEN>
Date: Tue, 6 Nov 2018 10:51:22 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
In-Reply-To: <ae538957-d855-4942-7c48-a13a9d5f8582@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33292
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 33292 moreinfo
stop



Hello,

On 2018-11-06 10:42 a.m., Assaf Gordon wrote:
> Bug report forwarded from
>  From github https://github.com/agordon/sed/issues/1
> and/or stackoverflow https://stackoverflow.com/q/53118038
> 
> Vikram Singh writes:
> ====
> I am using sed to mask some data in proxy logs of Apache at windows.
> Putting command in httpd.conf file is :
> 
>   CustomLog "|$'C:/Program Files (x86)/GnuWin32/bin/sed' -i 
> 's/password=[^ ]*/password=masked/' 'logs/proxy-access.log'" combined

The GnuWin32 version is sed is not maintained by us, so we can't 
directly help with it.

There were alos some windows-related improvements recently,
if you could test a newer version that would be very useful.

Lastly,
The command seems weird at a cursory look:
Using "|" means you are piping into sed (and expecting sed to output
the data to STDOUT). but using "sed -i" is "replace --in-place",
meaning it will read the "logs/proxy-access.log" and update it without
reading anything from STDIN or writing anything to STDOUT.

Is that intentional?

> on starting Apache service command prompts start opening and closing and 
> in error.logs found exception i.e :
> 
> AH00106: piped log program ''C:/Program Files (x86)/GnuWin32/bin/sed' -i 
> 's/password=[^ ]*/password=masked/' 'C:/Apache24/logs/proxy-access.log'' 
> failed unexpectedly
> apache logging sed proxy
> ===
> 

"failed unexpectedly" is not a sed error - another program generates it 
(apache?) - so it isn't clear what is failing and how.

Can you provide more details?

regards,
  - assaf





Information forwarded to bug-sed@HIDDEN:
bug#33292; Package sed. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Nov 2018 17:42:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 06 12:42:36 2018
Received: from localhost ([127.0.0.1]:37634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gK5N6-0000A5-29
	for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 12:42:36 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45133)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1gK5N4-00009r-B3
 for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 12:42:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1gK5Mv-0003c0-Cu
 for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 12:42:26 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33974)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <assafgordon@HIDDEN>)
 id 1gK5Mr-0003Uh-WD
 for submit <at> debbugs.gnu.org; Tue, 06 Nov 2018 12:42:25 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54603)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1gK5Mq-0007a2-62
 for bug-sed@HIDDEN; Tue, 06 Nov 2018 12:42:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <assafgordon@HIDDEN>) id 1gK5Mi-0002zS-HT
 for bug-sed@HIDDEN; Tue, 06 Nov 2018 12:42:20 -0500
Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:38303)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <assafgordon@HIDDEN>)
 id 1gK5Mh-0002r6-UV
 for bug-sed@HIDDEN; Tue, 06 Nov 2018 12:42:12 -0500
Received: by mail-pl1-x62f.google.com with SMTP id p4-v6so4146708plo.5
 for <bug-sed@HIDDEN>; Tue, 06 Nov 2018 09:42:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:subject:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=1dXLDx6d7PNclbHKZhUveYNOA0QSra0Gh0ARZfoNbzY=;
 b=UTU/OyX4WeyRTExHm6N6JGR0ME4buJUuT0N0eel9Sz+KqV6sdzl4HaQj5ZnxtbIM/5
 avk4xLH+wG88YWEJT/OP/vnQZ+UCoRTe1qLfl5KgEYOTNdQGvGrwFc6AiUNqtm9qRQpJ
 9lho0TtrbwO/4qu0pHXOxoNkp4mfesbFeWnQHti7gZYx/Xqf0vHhWTrNRoI6v9IRaaif
 k1XqB8F40o11tJPTFkP+wjAscnuwghFCT0kOfYP/kEBdL6cX4eY8WH3xQlJoTMsQqHeD
 VGhEO+9BVaii2td4EKgWIP20QCq3mtMb0gNiBx6Zq04/NoFvE85FmpmXNUdgcqAqfA9a
 LwVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:subject:message-id:date:user-agent
 :mime-version:content-language:content-transfer-encoding;
 bh=1dXLDx6d7PNclbHKZhUveYNOA0QSra0Gh0ARZfoNbzY=;
 b=Xb+99LrJ+m+uk/TA4772oDmFnJIg+Zr2KMmD0RWqaz5MZC8I97WTPmiMOUIHnu9OLe
 e37HqfgMlykfS4E4goAhJfPRoWsFsq4lCkG/64OkjwUuweNn7ThscKcZdAOdl/oiFseq
 xTsHC0sqHrUmACWizyPYXAZif1+9jaT6wtCZLcyZLUUGuxqhbDpuRshK8O7RXnItWlCp
 eHn03Tm7KFKyH39ldhj3DMq9Xr3pJvApLAJ8TfBHYqhW12ITklJuWvNnk4sX7FS9cPMV
 r8G0+MG+CD6gd0mBbnknrWaokymrn5byJ9JPXXROiQZxgnfKqBpHez35mnyNyjWTs7Tr
 YSaw==
X-Gm-Message-State: AGRZ1gIICKVSB8CVhuehpByGPiLkBddIH7XmqIQen0w1ofPF296ZIlrW
 ApIQ3Q+qaRh71bwegdgp/eLTucqk
X-Google-Smtp-Source: AJdET5f7Dj+1ZA23Z5ziwgIvQ6ZOeOeh6sLML6CulryDYF+xVTMspC6Oq0krRKA1MkllLyfZu9DDDw==
X-Received: by 2002:a17:902:3fe4:: with SMTP id
 a91-v6mr27107253pld.295.1541526129433; 
 Tue, 06 Nov 2018 09:42:09 -0800 (PST)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 s2-v6sm108249212pfk.133.2018.11.06.09.42.08 for <bug-sed@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 06 Nov 2018 09:42:08 -0800 (PST)
To: bug-sed@HIDDEN
From: Assaf Gordon <assafgordon@HIDDEN>
Subject: Piped log program failed unexpectedly when using sed with Apache at
 windows
Message-ID: <ae538957-d855-4942-7c48-a13a9d5f8582@HIDDEN>
Date: Tue, 6 Nov 2018 10:42:07 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Bug report forwarded from
 From github https://github.com/agordon/sed/issues/1
and/or stackoverflow https://stackoverflow.com/q/53118038

Vikram Singh writes:
====
I am using sed to mask some data in proxy logs of Apache at windows.
Putting command in httpd.conf file is :

  CustomLog "|$'C:/Program Files (x86)/GnuWin32/bin/sed' -i 
's/password=[^ ]*/password=masked/' 'logs/proxy-access.log'" combined

on starting Apache service command prompts start opening and closing and 
in error.logs found exception i.e :

AH00106: piped log program ''C:/Program Files (x86)/GnuWin32/bin/sed' -i 
's/password=[^ ]*/password=masked/' 'C:/Apache24/logs/proxy-access.log'' 
failed unexpectedly
apache logging sed proxy
===




Acknowledgement sent to Assaf Gordon <assafgordon@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-sed@HIDDEN. Full text available.
Report forwarded to bug-sed@HIDDEN:
bug#33292; Package sed. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 6 Nov 2018 18:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.