When I press the inject button, I get the following output in the host console:
[worker thread 2 ] http_request.cpp:79 INFO[HTTP CLIENT REQUEST] POST /inject/1900e272c2cb2b61
[worker thread 2 ]http_client_connection.:284 ERRerror while writing to socket: Broken pipe
[worker thread 2 ] http_request.cpp:79 INFO[HTTP CLIENT REQUEST] POST /inject/1900e272c2cb2b61
[worker thread 2 ] http_response.cpp:156 INFO[HTTP CLIENT RESPONSE] HTTP/1.1 200 OK
[worker thread 2 ] http_response.cpp:156 INFO[SENDING RESPONSE] HTTP/1.1 200 OK
[worker thread 1 ] http_request.cpp:79 INFO[RECEIVED REQUEST] GET /v3/users/user_name/devices/device_ID/properties
[worker thread 1 ] api_request.cpp:316 WARNcannot find required parameter: property
[worker thread 1 ] http_response.cpp:156 INFO[SENDING RESPONSE] HTTP/1.1 200 OK
[worker thread 1 ] http_request.cpp:79 INFO[RECEIVED REQUEST] PUT /v3/users/user_name/devices/device_ID/properties/property_name
Each time I initiate an injection, I first encounter a āBroken pipeā error. After this, the injection appears to repeat automatically and succeeds on the second attempt. Following this, the system attempts to update a device property, but initially, the property name is missing, resulting in a warning. On the next attempt, the property name is correctly forwarded, and the process completes successfully.
When attempting to read the deviceās properties in a similar flow, I encounter only a āBroken pipeā error.
This is just one example, but it highlights a pattern of redundant or potentially incorrect calls, possibly pointing to a misconfiguration or an issue in the Node-RED flow.
Questions:
Has anyone else encountered similar behavior with unnecessary or repeated calls in their flow?
Are there any adjustments required on the flow definition to eliminate the initial āBroken pipeā and property missing issues?
Any insights or suggestions would be greatly appreciated!
Iāll split the log from your post in two in order to explain it and find potential issues.
First off:
[worker thread 2 ] http_request.cpp:79 INFO[HTTP CLIENT REQUEST] POST /inject/1900e272c2cb2b61
[worker thread 2 ]http_client_connection.:284 ERRerror while writing to socket: Broken pipe
[worker thread 2 ] http_request.cpp:79 INFO[HTTP CLIENT REQUEST] POST /inject/1900e272c2cb2b61
[worker thread 2 ] http_response.cpp:156 INFO[HTTP CLIENT RESPONSE] HTTP/1.1 200 OK
The request /inject/1900e272c2cb2b61 is executed from Node-RED frontend when the inject is clicked. I am not sure for the reason on the Broken Pipe message and why it tries again, as I havenāt been able to reproduce it. In my case only one inject request is done with a successful result. Example:
We may need more information in order to be able to analyze it, if you donāt mind sharing your instance hostname with me through a private message or through our support channel (https://support.thinger.io) we will take a look at it.
As for the warning, there is nothing to worry about, as it it just an informative message from thingers backend that means that the GET request to the /properties endpoint could also contain the name of the property like /properties/<property>
After further analyzing the logs and causes of the Broken pipe, I can assure you that there is no reason to worry.
What that log message is trying to say is that a previous HTTP connection that was thought to be open by the Thinger server (acting in this case as a proxy between the client/browser and Node-RED backend), seems to have been closed by Node-RED backend. On request failure due to the broken pipe (closed connection), the connection is reopened again against the Node-RED backend, and the original request is resent successfully.
Far from being an issue, the Thinger Server proxy tries to keep this connections alive to make future requests faster and avoid reopening unless necessary.