hastic-server icon indicating copy to clipboard operation
hastic-server copied to clipboard

Error on running hastic server in raspberry pi

Open anagha-sait opened this issue 5 years ago • 5 comments

While trying to run the hastic-server in RPi, node server command produces error. node version used : 8 T:~/hastic-server-0.3.6-beta/server/dist $ node server HASTIC_PORT: 8000 ZMQ_IPC_PATH: /tmp/hastic ZMQ_DEV_PORT: 8002 ZMQ_HOST: 127.0.0.1 HASTIC_API_KEY: " " GRAFANA_URL: null ORG_ID: 1 HASTIC_WEBHOOK_URL: null HASTIC_WEBHOOK_TYPE: application/json HASTIC_WEBHOOK_SECRET: null HASTIC_WEBHOOK_IMAGE: false ZMQ_CONNECTION_STRING: null HASTIC_INSTANCE_NAME: Ripples_IoT data service: mkdir: /tmp/hastic /home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132 e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){var r=n(122),i=n(15),o=n(453),a=n(454);function s(e){this.defaults=e,this.interceptors={request:new o,response:new o}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,n,r){return this.r

Error: dlopen: Cannot open /home/openhabian/hastic-server-0.3.6-beta/server/dist/zmq.node: Error: /home/openhabian/hastic-server-0.3.6-beta/server/dist/zmq.node: wrong ELF class: ELFCLASS64 at Object. (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132:36973) at Object. (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132:37019) at n (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:1:1473) at Object.t (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132:27732) at n (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:1:1473) at Object. (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132:27681) at n (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:1:1473) at Object. (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:132:23503) at n (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:1:1473) at Object. (/home/openhabian/hastic-server-0.3.6-beta/server/dist/server.js:9:88036)

anagha-sait avatar Jul 10 '19 10:07 anagha-sait

Hey @saitiot , thank you for the report.

We don't officially support Raspberry PI, but we have some tips here:

  1. this is zmq https://github.com/openstf/stf/issues/54 which needs 64 bit version
  2. we compile zmq here in 64 bit

The thing is that it's possible to make a 32 bit version, but I believe that it is not the last problem we can face trying to run hastic-server on RPI.

jonyrock avatar Jul 10 '19 11:07 jonyrock

@saitiot if you really need support of hastic on rasbery pi, please ping us at [email protected]

jonyrock avatar Jul 10 '19 12:07 jonyrock

It might make sense to try to build hastic-server from sources on the target machine so node would rebuild zmq using target computer architecture bit width (32 or 64)

jonyrock avatar Jul 10 '19 20:07 jonyrock

@jonyrock any plans in the meantime to support it? If not, I am happy to lend a pair of hands to help. I think there is an ever growing community and this would be a fantastic add to https://github.com/SensorsIot/IOTstack.

alf-scotland avatar Jan 29 '21 21:01 alf-scotland

@alf-scotland I've bought rasberry! Please go to matrix if you want to find me :)

jonyrock avatar Jan 30 '21 10:01 jonyrock