Rocket.chat: Rocketchat crashes after login attempt

Created on 14 Jan 2019  ยท  20Comments  ยท  Source: RocketChat/Rocket.Chat

Description:


After upgrading mongodb to 3.4.18 and rocketchat to 0.73.2 every time when I try to login a server crashes and I have to manually start it again. We use LDAP as a login mechanism.

Steps to reproduce:

  1. Upgrade mongodb to 3.4.18
  2. Upgrade rocketchat to 0.73.2
  3. Restart rocketchat (via systemctl in my case)
  4. Try to log in via webpage

Expected behavior:


I am able to login and use rocketchat

Actual behavior:


Server crashes

Server Setup Information:

  • Version of Rocket.Chat Server: 0.73.2
  • Operating System: Centos 7.6.1810
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 8.9.4
  • MongoDB Version: 3.4.18

Additional context

Relevant logs:

LDAPHandler โž” info Init LDAP login XXX
LDAP โž” Connection.info Init setup
LDAP โž” Connection.info Connecting ldap://1.1.1.1:389
LDAP โž” Connection.info LDAP connected
LDAP โž” Search.info Searching user XXX
LDAP โž” Search.info Search result count 1
LDAP โž” Auth.info Authenticating uid=XXX,ou=People,dc=yyy,dc=com
LDAP โž” Search.info Search result count 1
LDAP โž” Auth.info Authenticated uid=XXX,ou=People,dc=yyy,dc=com
LDAPHandler โž” info Querying user
LDAPHandler โž” info Logging user
LDAPSync โž” info Syncing user data
/usr/local/bin/node: symbol lookup error: /opt/Rocket.Chat/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE
rocketchat.service: main process exited, code=exited, status=127/n/a
Unit rocketchat.service entered failed state.
rocketchat.service failed.


Most helpful comment

downgrade bcrypt to 3.0.0 solved the problem

All 20 comments

I am experiencing the same thing after 0.73.2 upgrade, any luck figuring this out? Only logging in thru the form crashed it - I am not using LDAP, just built-in login

Update: I upgraded to NPM 6.4.1 and it works now

Mine version of NPM is 6.5.0

Try 6.4.1

6.4.1 didnt help in my case

Similar issue here. We don't use LDAP, crashes seem to occur around user administration.

I have the same issue. We use LDAP.

Is there a way to downgrade? When I tried spinning up the previous image, I got a Can't find migration version 137

Try to update your NodeJS. Mine worked after v8.11.4 update.

PS. ive had the same issue on non-ldap installation

Will do.
Also, found this: https://github.com/kelektiv/node.bcrypt.js/issues/656
I think perhaps this dependency update might have caused this issue: #12624 since bcrypt is updated from v2 to 3.

I had the same Problem, Update NodeJS using NVM to switch between the Versions :+1:

And the next one to try is getting your node more up to date.
The docker version runs node v8.11.4 so I'd take a look at that next.
FWIW docker also runs npm 5.6.0

downgrade bcrypt to 3.0.0 solved the problem

Yes thanks all. Upgrading to node v8.11.4 helped. But after upgrading I have another problem. After one day of usage server runs out of memory and I have to reboot rocketchat.

I also have this problem.... Any timeline on when you think this will be fixed?

Yes thanks all. Upgrading to node v8.11.4 helped. But after upgrading I have another problem. After one day of usage server runs out of memory and I have to reboot rocketchat.

How much memory do you have on your server?

I also have this problem.... Any timeline on when you think this will be fixed?

There is more than one issue here. Which one are you talking about ? Updating node (you can do that yourself if using CentOS/tar install) or running out of memory (how much have you got?)

Yes thanks all. Upgrading to node v8.11.4 helped. But after upgrading I have another problem. After one day of usage server runs out of memory and I have to reboot rocketchat.

How much memory do you have on your server?

Now its 3GB and 8VCPUs

For me, updating npm version from 5.5.1 to 6.7.0 resolved this issue.

After updating to 1.1.0 rocketchat crashes.
I updated npm to 6.9.0 and this didn't help
This is what I get: /usr/local/bin/node: symbol lookup error: /opt/Rocket.Chat/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE

https://github.com/RocketChat/Rocket.Chat/releases

Here are the recommended versions:

1.0.1 2019-04-28
Engine versions

Node: 8.11.4
NPM: 6.4.1
MongoDB: 3.2, 3.4, 3.6, 4.0
Was this page helpful?
0 / 5 - 0 ratings

Related issues

brendanheywood picture brendanheywood  ยท  3Comments

mddvul22 picture mddvul22  ยท  3Comments

ghost picture ghost  ยท  3Comments

amayer5125 picture amayer5125  ยท  3Comments

sta-szek picture sta-szek  ยท  3Comments