-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rocket 0.60.x fails to start - no prebuilt fibers available for node v8.x #9368
Comments
This possibly refers: One wonders why would I want a build system installed on my production server? Prior versions installed without having to build anything. Now it seems you need a load of build dependencies just to install a module. This is a retrograde step IMHO. I will struggle to upgrade/deploy Rocket now. |
Indeed. Same issue here. I had to struggle with the nodejs upgrade.
At this stage, I'm rolling back to an old instance snapshot. You cannot update from rocket.chat-0.59.3 to |
@rodrigok any ideas on these? |
@dariosusman yes documentation is horrendous, particularly when making such fundamental changes. Testing seems to be leaving a lot to be desired as well. |
@geekgonecrazy FYI I maintain a build for Koozali SME server and this is a big problem for us. Any suggestions on how to build the fibers module on a separate dev box and include it in the rpm I build ? Is that even possible? (Besides the issue of whether it will actually build on CentOS 6) |
CentOS/RHEL 6/7 - no prebuilt binaries for fibers@2.0.0 CentOS/RHEL 7 - one can build according to this guide CentOS/RHEL 6 - build fails because gcc is "old":
Workaround for CentOS/RHEL 6:
|
@RyszardK Thanks. Yes I guessed that CentOS 6 might be 'too old', despite being supported until 30 Nov 2020 (nearly 2 years) I don't have a CentOS 7 box, and I am not overly keen on 'force installing' stuff on stable production servers. Might be fine for me, but not sure my users would be too happy. What a mess. Doesn't inspire confidence. |
Hmmm. I have tried to build Fibers on my Trusty desktop as follows: Get latest node: https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/
File is here: ~/git/node-fibers/bin/linux-x64-57/fibers.node On the Rocket.Chat testbox run:
Answer 'Yes I am sure I want to do something rash and stupid on my nice stable production server' On the build box:
I then test start main.js but it fails again (......screams into the void): packages/meteor.js:1254 TypeError: Object.getOwnPropertyDescriptors is not a function Don't say I didn't try.... Scratching head and starting to wonder about the logic of 'latest means greatest' Can someone also explain the -48 and -57 versions ?? |
As a sysadmin, I cannot waste hours like I did trying to figure out what nodejs dependencies are missing. That should have been solved or otherwise documented. I simply rolled back from a snapshot and got done. |
@reetp @dariosusman Unfortunately we don't have a test environment with all OS and versions, would awesome to have it but I don't know how we could have that, we are open for suggestions. We always run tests for all commits, PRs and release, we run the build, run it on our official server while in release candidate (open.rocket.chat), but almost everything is based in Ubuntu or Debian. Can you guys confirm if this solution meteor/meteor#9269 (comment) solves the problem? If yes we can add that to our documentation. We know it could increase the steps to install in CentOS but it's wasn't our decision, we always try to keep updated with our framework and use the new NodeJS versions to bring more security and performance to our project. Thanks for your patience and hope you can help us to fix this or even improve the documentation. |
Doesn't work for me - no g++ or build-essential packages for RedHatEnterpriseLinux 6. |
Seems that g++ might be available via SCL. See: https://unix.stackexchange.com/questions/102354/install-g-on-rhel-6#102355 https://superuser.com/questions/590808/yum-install-gcc-g-doesnt-work-anymore-in-centos-6-4 However I ran the suggested workaround above on ubuntu. It built the module but rocket failed to start and no idea why... maybe not seeing the module correctly but no indications. @rodrigok I don't expect you to have test VMs for every linux flavour but certainly for the major distros. It really isn't hard with VMs in this day and age. You have dox on CentOS installation. It should be checked. So effectively now if we run something you consider non standard (and you don't define a standard) we are cut off overnight? "We know it could increase the steps to install in CentOS but it's wasn't our decision" That makes no sense at all..... it suggests you did test and knew, but ignored it. Exasperating, and no sensible solution in sight. |
Sorry for double post... my app crashed! |
OK, this will build fibers.node on CentOS 6 using SCL (7 should be similar) but I haven't tried to install it yet.... that's my next step. Install node 8 packages https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora
Install dev tools
File builds in: ~/git/node-fibers/bin/linux-x64-57/fiber.node |
YESSSSSSS got it running. The fibers file path was wrong - it should be done like this:
Copy your prebuilt fibers.node into: /opt/Rocket.Chat/programs/server/node_modules/fibers/bin/linux-x64-57 Only issue I have is that I can start rocket manually like this:
But I can't get it to run from the forever init script at the minute :-( I get this in the log: error: Script restart attempt #8 SyntaxError: Unexpected token { Any suggestions appreciated..... (I've done the hard work ;-) ) |
FWIW |
No takers ? I have the built module if someone wants to try it...... |
This is an open source project. We accept docs for helping other users like your self install on platforms/distros we otherwise would not have gotten to. We have been revamping our testing for making sure Rocket.Chat runs with out issues. To be clear... Rocket.Chat its self runs just fine. It is not our code that is giving you issues. You are just having some issues installing dependencies. In this case its made harder because one dependency needs to actually be compiled. This should get better.
This is definitely not what any of us are saying. Remember again this is an open source project. You're getting for nothing. Its kinda like a free puppy. Sometimes you're gonna get a mess on the carpet. But its your puppy and its gonna need some love every once in a while :) Many of us on the team are open source lovers beyond just the project. This is something even we have to keep in mind when using any other piece of open source software. Its because of our open source loving nature that we often go beyond to help even when not necessarily appreciated.
In other words. We realize it became more complicated, but that was not our intention. As to your error. I'd change your init script to use the absolute path of nodejs. Run |
"We have been revamping our testing for making sure Rocket.Chat runs with out issues. To be clear... Rocket.Chat its self runs just fine." Errr, no it doesn't. It only runs 'fine' on some platforms. And the platforms it runs fine on have changed. This bug wouldn't be open (and a number of others on the same subject) otherwise :-) "It is not our code that is giving you issues. You are just having some issues installing dependencies." Your code has dependencies which are failing to install, which causes your code to fail. That's a failure in your code or your documentation. I'm perfectly aware about Open Source - I have been using it for over 20 years and am well aware of the 'risks'. I have done my best to help here - I have found and documented a way to build the module. That's my way of giving back to the project. In my experience devs usually make sure they do some testing on the main platforms, and if issues are noticed or major changes made they at least let people know first..... I know documentation is boring, but it is vitally important. There should at least be some information in the release notes. "This is definitely not what any of us are saying" In effect it is, whichever way you look at it. CentOS 6 worked at 0.59.6 and broke at 0.60 (and 7 too it seems). They are 2 major, supported, distros. Broken overnight. With no information that it was going to happen. "As to your error. I'd change your init script to use the absolute path of nodejs. Run which node from your terminal and then use that path in your init file" Thanks. Note here it shows installation on CentOS 7 but still has a note for CentOS 6 So that needs a fix. Solved the final bit of the puzzle though I am not sure why. I had the node 4.x rpm installed. But had the 'n' module which installed 8.x so I had: /usr/bin/node v 4.8.4 In the rocketchat startup script it has:
However, no matter what I tried to do, the script ALWAYS defaulted to using /usr/bin/node which was the wrong version. This can be seen from: [root@test Rocket.Chat]# /usr/lib/node_modules/forever/bin/forever --plain list I have no idea how to force forever 'start' to use /usr/local/bin/node - possibly So I added the node 8.x repo, updated and presto ! She runs. I can document all this out in one post if required. Not sure how to get this as a CentOS 6 page in your docs? |
@reetp maybe the problem is related to the PATH precedence, could you try?:
I will add to my priority list to run our tests in other distros, lets see if we could use containers for it, at least it will prevent this kind of surprise in the future. |
@rodrigok thank you very much. Paths - that would make perfect sense. In the current init script (which I think was on the rocketchat wiki originally) the PATH line is currently:
I'll try and test this and report back. If I write all this up, is it worth adding as a doc bug so a page can be made, or is there somewhere else it can be hosted? Testing - that seems eminently sensible ! Personally I'd suggest testing on a few of the main distros *buntu LTS - e.g. 14.04/16.04 and should cover Mint etc Beyond those there are numerous others and I am sure much discussion on preferences... :-) Possibly Slack/Arch With them setup as VMs/Containers it wouldn't take much to do a simple manual install and test. At least if there is breakage you can add it to the release notes - I'm not suggesting you fix it, but at least let people know..... |
Bit old with no more discussion going to go ahead and close |
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:
[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
linux-x64-57
exists; testingProblem 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: 2gyp 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)
The text was updated successfully, but these errors were encountered: