First at all this issue was found on the current version of Official ponte server , but i dont understand why you guys didn't enable github issue tracker on eclipse ponte...
Now the issue:
I was not able to run ponte correctly on 2 machines, here is the environments i tested and how i arrive to a solution (or a workaround i think).
1. OSX Mavericks
uname -a
Darwin camilos-mbp.lan 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
OS X 10.9.5 (13F34)
node -v
v0.12.0
2. Xubuntu
uname -a
Linux ##### 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
node -v
v0.12.0
3. AWS Linux EC2 instance
Amazon Linux AMI release 2014.09
Kernel \r on an \m
uname -a
Linux ip-###-##-##- 3.14.27-25.47.amzn1.x86_64 #1 SMP Wed Dec 17 18:36:15 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
node -v
v0.10.33
issues i found on environments 1 and 2:
Issue 1
During installation it shows lots of errors related with node-gyp build so to solve all those errors except zmq i did:
Issue 2
Even with the install errors it was possible to start the server, but i was not able to return correctly calls to the mqtt broker, and also i wasn't getting coap response to the coap-cli, neither to an android coap client, it was receiving the CoAp request, but it never returned a CoAp response.
The interesting fact was that on environment 3.... i did normal installation process with
npm install -g ponte bunyan , and with this version everything was working out of the box, then i tried exactly same node version on environments 1, 2 and also in a docker instance with no success....So i started debugging and at this point i realised what the problem is:
callback-stream is not working correctly
I think is related with the stream libraries that are out of date, im not sure yet.. as you can see in a fork i did of callback stream, i added a line inside the pipe, and this did the trick, everything works now on all environments. but im not sure if this is the correct thing to do, would you please help me?
First at all this issue was found on the current version of Official ponte server , but i dont understand why you guys didn't enable github issue tracker on eclipse ponte...
I was not able to run ponte correctly on 2 machines, here is the environments i tested and how i arrive to a solution (or a workaround i think).
on these environments installations tested were
issues i found on environments 1 and 2: Issue 1 During installation it shows lots of errors related with node-gyp build so to solve all those errors except zmq i did:
Issue 2 Even with the install errors it was possible to start the server, but i was not able to return correctly calls to the mqtt broker, and also i wasn't getting coap response to the coap-cli, neither to an android coap client, it was receiving the CoAp request, but it never returned a CoAp response.
The interesting fact was that on environment 3.... i did normal installation process with
npm install -g ponte bunyan
, and with this version everything was working out of the box, then i tried exactly same node version on environments 1, 2 and also in a docker instance with no success....So i started debugging and at this point i realised what the problem is:I think is related with the stream libraries that are out of date, im not sure yet.. as you can see in a fork i did of callback stream, i added a line inside the pipe, and this did the trick, everything works now on all environments. but im not sure if this is the correct thing to do, would you please help me?
https://github.com/tucanae47/callback-stream/commit/4669de833a938e3f8ff4212323dae79a8793897d
Ps. From my debugging i also found that call-backstream is using
var Writable = require("stream").Writable, not readable-stream