Rocket.chat: [armhf] [Snap] wrong elf class on sharp

Created on 3 May 2018  路  9Comments  路  Source: RocketChat/Rocket.Chat

Hey guys, we are trying to move our company away from Slack and we choosed Rocket.Chat. Today I wanted to do some "labs" and install it on a small RPi 3 to make the transition easier, by showing it to other members of the company. But I wasn't able to setup the server as basically the snap package is broken. More informations below:

Description:

Trying to get Rocket.Chat to run on a RPi 3 / Ubuntu Core 16 without success, also tried with the --edge version (0.59.x).

Server Setup Information:

  • Version of Rocket.Chat Server: Issue happens on 0.62.0, 0.64.0 & 0.59.0.
  • Operating System: Ubuntu Core 16
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Not related
  • Node Version: Not installed on Ubuntu Core
  • mongoDB Version: 2.6.10

Steps to Reproduce:

  1. Setup a RPi using Ubuntu Core, this is really simple. Burn the SD, plug, enjoy ;
  2. Login via ssh ;
  3. Run sudo snap install rocketchat-server ;
  4. Get the logs from the journal.

Expected behavior:

The server start and becomes accessible on http://127.0.0.1:3000

Actual behavior:

The server does not start and leaves a stacktrace in the journalctl:

Relevant logs:

From the journalctl of rocketchat-server.server:

MongoDB shell version: 2.6.10
connecting to: test
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
Will load cache for users
0 records load from users
Will load cache for rocketchat_room
0 records load from rocketchat_room
Will load cache for rocketchat_subscription
0 records load from rocketchat_subscription
Will load cache for rocketchat_settings
351 records load from rocketchat_settings
Updating process.env.MAIL_URL
Starting Email Intercepter...
Will load cache for rocketchat_permissions
0 records load from rocketchat_permissions
Will load cache for rocketchat_roles
0 records load from rocketchat_roles
Exception in callback of async function: Error: /snap/rocketchat-server/1233/programs/server/npm/node_modules/sharp/build/Release/sharp.node: wrong ELF class: ELFCLASS64
    at Object.Module._extensions..node (module.js:641:18)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/snap/rocketchat-server/1233/programs/server/npm/node_modules/sharp/lib/constructor.js:10:15)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/snap/rocketchat-server/1233/programs/server/npm/node_modules/sharp/lib/index.js:3:15)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at npmRequire (/snap/rocketchat-server/1233/programs/server/npm-require.js:133:10)
    at Module.useNode (packages/modules-runtime.js:697:18)
    at fileEvaluate (packages/modules-runtime.js:342:20)
    at require (packages/modules-runtime.js:238:16)
    at FileUpload.js (packages/rocketchat:file-upload/server/lib/FileUpload.js:1:351)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at /snap/rocketchat-server/1233/programs/server/packages/rocketchat_file-upload.js:2061:1
    at /snap/rocketchat-server/1233/programs/server/packages/rocketchat_file-upload.js:2075:3
    at /snap/rocketchat-server/1233/programs/server/boot.js:411:36
    at Array.forEach (<anonymous>)
    at /snap/rocketchat-server/1233/programs/server/boot.js:220:19
    at /snap/rocketchat-server/1233/programs/server/boot.js:471:5
    at Function.run (/snap/rocketchat-server/1233/programs/server/profile.js:510:12)
    at /snap/rocketchat-server/1233/programs/server/boot.js:470:11
snaps

Most helpful comment

Hi any update with this one, my servers been accessible for quite a while now!!

All 9 comments

I've got the same problem with snap/Ubuntu core on Rpi 3 :(.

Same issue here with tar/Raspbian Jessie on RPi 2.

Any update on this ? :(

Yes please ? Even a fix to do in the incriminated directory ?

@geekgonecrazy Hello there, same problem here on a Pi 3b with Ubuntu Core 16 (newest dev build).
Cant access the interface nor access it through rocketchat app.
Exactly the same issue as explained in this topic.
The reference from @SkyzohKey did not help at all, because in the reference topic was no solution posted...

Any fix or solution yet?

Unfortunately not yet.

Hi any update with this one, my servers been accessible for quite a while now!!

Yes, at least a tricky workaround ^^ ?

Yay 馃憦 thanks for the fix :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeigerpuppy picture zeigerpuppy  路  3Comments

mddvul22 picture mddvul22  路  3Comments

brendanheywood picture brendanheywood  路  3Comments

lunitic picture lunitic  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments