Skip to content
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

RocketChat 0.73.0 won't start #13042

Closed
immanuelfodor opened this issue Dec 28, 2018 · 6 comments · Fixed by #13045
Closed

RocketChat 0.73.0 won't start #13042

immanuelfodor opened this issue Dec 28, 2018 · 6 comments · Fixed by #13045

Comments

@immanuelfodor
Copy link

Description:

After upgrading the server from 0.72.1 to 0.73.0, it won't start and an exception is printed to syslog. Restoring the folder to the backup is running again fine.

Steps to reproduce:

Acting as root:

systemctl stop rocketchat
systemctl status rocketchat

cd ~
curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tgz
ls -la
tar zxvf rocket.chat.tgz
rm rocket.chat.tgz

systemctl status mongod

rm -rf Rocket.Chat-bak
mv Rocket.Chat Rocket.Chat-bak
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ~

systemctl start rocketchat
systemctl status rocketchat
journalctl -xef
# error is printed after a while and so server won't start

Expected behavior:

0.73.0 starts up fine without errors.

Actual behavior:

An error is printed to syslog and 0.73.0 won't start up, server inaccessible from Android app, etc.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.73.0
  • Operating System: Ubuntu Linux Server
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: none
  • NodeJS Version: 8.11.4
  • MongoDB Version: MongoDB shell/db version v4.0.5, git version: 3739429dd92b92d1b0ab120911a23d50bf03c412

Additional context

Service file:

cat /etc/systemd/system/rocketchat.service

[Unit]
Description=RocketChat Server
After=network.target remote-fs.target nss-lookup.target mongod.target

[Service]
ExecStart=/usr/local/n/versions/node/8.11.4/bin/node /root/Rocket.Chat/main.js
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=nodejs-rocketchat
Environment=NODE_ENV=production PORT=3000 ROOT_URL=https://domain.tld MONGO_URL=mongodb://XXX:YYY@localhost:27017/rocketchat

[Install]
WantedBy=multi-user.target

Restored previous version from bak, restarted service, and 0.72.1 works fine again:

rm -rf Rocket.Chat
mv Rocket.Chat-bak Rocket.Chat
systemctl start rocketchat
systemctl status rocketchat
journalctl -xef
# 0.72.1 starts up fine as expected, no error printed

Relevant logs:

SERVER 0.73.0

...
Dec 28 06:01:29 x nodejs-rocketchat[8028]: rocketchat:lib ➔ oauth_updated Accounts_OAuth_Wordpress_authorize_path                        
Dec 28 06:01:29 x nodejs-rocketchat[8028]: rocketchat:lib ➔ oauth_updated Accounts_OAuth_Wordpress_scope                                 
Dec 28 06:01:29 x nodejs-rocketchat[8028]: rocketchat:lib ➔ oauth_updated Accounts_OAuth_Wordpress_callback_url                          
Dec 28 06:01:29 x nodejs-rocketchat[8028]: Using GridFS for custom sounds storage                                                        
Dec 28 06:01:29 x nodejs-rocketchat[8028]: Using GridFS for custom emoji storage                                                        
Dec 28 06:01:29 x nodejs-rocketchat[8028]: Exception in callback of async function: Error: Unable to resolve "~" in path                 
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at new RocketChatFile.FileSystem (packages/rocketchat:file/server/file.server.js:150:11)  
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at packages/rocketchat:importer/server/startup/store.js:16:33                             
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at Function.time (/root/Rocket.Chat/programs/server/profile.js:309:28)                    
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at /root/Rocket.Chat/programs/server/boot.js:427:13                                       
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at /root/Rocket.Chat/programs/server/boot.js:472:5                                        
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at Function.run (/root/Rocket.Chat/programs/server/profile.js:510:12)                     
Dec 28 06:01:29 x nodejs-rocketchat[8028]:     at /root/Rocket.Chat/programs/server/boot.js:470:11                                       
Dec 28 06:01:29 x nodejs-rocketchat[8028]: CROWD ➔ info Disabling CROWD Background Sync                                                  
Dec 28 06:01:30 x nodejs-rocketchat[8028]: CAS ➔ info Disabling CAS login servic

And it stops here without any further progress.

SERVER 0.72.1

After restoring from backup, this version works fine just as before:

...
]: ➔ +-----------------------------------------------------+              
]: ➔ |                    SERVER RUNNING                   |              
]: ➔ +-----------------------------------------------------+              
]: ➔ |                                                     |              
]: ➔ |  Rocket.Chat Version: 0.72.1                        |              
]: ➔ |       NodeJS Version: 8.11.4 - x64                  |              
]: ➔ |             Platform: linux                         |              
]: ➔ |         Process Port: 3000                          |              
]: ➔ |             Site URL: https://domain.tld            |              
]: ➔ |     ReplicaSet OpLog: Disabled                      |              
]: ➔ |          Commit Hash: 490679a709                    |              
]: ➔ |        Commit Branch: HEAD                          |              
]: ➔ |                                                     |              
]: ➔ +-----------------------------------------------------+

BROWSER

None, server won't start on 0.73.0.

@immanuelfodor
Copy link
Author

immanuelfodor commented Dec 28, 2018

Refs Release 0.73.0 (PR #13040, issue #13015)

@immanuelfodor
Copy link
Author

I guess the problem lies somewhere here in this relatively new file (7 days ago): https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-importer/server/startup/store.js
I have no ~/uploads folder (never had).

@immanuelfodor
Copy link
Author

And when running from systemd as a service, there are no such env variables present (I guess):
https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-file/server/file.server.js#L146

@Pitstopper
Copy link

@immanuelfodor same problem

@sampaiodiego
Copy link
Member

thanks @immanuelfodor for the very detailed report.. I'll work on a fix for this ASAP

@immanuelfodor
Copy link
Author

Thanks @sampaiodiego it's now working fine after the update to 0.73.1 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants