-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
On trying to restart after manual upgrade from 59.x I could see rocket failing to start in the logs.
A manual start showed:
[root@test Rocket.Chat]# node main.js
module.js:540
throw err;
^
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/opt/Rocket.Chat/programs/server/boot.js:1:75)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
I tried to install fibers
npm install fibers
No package available. Could not build locally.
Looking at the fibers page it seems that there are prebuilt packages up to node v6.x
After that it requires a manual build. So the upgrade to node v8 breaks the install.
The server installation does not have any build packages on it so I am unable to build fibers locally (and probably won't have sufficiently new build packages to be able to do so either). I am also not keen on having build packages n a production server. So the devs decision to leap from node 4.x to 8.x breaks the install.
https://www.npmjs.com/package/fibers
"If you are running NodeJS version 4.x, 5.x, or 6.x on Linux, OS X, or Windows (7 or later) then you should be able to install fibers from npm just fine. If you are running an older (or newer) version of node or some other operating system you will have to compile fibers on your system."
Server Setup Information:
- Version of Rocket.Chat Server: 0.60.4-rc.1
- Operating System: CentOS 6
- Deployment Method(snap/docker/tar/etc): tar
- Number of Running Instances: 1
- DB Replicaset Oplog:
- Node Version: 8.9.4
[root@test Rocket.Chat]# uname -a
Linux test 2.6.32-696.18.7.el6.x86_64 Refactored and reorganised entire css/less files and logic. #1 SMP Thu Jan 4 17:31:22 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Steps to Reproduce:
Manually update
Try to run main.js
Expected behavior:
Rocket runs
Actual behaviour:
Rocket fails to start as fibers is not installed
NPM install fibers
Install log
[root@test Rocket.Chat]# npm install fibers
fibers@2.0.0 install /opt/Rocket.Chat/node_modules/fibers
node build.js || nodejs build.js
linux-x64-57 exists; testing
Problem with the binary; manual build incoming
make: Entering directory /opt/Rocket.Chat/node_modules/fibers/build' CXX(target) Release/obj.target/fibers/src/fibers.o make: g++: Command not found make: *** [Release/obj.target/fibers/src/fibers.o] Error 127 make: Leaving directory /opt/Rocket.Chat/node_modules/fibers/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 2.6.32-696.18.7.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /opt/Rocket.Chat/node_modules/fibers
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
Alpine users please run: sudo apk add python make g++
sh: nodejs: command not found
npm WARN enoent ENOENT: no such file or directory, open '/opt/Rocket.Chat/package.json'
npm WARN Rocket.Chat No description
npm WARN Rocket.Chat No repository field.
npm WARN Rocket.Chat No README data
npm WARN Rocket.Chat No license field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@2.0.0 install: node build.js || nodejs build.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@2.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-01-09T16_22_31_833Z-debug.log
As a test I attempted to run it using node v6.x
npm -g install fibers future
cd /opt/Rocket.Chat/programs/server
npm install fibers future
node main.js
Log:
.....
Will load cache for rocketchat_permissions
74 records load from rocketchat_permissions
Will load cache for rocketchat_roles
11 records load from rocketchat_roles
CROWD ➔ info Disabling CROWD user sync
CustomOAuth ➔ debug Init CustomOAuth dolphin { serverURL: '',
authorizePath: '/m/oauth2/auth/',
tokenPath: '/m/oauth2/token/',
identityPath: '/m/oauth2/api/me/',
scope: 'basic',
addAutopublishFields:
{ forLoggedInUser: [ 'services.dolphin' ],
forOtherUsers: [ 'services.dolphin.name' ] } }
CustomOAuth ➔ debug Init CustomOAuth drupal { serverURL: '',
identityPath: '/oauth2/UserInfo',
authorizePath: '/oauth2/authorize',
tokenPath: '/oauth2/token',
scope: 'openid email profile offline_access',
tokenSentVia: 'payload',
usernameField: 'preferred_username',
mergeUsers: true,
addAutopublishFields:
{ forLoggedInUser: [ 'services.drupal' ],
forOtherUsers: [ 'services.drupal.name' ] } }
CustomOAuth ➔ debug Init CustomOAuth github_enterprise { serverURL: '',
identityPath: '/api/v3/user',
authorizePath: '/login/oauth/authorize',
tokenPath: '/login/oauth/access_token',
addAutopublishFields:
{ forLoggedInUser: [ 'services.github-enterprise' ],
forOtherUsers: [ 'services.github-enterprise.username' ] } }
CAS ➔ info Disabling CAS login service
CustomOAuth ➔ debug Init CustomOAuth gitlab { serverURL: 'https://gitlab.com',
identityPath: '/api/v3/user',
scope: 'api',
addAutopublishFields:
{ forLoggedInUser: [ 'services.gitlab' ],
forOtherUsers: [ 'services.gitlab.username' ] } }
packages/meteor.js:1254
Fiber(runWithEnvironment).run();
^
TypeError: Object.getOwnPropertyDescriptors is not a function
at insert (packages/mongo/collection.js:435:12)
at ModelsBaseDb.insert (packages/rocketchat:lib/server/models/_BaseDb.js:245:33)
at insert (packages/rocketchat:lib/server/models/_Base.js:95:19)
at EventEmitter.RocketChat.sendMessage (packages/rocketchat:lib/server/functions/sendMessage.js:51:45)
at ErrorHandler.trackError (packages/rocketchat:error-handler/server/lib/RocketChat.ErrorHandler.js:58:15)
at Object.Meteor._debug (packages/rocketchat:error-handler/server/lib/RocketChat.ErrorHandler.js:34:9)
at onException (packages/meteor.js:1222:14)
at runWithEnvironment (packages/meteor.js:1245:9)