logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
agrohe21
Posts: 95
Joined: Wed Aug 23, 2017 7:51 pm

logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by agrohe21 »

I have installed Gargoyle 1.12 on a new device, wrt32x and see many strange entries in the logread output. Also the webui seems to lag at the time when many of these exist in the log.

Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
root@Gargoyle:~# logread |grep "Broken pipe" |wc -l
679

Is 679 of these events normal? I dont see any other posts with uhttpd 3040 errrors. or at least the forum search wont find them for me.
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi

Lantis
Moderator
Posts: 6752
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by Lantis »

It's fine. It means there is some code that could be cleaned up or rewritten, but it is not doing anything harmful or unexpected.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

User avatar
CBx86
Posts: 157
Joined: Sun Jan 05, 2014 5:43 pm
Location: Brazil

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by CBx86 »

If want know whats wrong going on run:

Code: Select all

for x in /etc/config/*; do uci -q show "${x#/etc/config/}" >/dev/null || echo "$x "; done
This will check every config. Whats is missing.

agrohe21
Posts: 95
Joined: Wed Aug 23, 2017 7:51 pm

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by agrohe21 »

thanks.

when I run that as-is, it throws everything into dev null and I dont see it. Instead of dev null, I sent it to a file in ~ dir. This was the contents. Not sure what this means as I have wifi turned off and using Orbi as my APs.

would love to clean up those entries in the log even if harmless.

wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.channel='36'
wireless.radio0.hwmode='11a'
wireless.radio0.path='soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
wireless.radio0.htmode='VHT80'
wireless.radio1=wifi-device
wireless.radio1.type='mac80211'
wireless.radio1.channel='11'
wireless.radio1.hwmode='11g'
wireless.radio1.path='soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
wireless.radio1.htmode='HT20'
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi

Lantis
Moderator
Posts: 6752
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by Lantis »

CBx86 wrote:If want know whats wrong going on run:

Code: Select all

for x in /etc/config/*; do uci -q show "${x#/etc/config/}" >/dev/null || echo "$x "; done
This will check every config. Whats is missing.
The issue is not with a uci config syntax error. Or am i misunderstanding what your script detects?

It's just a broken pipe. You can read about them and if you can figure out which commands are generating them and add a workaround, i'd be very happy to accept a patch.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

agrohe21
Posts: 95
Joined: Wed Aug 23, 2017 7:51 pm

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by agrohe21 »

The question/issue is how to determine which options to use for the -i parameter. I assumed that the names of the files were the right options, but as you indicated, those are not.

I think I am good now but the 1440 minutes seems to be slowing down my gargoyle so may need something in between 15 and 1440. May 60 is more reasonable. then a cron command to pull this off every hour would work.
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi

ektus
Posts: 243
Joined: Sun Aug 11, 2013 2:26 am
Location: Germany

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by ektus »

Lantis wrote:
Tue Feb 18, 2020 4:28 pm
It's fine. It means there is some code that could be cleaned up or rewritten, but it is not doing anything harmful or unexpected.
Other than spamming the logfile with bogus entries, deleting older, but probably more interesting ones prematurely. My definition of "not harmful" seems to be slightly different ;)

agrohe21
Posts: 95
Joined: Wed Aug 23, 2017 7:51 pm

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by agrohe21 »

I agree. Is there a setting to increase the log size to minimize this? Is there a recommended Max size?
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi

ektus
Posts: 243
Joined: Sun Aug 11, 2013 2:26 am
Location: Germany

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Post by ektus »

Where does the broken pipe message originate? Would it be feasible to change that piece of code in a way to print this message only with a higher than standard log level?

Post Reply