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

Bad Gateway issue after updating DocumentServer #197

Closed
ITMaya opened this Issue Nov 8, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@ITMaya
Copy link

ITMaya commented Nov 8, 2017

Hello,

Not sure if it's a bug or not, but for me it's an issue.
After updating to latest onlyoffice-documentserver5.0.3-41, we do have a Bad Gateway error while trying to access the welcome interface.

  1. Seen in Supervisor logs (/var/log/supervisor/supervisord.log), gc seems not to be able to enter RUNNING state:
    2017-11-08 12:19:42,285 INFO spawned: 'gc' with pid 31542
    2017-11-08 12:19:43,022 INFO exited: gc (exit status 1; not expected)
    2017-11-08 12:19:43,307 INFO gave up: gc entered FATAL state, too many start retries too quickly

  2. Nothing is currently listening on port 8000 where it should be.

  • From /var/log/onlyoffice/documentserver/docservice/err.log and same is logged in ../gc/err.log:

Error: Configuration property "forgottenfiles" is not defined
at Object.Config.get (/var/www/onlyoffice/documentserver/server/DocService/node_modules/config/lib/config.js:181:11)
at Object. (/var/www/onlyoffice/documentserver/server/DocService/sources/canvasservice.js:37:41)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/var/www/onlyoffice/documentserver/server/DocService/sources/DocsCoServer.js:35:23)
/var/www/onlyoffice/documentserver/server/DocService/node_modules/config/lib/config.js:181
throw new Error('Configuration property "' + property + '" is not defined');

  • From out.log, this goes in loop:
    [2017-11-08 12:33:18.203] [WARN] nodeJS - Express server starting...
    [2017-11-08 12:33:18.529] [WARN] nodeJS - worker 15249 died (code = 1; signal = null).
    [2017-11-08 12:33:18.531] [WARN] nodeJS - worker 15264 started.
    [2017-11-08 12:33:19.072] [WARN] nodeJS - Express server starting...
    [2017-11-08 12:33:19.415] [WARN] nodeJS - worker 15264 died (code = 1; signal = null).
    [2017-11-08 12:33:19.418] [WARN] nodeJS - worker 15276 started.
  1. Nginx will then failed to connect on localhost port 8000 which I guess is used for DocService.
    Seen in (/var/log/onlyoffice/documentserver/nginx.error.log):
    2017/11/08 11:56:28 [error] 25414#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 199.84.144.252, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "owncloud.mayahtt.com:444", referrer: "https://owncloud.mayahtt.com:444/welcome/"

It was working just fine before the upgrade. Moreover, I have a replica of this machine and I did the same update, but everything works fine on the other side. The only difference is when I did the upgrade on the machine where it works, I selected to replace configuration file using the ones from new version. I've removed OnlyOffice-DocumentServer completely and re-installed but same issue...

We are running it over SSL using a LetsEncrypt Certificate and default port is 444 instead of 443.

Onlyoffice-documentserver5.0.3-41
Ubuntu 14.04.5 LTS

Thanks in advance.
John

@ShockwaveNN

This comment has been minimized.

Copy link
Member

ShockwaveNN commented Nov 8, 2017

Try to backup your custom configs from /etc/onlyoffice/documentserver/, delete this folder and re-install onlyoffice-documentserver
Seems you selected keep old config while updating, but in old config there is not enough predefined options.

@ITMaya

This comment has been minimized.

Copy link
Author

ITMaya commented Nov 8, 2017

Thanks for your fast reply. I indeed select "keep old config" not to loose my settings, but I ended up having new configuration files anyway.

If I remove /etc/onlyoffice/documentserver/ directory, when trying to re-install I get the following error:
json: error: ENOENT: no such file or directory, open '/etc/onlyoffice/documentserver/default.json'

I'm installing straight from OnlyOffice repository.
Is there another way to force a complete re-install?

John

@ShockwaveNN

This comment has been minimized.

Copy link
Member

ShockwaveNN commented Nov 8, 2017

@ITMaya

I indeed select "keep old config"

you should manually merge old and new config. Which version your upgrading? If you upgrading from 4.x to 5.0.x - this is major version change. If not - it can be a bug.

json: error: ENOENT: no such file or directory

try to run sudo dpkg-reconfigure onlyoffice-documentserver

@ITMaya

This comment has been minimized.

Copy link
Author

ITMaya commented Nov 8, 2017

No luck :(

/usr/sbin/dpkg-reconfigure: onlyoffice-documentserver is broken or not fully installed
So I executed with --force but without /etc/onlyoffice/documentserver/ I also have the error:

Preparing for shutdown, it can take a lot of time, please wait...WARNING: NODE_ENV value of 'production-linux' did not match any deployment config file names.
json: error: ENOENT: no such file or directory, open '/etc/onlyoffice/documentserver/default.json'

I had the reconfigure completed when moving back ../documentserver/ but still no luck running OnlyOffice.

It was a minor version upgrade from 5.0.3-Something to 5.0.3-41. It looks like it doesn't let me do the re-install completely.

@ShockwaveNN

This comment has been minimized.

Copy link
Member

ShockwaveNN commented Nov 8, 2017

Ok, last option is try to purge (please backup all your user data), it will remove all our stuff
sudo apt purge onlyoffice-documentserver
sudo rm -rf /var/www/onlyoffice (cleanup all other stuff, not forget to backup)
sudo rm -rf /etc/onlyoffice/documentserver
sudo apt install onlyoffice-documentserver

5.0.3-Something to 5.0.3-41

So this may a bug after all, I look into it tomorrow

@ITMaya

This comment has been minimized.

Copy link
Author

ITMaya commented Nov 8, 2017

Thanks very much! I got it working again, I had to force re-installing to be able to purge since it was tagged as "half-installed" package.

I'll make sure we keep our old configuration files for next upgrade!

Thanks again.

@ShockwaveNN

This comment has been minimized.

Copy link
Member

ShockwaveNN commented Nov 8, 2017

@ITMaya You're welcome.
And I remember something - we never did a 5.0.x release before 5.0.3-41
So you was updating 4.x to 5.0 and this is a general practice to keep maintainer configuration files while performing major update.
So I thinkg there is no issue in upgrade process, so I'm closing it

@ShockwaveNN ShockwaveNN closed this Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.