running sample application on raspberrypi zero w getting premature close error
See original GitHub issueworking fine on my mac, transferred the sample app onto raspberry pi zero w, getting the below
any ideas? I have all the certs, and everything required to connect.
pi@pids01iot150:~/iot $ ./start.sh
Running pub/sub sample application...
offline
error Error: premature close
at TLSSocket.onclose (/home/pi/iot/node_modules/end-of-stream/index.js:47:67)
at TLSSocket.emit (events.js:185:15)
at _handle.close (net.js:541:12)
at TCP.done [as _onclose] (_tls_wrap.js:379:7)
close
reconnect
error Error: premature close
at TLSSocket.onclose (/home/pi/iot/node_modules/end-of-stream/index.js:47:67)
at TLSSocket.emit (events.js:185:15)
at _handle.close (net.js:541:12)
at TCP.done [as _onclose] (_tls_wrap.js:379:7)
close
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
STICKY: Is your Pi not booting? (The Boot Problems Sticky)
Disconnect any extraneous USB devices, and try booting with only the video and the power cable connected. If you have to press keys...
Read more >Raspberry Pi Zero W Setup - Medium
Raspberry Pi Zero W Setup ... This is my stream-of-consciousness notes to get a headless (ie no display) raspberry pi zero w up...
Read more >How to Build a Raspberry Pi Server for Development - Toptal
In this article, I'm going to guide you through the process of setting it up as a home development server and deploying a...
Read more >RPi.GPIO basics 3 – How to Exit GPIO programs cleanly ...
This program will run until it finishes, or a keyboard interrupt or other exception occurs. Whichever of these occurs, the finally: block (lines...
Read more >Raspberry Pi Zero 2 W - YouTube
Raspberry Pi Zero 2 W review, including hardware specification and comparative performance tests. You can find more information on the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

When I run my program I am getting below issue, I didn’t get any solution so far, can someone help, thanks in advance. ` events.js:200 throw er; // Unhandled ‘error’ event ^ Error: premature close at onclosenexttick (xxx/node_modules/end-of-stream/index.js:54:86) at processTicksAndRejections (internal/process/task_queues.js:76:11)
Emitted ‘error’ event on DeviceClient instance at: at MqttClient. (xxx/node_modules/aws-iot-device-sdk/device/index.js:772:15) at MqttClient.emit (events.js:228:7) at TLSSocket.f (xxx/node_modules/once/once.js:25:25) at onclosenexttick (xxx/node_modules/end-of-stream/index.js:54:73) at processTicksAndRejections (internal/process/task_queues.js:76:11)`
when I try to check the connection with the certificates:
openssl s_client -connect xxxxEP:8883 -CAfile xxxAmazonRootCA1.pem -cert xxx.pem.crt -key xxx-private.pem.key
CONNECTED(00000003)
Same problem here, but other line in events.js events.js:174 throw er; // Unhandled ‘error’ event ^
Error: premature close at onclosenexttick (xxx/server/node_modules/end-of-stream/index.js:54:86)