Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Daemon node] write can throw and is not caught, crashes NR

オープン
#960 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js

調査の方向性

utility/daemon/daemon.js の、スタックトレースで参照されている input listener(現在は 53 行目付近)から始め、書き込みとストリームエラーがどのように処理されているかを確認してください。可能であれば、断続的に発生する EPIPE 失敗を再現または調査してください。daemon ノードが書き込み失敗を処理し、Node-RED をクラッシュさせなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

upstream
Which node are you reporting an issue on?

Daemon

What are the steps to reproduce?

Unknown. Happens sporadically due to unreliable wifi links.

What happens?

Node-RED crashes

15 Nov 10:45:00 - [warn] [daemon:ssh] Restarting : ssh                                             
15 Nov 10:45:01 - [red] Uncaught Exception:                                                        
15 Nov 10:45:01 - [error] Error: write EPIPE                                                       
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)                             
    at writeGeneric (node:internal/stream_base_commons:151:3)                                      
    at Socket._writeGeneric (node:net:874:11)                                                      
    at Socket._write (node:net:886:8)                                                              
    at writeOrBuffer (node:internal/streams/writable:392:12)                                       
    at _write (node:internal/streams/writable:333:10)                                              
    at Writable.write (node:internal/streams/writable:337:10)                                      
    at DaemonNode.inputlistener [as _inputCallback] (/data/node_modules/node-red-node-daemon/daemon
.js:44:81)                                                                                         
    at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26                   
    at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)          

As of a recent commit Line 44 in daemon.js is now: https://github.com/node-red/node-red-nodes/blob/master/utility/daemon/daemon.js#L53

What do you expect to happen?

I expect the daemon node to catch the exception and handle it gracefully without taking all of NR down.

Please tell us about your environment:
15 Nov 10:45:16 - [info] Node-RED version: v3.0.2                                                  
15 Nov 10:45:16 - [info] Node.js  version: v18.7.0                                                 
15 Nov 10:45:16 - [info] Linux 5.15.0-46-generic x64 LE                                            
主要言語
JavaScript
スター
1.1k
フォーク
612
平均マージ
13時間 57分
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

node-red/node-red-nodes のほかの issue

node-red/node-red-nodes の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。