1

I have a very strange problem with one of my systems. There are two components:

  1. uClinux running on NIOS board.

  2. Power PC running old CentOS.

There is an open socket between the two boards with constant text commands passing back and forth. I have several systems with this setup.

However, one of them have this strange error: the socket disconnects around midnight throwing broken pipe error. Does anyone knows what particular setting configures this behaviour? I doubt it is my software because it works just fine on several other systems.

ilya1725
  • 4,496
  • 7
  • 43
  • 68
  • You sure there is no ghost or something (around midnight) :P – vish4071 Sep 08 '15 at 05:50
  • On a serious note, `broken pipe` is the error that occurs whenever there is "improper" disconnection between two systems (Server/client etc). eg. Server shutdown, some cron running on server automatically kills all connections or something like that, in that case, client system would show `Broken Pipe` and then the connection is lost. It is almost never a software error so I guess your software should be right. – vish4071 Sep 08 '15 at 05:56
  • @vish4071: Well, I didn't find any ghosts. I've checked the cron jobs, but nothing really stood out. Again, I have a couple of boxes and this effect only occurs on one. Cron jobs were the same. – ilya1725 Sep 12 '15 at 04:52
  • Now I'm not so sure why your socket is disconnecting. I can propose a solution though, if this problem occurs only around midnight (a specific time or something like that), you can write a script to check if the connect process (`ssh`, `telnet`, etc) is still on. As soon as it is not (when the pipe breaks), run the `connect` script (whatever method you are using to connect your client and server systems). But I'm pretty sure, `broken pipe` is caused due to improper disconnection. I hope this helps, and if it does not, I hope you get some helpful answers. :) – vish4071 Sep 12 '15 at 10:32
  • @vish4071: thanks for the suggestion. But this is a workaround. I'd like to figure out why it occurs in the first place. Seems like there is some setting somewhere. – ilya1725 Sep 27 '15 at 14:54

1 Answers1

0

So to summarize the results: I couldn't find what was causing the broken pipe error right at midnight. But I was able to mitigate its effects by ... ignoring the SIGPIPE signal as suggested by this post.

ilya1725
  • 4,496
  • 7
  • 43
  • 68