ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
alexvelitsky
Posts: 25
Joined: Thu Aug 25, 2022 2:49 am

ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

Post by alexvelitsky »

Hi team,

my cacti server is:

:~$ sudo /usr/share/cacti/cli/add_graphs.php --version
Cacti Add Graphs Utility, Version 1.2.22 (DB: 1.2.22), Copyright (C) 2004-2022 The Cacti Group

MariaDB [cacti]> select * from version;
+--------+
| cacti |
+--------+
| 1.2.22 |
+--------+
1 row in set (0.000 sec)

it's running on a debian system:

:~$ uname -amrs
Linux debian 5.17.0-2-amd64 #1 SMP PREEMPT Debian 5.17.6-1 (2022-05-14) x86_64 GNU/Linux

Cacti server can poll devices but they have Down status anyway for some reason. And I see following permanently continuous logs such as:

2022-11-21 23:00:03 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-21 23:00:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())
2022-11-21 23:00:05 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-21 23:00:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())
2022-11-21 23:05:04 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-21 23:05:04 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())
2022-11-21 23:05:05 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-21 23:05:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())

Can somebody help me to fix this issue?

P.S. If you need more outputs - just let me know. Thanks!
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

Post by TheWitness »

Broken pipe means it crashed. Can you attempt to start the script server by hand? There is a whole section on testing the script server in the documentation. Also, you may be attempting to use a script server script that has a syntax error and causing the script server to fail. You should check the standard error log too.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
alexvelitsky
Posts: 25
Joined: Thu Aug 25, 2022 2:49 am

Re: ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

Post by alexvelitsky »

TheWitness wrote: Mon Nov 21, 2022 3:45 pm Broken pipe means it crashed. Can you attempt to start the script server by hand? There is a whole section on testing the script server in the documentation. Also, you may be attempting to use a script server script that has a syntax error and causing the script server to fail. You should check the standard error log too.
Thanks for your prompt reply! What do you mean with "to start the script server by hand"? I'm not sure how to start/restart cacti server by CLI. Or do you mean to restart apache server?
alexvelitsky
Posts: 25
Joined: Thu Aug 25, 2022 2:49 am

Re: ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

Post by alexvelitsky »

That's interesting, but those log messages stopped by itself:

2022-11-22 14:55:05 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-22 14:55:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())
2022-11-22 16:35:03 - ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/site/script_server.php on line: 189
2022-11-22 16:35:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/script_server.php[189]:fputs(), CactiErrorHandler())
2022-11-22 19:20:17 - SYSTEM THOLD STATS: Time:1.1892 Tholds:2 TotalDevices:4 DownDevices:0 NewDownDevices:0

:~$ date
Wed Nov 23 02:17:14 AM MSK 2022
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: ERROR PHP NOTICE: fputs(): Write of 53 bytes failed with errno=32 Broken pipe in file

Post by TheWitness »

Read the documentation @ https://docs.cacti.net
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest