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

Error when trying to connect 502 [reason phrase] Bad Gateway #258

Open
adamgdynia opened this issue May 6, 2019 · 15 comments
Open

Error when trying to connect 502 [reason phrase] Bad Gateway #258

adamgdynia opened this issue May 6, 2019 · 15 comments

Comments

@adamgdynia
Copy link

Hi! I can see a lot of threads about this problem, but neither is related to "Bad Gateway" connection problem.

Briefly: I have installed 10.0.1.867 One Office via Docker on Ubuntu 18 Server. I wanted to connect it to OwnCloud 10.0.4 with connector installed from Market. These are two separate machines.

One Office works great, OwnCloud as well, but when trying to connect One Office to Owncloud I get: Error when trying to connect (Server error response [url] https://192.168.30.6/healthcheck [status code] 502 [reason phrase] Bad Gateway).

When I try to go to the address https://192.168.30.6/healthcheck it is confirmed - a Bad Gateway.

Do you have any idea how to fix? If you want me to provide any logs, please write!
Thanks,
Adam

@alexanderonlyoffice
Copy link

Hello @adamkasprzak, please send me a link of installation guide you used to install ONLYOFFICE. Version 10.0.1 is related to the Community Server, current version of Document Server is 5.2.8.

Send me a screenshot of sudo docker ps command output from the terminal.

Please note that if you are using Community Edition (Community Server with Document Server) you should specify the addess http://portal_ip_address/ds-vpath/ or https://domain_name/ds-vpath/

@DirkED
Copy link

DirkED commented Jun 19, 2019

Is there any update here? I have no docker installation, but the same issue: There is a redirect for healthcheck in nginx but there is no service at localhost:9810. So either their is no healthcheck at all or any program is not running. But I have no idea, which one is missing :-/
I have Document Server 5.3.1-26 and Community Server 10.0.1.897 on debian stretch. Do I really need both?

@gacott
Copy link

gacott commented Jul 18, 2019

I have the exact same issue, Debian install, 502 bad gateway domain/healthcheck. Would really love to hear how to fix this.

@DirkED
Copy link

DirkED commented Jul 19, 2019

I did not find the real solution, so I decided to simply remove the healthcheck in the NextCloud app.
So I commented in
/var/www/nextcloud/apps/onlyoffice/controller/settingscontroller.php

these lines

249 /*$healthcheckResponse = $documentService->HealthcheckReques 249 t();
250 * &if (!$healthcheckResponse) {
251 *
252 }*/

Additionally I had to adjust
/etc/nginx/includes/onlyoffice-communityserver-proxy-to-documentserver.conf
and replaced
proxy_pass {{DOCUMENT_SERVER_HOST_ADDR}};
by
proxy_pass http://127.0.0.1:80;

Now it seems to work. At least until the next update of the OnlyOffice-App in Nextcloud.

One problem still was the use of supervisor with sysv-rc: The restart command only stopped the supervisord, the line to start the daemon again missed.

@alexanderonlyoffice
Copy link

alexanderonlyoffice commented Jul 19, 2019

Hello @DirkED, @gacott, we need to know if you installed the Document Server as stand alone or as a Community Edition pack, which includes Community Server and Document Server configured automatically, because in this case Community Server works as proxy and uses virtual path for redirecting requests to the Document Server. If you have Community Edition installed, you need to add /ds-vpath/ to the address of the Document Server indicated in ownCloud.

If you installed Document Server separately, please check the accessibility of ownCloud server and server with Document Server to each other using wget command. wget https://owncloud_address from the machine with DS and wget https://documentserver_address from the machine with OC.

@DirkED
Copy link

DirkED commented Jul 19, 2019

Hi Alexander,
im completely unsure if I need both, documentserver and communityserver, but I installed both in order to use it with OnlyOffice-App in Nextcloud. This App does a healtcheck and the nginx configuration onlyoffice-communityserver-services.conf file says for this healtcheck:

location /healthcheck {
rewrite /healthcheck(.*) /$1 break;
proxy_pass http://localhost:9810;
....

But there is no service running on port 9810 and I did not find any hint, what this service should do at all...

BTW: Both servers, documentserver and communityserver are running on one system...

Do you have any idea?

@gacott
Copy link

gacott commented Jul 19, 2019

Hello, @alexanderonlyoffice I have installed as is instructed from here: https://www.howtoforge.com/how-to-install-onlyoffice-100-on-ubuntu-1804-lts/ only using Debian 9. It sounds like @DirkED has done something similar. I think that's where people are getting confused, as there seems to be two different install types.

@alexanderonlyoffice
Copy link

Hello @gacott, yes, you have installed Community Edition. Please try to enter the address https://portal_address/ds-vpath/ in browser. If you can reach Document Server Welcome page using this address, please type it in on ONLYOFFICE integration app address settings page in ownCloud.

@gacott
Copy link

gacott commented Jul 19, 2019

Thanks @alexanderonlyoffice, it displays a 502 Bad Gateway error as well.

@alexanderonlyoffice
Copy link

@gacott, please send me a screenshot of ONLYOFFICE integration app settings page. Please specify the installation type of Community Edition, docker or deb packages. Send me also a screenshot of Welcome page of Document Server.

Please send me also logs of Document Server and log of ownCloud to [email protected] with a note "for technical support". Logs can be found in folder /app/onlyoffice/DocumentServer/logs/documentserver/ for docker and in folder /var/log/onlyoffice/documentserver/logs for package installation.

Try to check the accessibility of Document Server and ownCloud to each other. Use wget command: wget https://owncloud_address from inside the container with Document Server (if it is docker installation; execute the command on the host, if it is deb installation) and wget https://portal_address/ds-vpath/ from the machine with ownCloud.

@gacott
Copy link

gacott commented Jul 19, 2019

@alexanderonlyoffice everything is Debian 9, on two separate machines, and I am using nextcloud, not owncloud. This https://portal_address/ds-vpath/ isn't going to work from anywhere, it's a bad gateway. Other than that the two machines see one another fine. I'll get the email together with all of the details and send shortly, thanks.

@alexanderonlyoffice
Copy link

Hello @gacott, I tried to install the product with the installation guide you sent, unfortunately, the installation failed for some reason.

I would recommend you to install the stand alone Document Server using our official installation guide under this link. Instruction how to integrate Document Server with Nextcloud can be found in our API documentation here.

@gacott
Copy link

gacott commented Jul 22, 2019

@alexanderonlyoffice I have been messing with this all weekend. I moved to Centos and followed the instructions there for community server, with is what I really need. https://helpcenter.onlyoffice.com/server/linux/community/linux-installation-centos.aspx The instructions there are really incomplete, for instance, Elasticsearch, you have to install a java jre for that to even install. Anyway, I finally get everything installed without errors or dependency issues. The only problem, nothing is coming up in the browser, how do I troubleshoot what went wrong? Looks like all services started:

Restarting services...
monoserve.service
monoserveApiSystem.service
nginx.service
onlyofficeRadicale.service
onlyofficeSocketIO.service
onlyofficeThumb.service
onlyofficeUrlShorter.service
onlyofficeBackup.service
onlyofficeFeed.service
onlyofficeJabber.service
onlyofficeIndex.service
onlyofficeNotify.service
onlyofficeMailAggregator.service
onlyofficeMailWatchdog.service
onlyofficeMailCleaner.service
onlyofficeRadicale.service
onlyofficeStorageMigrate.service
OK

@marshalleq
Copy link

marshalleq commented Jun 30, 2022

Just adding a general note that I have been grappling with this for about 3 years. It works fine then one day it stops with an update. Then one day it starts again and today it has stopped again. Made all the more frustrating by the absolutely abysmal performance of help.nextcloud.com servers which seem to never be fixed and blamed on everything else. Anyway, this note was really just to say that I wouldn't be surprised if it's something changing in the onlyoffice code, rather than the nextcloud code.

@skvili
Copy link

skvili commented Oct 9, 2023

I am so tired of handmadecrafts-constructs that someone else wants money for

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

No branches or pull requests

6 participants