Error 502 Bad Gateway NGINX - Community-server

Issues during installation and related to database
Post Reply
OggyParx
Posts: 4
Joined: Mon Mar 09, 2020 1:39 am

Error 502 Bad Gateway NGINX - Community-server

Post by OggyParx » Mon Mar 09, 2020 2:07 am

Hi all,

I have installed OnlyOffice Community-server, Document-server and Nextcloud on the same server.

My configuration :

Intel i7, 8Go RAM and Ubuntu 18.04 server - NGINX and PHP7.3-fpm

Nextcloud and OnlyOffice Document-server work perfectly.

When I call my OnlyOffice URL (www or localhost), I have sometimes this response of the NGINX server : 502 Bad Gateway - NGINX. This is not everytime.

Here is my nginx log :

Code: Select all

2020/03/09 02:12:53 [crit] 7375#7375: *1 connect() to unix:/var/run/onlyoffice/onlyoffice.socket failed (2: No such file or directory) while connecting to upstream, client: [MY_IP_ADRESS], server: [MY_URL_SERVER], request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/ /var/run/onlyoffice/onlyoffice.socket:", host: "[MY_LOCAL_URL_SERVER]", referrer: "[MY_URL_SERVER]"
Please, have you got any ideas to fix it ?

Thanks

Alexandre
Posts: 109
Joined: Thu Dec 12, 2019 11:08 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by Alexandre » Thu Mar 12, 2020 12:04 pm

Hello OggyParx.
Please note, we strongly recommend to install ONLYOFFICE and Nextcloud service on separate servers to avoid configuration and port conflicts.
Please provide us some additional information:
1. Type of ONLYOFFICE installation (docker, deb/rpm, exe).
2. Version of ONLYOFFICE components installed. Version of Nextcloud.
3. How you performed installation, send me also the link to the guide you used.

OggyParx
Posts: 4
Joined: Mon Mar 09, 2020 1:39 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by OggyParx » Thu Mar 12, 2020 10:34 pm

Hi @Alexandre, (sorry for my english)

Thanks for your answer.
you are right.

I installed OnlyOffice and Nextcloud on the same server. I think too, that create some conflicts (listen on the same port [80]).

Here is the versions packages (.deb not docker)
OnlyOffice 10.5.2.10.48
Nextcloud 18

I installed NGINX, MYSQL and PHP7.3-fpm with necessary extensions.

Here is the link for the topic of OnlyOffice10.

I searched the net how to run two applications on the same server. It was possible to do this with NGINX reverse proxy but I've not enough experience to do this. I need some help. Can you help me ?

My plan:

cloud.mydomain.com for nextcloud
community.mydomain.com for community
The sub-domains arrives on the same server.
The NGINX web server must send client requests to the correct server block (but I don't know how do it)

Thanks for your help.

Carl
Posts: 353
Joined: Thu Apr 12, 2018 10:00 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by Carl » Mon Mar 16, 2020 9:21 am

Hello OggyParx,

We don't have ready config examples for nginx as a proxy in front of the Community Server.

I would still recommend you to take a clean server and install the Community Server there. This way you will get a working product out of the box.

OggyParx
Posts: 4
Joined: Mon Mar 09, 2020 1:39 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by OggyParx » Mon Mar 16, 2020 1:29 pm

Hi all,

I reinstalled onlyoffice on my emptied server.

Finally, my choice fell on a docker installation. With this, I can easily install the onlyoffice community, document and mail and nextcloud simply with two commands.

I just have to be careful to choose the right port for the Nextcloud application to insert in the installation command.

Even if I managed to install everything in .dev (much more complicated), there were still bugs with the Community-Server.

Thanks for your help.

Alexandre
Posts: 109
Joined: Thu Dec 12, 2019 11:08 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by Alexandre » Thu Mar 19, 2020 3:24 pm

Please specify, what do you mean by ‘install in .dev’? Am I right that you solved issue after separate installation via Docker?

OggyParx
Posts: 4
Joined: Mon Mar 09, 2020 1:39 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by OggyParx » Fri Mar 27, 2020 7:30 am

Hi @alexandre,

Yes, I previously installed all the software packages in .dev and not via docker. Today, I install everything via docker and docker-compose. I'm learning it day by day.

My current installation is as follows:

Installation of two Nginx containers in proxy-reverse and Let's Encrypt
Installation of the three containers Onlyoffice Community, Document and Nextcloud.

No more 502 errors because the ports are well managed via the Nginx container.

I would not say that this is resolved since when I installed all the software packages in .dev, I had an error 502.

So yes, resolved via docker installation but not in .dev.

But I discovered docker and it's really excellent.

Thanks for your help.

Maciej_C
Posts: 4
Joined: Sun Dec 22, 2019 11:21 am

Re: Error 502 Bad Gateway NGINX - Community-server

Post by Maciej_C » Sat May 09, 2020 6:53 pm

I found the same about OnlyOffice. Better way is to use docker version. I also found second thing about 502 errors. If I try to use slow storeage (hdd instead of ssd) I got 502. The same virtual machine on ssd and everything running very smooth.

Regards.
Regards Maciej.

Post Reply