Try the fastest and simplest way to install ONLYOFFICE

502 Bad Gateway nginx after restart server

Issues during installation and related to database

502 Bad Gateway nginx after restart server

Postby nguyenhuylinha1 » Wed Nov 30, 2016 9:44 am

Hi all,

Please help me!

After installation of linux installation document server on Ubuntu 16.04 (I setup Ubuntu on VMWare 12),
then restart document server,
when I access the localhost it show "502 Bad Gateway".

I have just installation document server follow this link:
https://helpcenter.onlyoffice.com/serve ... ation.aspx
nguyenhuylinha1
 
Posts: 1
Joined: Wed Nov 30, 2016 9:37 am

Re: 502 Bad Gateway nginx after restart server

Postby Maxim » Wed Nov 30, 2016 12:38 pm

Hello!
Please find log and send us /var/log/onlyoffice/nginx.error.log.
Try to restart monoserice
Code: Select all
service monoserve restart
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: 502 Bad Gateway nginx after restart server

Postby nommaz » Mon Dec 19, 2016 12:05 pm

Have the same issue. The service meant to work on port 8000 on document server cannot start for some reason:

2016/12/19 12:01:21 [error] 341#341: *47 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.5.3, server: , request: "GET /FileUploader.ashx HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx
nommaz
 
Posts: 30
Joined: Thu Dec 08, 2016 6:46 am

Re: 502 Bad Gateway nginx after restart server

Postby Maxim » Wed Dec 21, 2016 1:24 pm

Hello!
Please use 80 port on Document Server. It doesn't work correctly on custom ports.
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: 502 Bad Gateway nginx after restart server

Postby TTownsend » Wed Jan 04, 2017 5:24 am

I've gotten this error also, but when trying to connect Document server to Community service in Integration >> Document Servers.

When I click on "Save" I receive this error: Storage url: The remote server returned an error: (502) Bad Gateway.

My nginx log shows: 2017/01/04 00:00:11 [error] 23379#23379: *7 connect() to unix:/var/run/onlyoffice/onlyoffice.socket failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /warmup1/StartUpSaaS.aspx HTTP/1.1", upstream: "fastcgi://unix:/var/run/onlyoffice/onlyoffice.socket:", host: "localhost"

Any ideas on this?

I'm very new to OnlyOffice and nginx, but I'm a decent techie and can follow instructions. ;-)
TTownsend
 
Posts: 12
Joined: Wed Jan 04, 2017 3:45 am

Re: 502 Bad Gateway nginx after restart server

Postby Maxim » Wed Jan 04, 2017 7:42 am

Hello TTownsend!
I suppose you have no connection between servers.
You should check:
1 Be sure that storage url is correct and have neccessary permission to save the file (maybe you should set 777 permissions)
2 80 and 443 ports must be opened and not busy
3 Maybe firewall stops connection
4 Learn here how saving files works

Please specify what OS you're using for servers, any details of OnlyOffice installation (docker or not), servers in local network or not.
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: 502 Bad Gateway nginx after restart server

Postby TTownsend » Mon Jan 09, 2017 1:47 am

Hi Maxim,

okay - in answer to you points:

1. What is the storage URL and what/which files should be 777?
2. Firewalls on both Community and Document servers are inactive - all ports are open.
80 and 443 should be open on which machines? Both?

When I do "netstat -ntlp | grep LISTEN" on both I get the following:

For Community server:
Code: Select all
root@openoffice:/# netstat -ntlp | grep LISTEN
tcp        0      0 0.0.0.0:5222            0.0.0.0:*               LISTEN      1407/mono
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      1411/mono
tcp        0      0 0.0.0.0:9865            0.0.0.0:*               LISTEN      1407/mono
tcp        0      0 0.0.0.0:9866            0.0.0.0:*               LISTEN      1414/mono
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1128/mysqld
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1264/redis-server 1
tcp        0      0 0.0.0.0:9871            0.0.0.0:*               LISTEN      1412/mono
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      1448/nginx -g daemo
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1448/nginx -g daemo
tcp        0      0 0.0.0.0:2200            0.0.0.0:*               LISTEN      1067/sshd
tcp        0      0 0.0.0.0:9882            0.0.0.0:*               LISTEN      1409/mono
tcp        0      0 0.0.0.0:5280            0.0.0.0:*               LISTEN      1407/mono
tcp        0      0 0.0.0.0:9888            0.0.0.0:*               LISTEN      1411/mono
tcp6       0      0 :::2200                 :::*                    LISTEN      1067/sshd
root@openoffice:/# ufw status verbose
Status: inactive

For Document server:

Code: Select all
root@openoffice:/# netstat -ntlp | grep LISTEN
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1226/redis-server 1
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1251/nginx -g daemo
tcp        0      0 0.0.0.0:2200            0.0.0.0:*               LISTEN      1110/sshd
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1260/postgres
tcp6       0      0 :::80                   :::*                    LISTEN      1251/nginx -g daemo
tcp6       0      0 :::2200                 :::*                    LISTEN      1110/sshd
tcp6       0      0 ::1:5432                :::*                    LISTEN      1260/postgres
root@openoffice:/# ufw status
Status: inactive


3. Firewalls on both servers are inactive - see above.

4. How saving works is interesting, but it does seem to suggest any causes of solutions for the behaviour I'm seeing.

My setup is built in 2 separate Ubuntu 16.06_64 hosts in separate VMs on a LAN. Docker was not used. IPs are unique.

I hope this helps...this is a very frustrating fix.

Cheers,
Trevor

EDIT: These are the errors that are returned in /var/log/onlyoffice/documentserver/nginx.error.log when trying to save the Document Storage Service Address as http://192.168.0.212/FileUploader.ashx
( following the example of https://<editors-dns-name>/FileUploader.ashx):

Code: Select all
root@openoffice:/var/log/onlyoffice/documentserver# tail -f nginx.error.log
2017/01/08 22:37:18 [error] 1316#1316: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.211, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=dxwp4vD_LgO1_A9do_8_&vkey=R1NVK3FqOGpGQTNqNGlLeENsZlVaUjFqUlpueU9qMG42NkdoVTU2d0FtQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODcxNylcLyIsImtleSI6ImR4d3A0dkRfTGdPMV9BOWRvXzhfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01 HTTP/1.1", upstream: "http://[::1]:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=dxwp4vD_LgO1_A9do_8_&vkey=R1NVK3FqOGpGQTNqNGlLeENsZlVaUjFqUlpueU9qMG42NkdoVTU2d0FtQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODcxNylcLyIsImtleSI6ImR4d3A0dkRfTGdPMV9BOWRvXzhfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01", host: "192.168.0.212"
2017/01/08 22:37:18 [error] 1316#1316: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.211, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=dxwp4vD_LgO1_A9do_8_&vkey=R1NVK3FqOGpGQTNqNGlLeENsZlVaUjFqUlpueU9qMG42NkdoVTU2d0FtQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODcxNylcLyIsImtleSI6ImR4d3A0dkRfTGdPMV9BOWRvXzhfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01 HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=dxwp4vD_LgO1_A9do_8_&vkey=R1NVK3FqOGpGQTNqNGlLeENsZlVaUjFqUlpueU9qMG42NkdoVTU2d0FtQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODcxNylcLyIsImtleSI6ImR4d3A0dkRfTGdPMV9BOWRvXzhfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01", host: "192.168.0.212"
2017/01/08 22:37:18 [error] 1316#1316: *17 no live upstreams while connecting to upstream, client: 192.168.0.211, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=cZ1t1zYyGuw0SABuL4E_&vkey=c2llRU5Wd3ViMExsYlJRbmp3UjFveUdBRGVJT1Z0ZWwwYUxDNjRvSnl1ST0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODgxOSlcLyIsImtleSI6ImNaMXQxell5R3V3MFNBQnVMNEVfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01 HTTP/1.1", upstream: "http://docservice/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=cZ1t1zYyGuw0SABuL4E_&vkey=c2llRU5Wd3ViMExsYlJRbmp3UjFveUdBRGVJT1Z0ZWwwYUxDNjRvSnl1ST0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODgxOSlcLyIsImtleSI6ImNaMXQxell5R3V3MFNBQnVMNEVfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01", host: "192.168.0.212"
2017/01/08 22:37:18 [error] 1316#1316: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.211, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=Z3jEI0N0fdhIzWGfPIk_&vkey=Rmt6cnYvZnVKVVNldkg5OUI2eGcyWVR0TXMvMm13N283M1FNVDhIR1dZdz0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODk2MSlcLyIsImtleSI6IlozakVJME4wZmRoSXpXR2ZQSWtfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01 HTTP/1.1", upstream: "http://[::1]:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=Z3jEI0N0fdhIzWGfPIk_&vkey=Rmt6cnYvZnVKVVNldkg5OUI2eGcyWVR0TXMvMm13N283M1FNVDhIR1dZdz0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODk2MSlcLyIsImtleSI6IlozakVJME4wZmRoSXpXR2ZQSWtfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01", host: "192.168.0.212"
2017/01/08 22:37:18 [error] 1316#1316: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.211, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=Z3jEI0N0fdhIzWGfPIk_&vkey=Rmt6cnYvZnVKVVNldkg5OUI2eGcyWVR0TXMvMm13N283M1FNVDhIR1dZdz0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODk2MSlcLyIsImtleSI6IlozakVJME4wZmRoSXpXR2ZQSWtfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01 HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=Z3jEI0N0fdhIzWGfPIk_&vkey=Rmt6cnYvZnVKVVNldkg5OUI2eGcyWVR0TXMvMm13N283M1FNVDhIR1dZdz0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4MzkzMzAzODk2MSlcLyIsImtleSI6IlozakVJME4wZmRoSXpXR2ZQSWtfIiwia2V5X2lkIjoiNjBmY2RhZjAtNzFjYi00MDg4LWE0NmEtYjA3OGVjYjVjZGVlIiwidXNlcl9jb3VudCI6Mn01", host: "192.168.0.212"
TTownsend
 
Posts: 12
Joined: Wed Jan 04, 2017 3:45 am

Re: 502 Bad Gateway nginx after restart server

Postby Maxim » Wed Jan 11, 2017 11:32 am

Hello TTownsend!
Have you found the problem? As i understand, you have 2 separate servers: one is for Community Server and the second one is for Document Server. If it's so what are the settings of "Document Service" (Document Service Location)? Describe in details please....
See here maybe it will help you.
Maxim
 
Posts: 1229
Joined: Tue Oct 11, 2016 2:34 pm

Re: 502 Bad Gateway nginx after restart server

Postby domcom » Mon Feb 20, 2017 1:13 pm

Hello TTownsend.

I'm encountering the exact same Problem "Storage url: The remote server returned an error: (502) Bad Gateway.", could you fix it?
I have two Server one for the Comunnity Server and one for the Documment Server.
I could imagen that something with the nginx permission is wrong but i can not find the problem.

The error Log on the Document Server looks like that:
Code: Select all
2017/02/20 14:12:10 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=B05AdIwJVeqgLcRUiAQ_&vkey=cERJWVJtTUoxZUZWWWxDQnpLNUhkazMzajJQU0ZFY3FhVEpNeWF1aUYrOD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDU2MClcLyIsImtleSI6IkIwNUFkSXdKVmVxZ0xjUlVpQVFfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://[::1]:8000/FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=B05AdIwJVeqgLcRUiAQ_&vkey=cERJWVJtTUoxZUZWWWxDQnpLNUhkazMzajJQU0ZFY3FhVEpNeWF1aUYrOD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDU2MClcLyIsImtleSI6IkIwNUFkSXdKVmVxZ0xjUlVpQVFfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:10 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=B05AdIwJVeqgLcRUiAQ_&vkey=cERJWVJtTUoxZUZWWWxDQnpLNUhkazMzajJQU0ZFY3FhVEpNeWF1aUYrOD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDU2MClcLyIsImtleSI6IkIwNUFkSXdKVmVxZ0xjUlVpQVFfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=B05AdIwJVeqgLcRUiAQ_&vkey=cERJWVJtTUoxZUZWWWxDQnpLNUhkazMzajJQU0ZFY3FhVEpNeWF1aUYrOD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDU2MClcLyIsImtleSI6IkIwNUFkSXdKVmVxZ0xjUlVpQVFfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:10 [error] 2094#2094: *22 no live upstreams while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=DHj8jDF0gNGTIfAIBI0_&vkey=UGR3MXR0WXQ5ZEw5QVNuVmxuZDdCZzRCaktMQlN5OHM0cHlBQkVYRk5zQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDY2MClcLyIsImtleSI6IkRIajhqREYwZ05HVElmQUlCSTBfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://docservice/FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=DHj8jDF0gNGTIfAIBI0_&vkey=UGR3MXR0WXQ5ZEw5QVNuVmxuZDdCZzRCaktMQlN5OHM0cHlBQkVYRk5zQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDY2MClcLyIsImtleSI6IkRIajhqREYwZ05HVElmQUlCSTBfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:10 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=8XGQjuUugl04niZkg4k_&vkey=QVN1TEdxU0hZRGtnL2crTWRuZzJWVm1FcnRsNW8ySFR3c3NuVnJHRGY5MD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDc0NylcLyIsImtleSI6IjhYR1FqdVV1Z2wwNG5pWmtnNGtfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://[::1]:8000/FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=8XGQjuUugl04niZkg4k_&vkey=QVN1TEdxU0hZRGtnL2crTWRuZzJWVm1FcnRsNW8ySFR3c3NuVnJHRGY5MD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDc0NylcLyIsImtleSI6IjhYR1FqdVV1Z2wwNG5pWmtnNGtfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:10 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=8XGQjuUugl04niZkg4k_&vkey=QVN1TEdxU0hZRGtnL2crTWRuZzJWVm1FcnRsNW8ySFR3c3NuVnJHRGY5MD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDc0NylcLyIsImtleSI6IjhYR1FqdVV1Z2wwNG5pWmtnNGtfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx%20?url=&outputtype=&filetype=&title=&key=8XGQjuUugl04niZkg4k_&vkey=QVN1TEdxU0hZRGtnL2crTWRuZzJWVm1FcnRsNW8ySFR3c3NuVnJHRGY5MD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMDc0NylcLyIsImtleSI6IjhYR1FqdVV1Z2wwNG5pWmtnNGtfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:13 [error] 2094#2094: *22 no live upstreams while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=fuTFstonf_LnRJyNhQI_&vkey=QU0xTzB0ZlNoMUh2TFVHNmw5TTA5MmhYNmpzWlhUTXFZRlZzT25idzRkMD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzg4OSlcLyIsImtleSI6ImZ1VEZzdG9uZl9MblJKeU5oUUlfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://docservice/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=fuTFstonf_LnRJyNhQI_&vkey=QU0xTzB0ZlNoMUh2TFVHNmw5TTA5MmhYNmpzWlhUTXFZRlZzT25idzRkMD0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzg4OSlcLyIsImtleSI6ImZ1VEZzdG9uZl9MblJKeU5oUUlfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:13 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=D_Gm1kLZXmSwi_mL99s_&vkey=REdhbmFKYlA5elVzOTM1MUxxemJzeDludS9OR1Zoc3pPSGlaT3hDZDlFTT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzk4NilcLyIsImtleSI6IkRfR20xa0xaWG1Td2lfbUw5OXNfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://[::1]:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=D_Gm1kLZXmSwi_mL99s_&vkey=REdhbmFKYlA5elVzOTM1MUxxemJzeDludS9OR1Zoc3pPSGlaT3hDZDlFTT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzk4NilcLyIsImtleSI6IkRfR20xa0xaWG1Td2lfbUw5OXNfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:13 [error] 2094#2094: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=D_Gm1kLZXmSwi_mL99s_&vkey=REdhbmFKYlA5elVzOTM1MUxxemJzeDludS9OR1Zoc3pPSGlaT3hDZDlFTT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzk4NilcLyIsImtleSI6IkRfR20xa0xaWG1Td2lfbUw5OXNfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://127.0.0.1:8000/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=D_Gm1kLZXmSwi_mL99s_&vkey=REdhbmFKYlA5elVzOTM1MUxxemJzeDludS9OR1Zoc3pPSGlaT3hDZDlFTT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzMzk4NilcLyIsImtleSI6IkRfR20xa0xaWG1Td2lfbUw5OXNfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42"
2017/02/20 14:12:14 [error] 2094#2094: *22 no live upstreams while connecting to upstream, client: 10.1.30.41, server: , request: "POST /FileUploader.ashx?url=&outputtype=&filetype=&title=&key=pPwgCEKBZ6bgRJJJxcQ_&vkey=c1kzeXFSUnFINDRmdENhNXRHZzNRS3RaN0U2dW1KYmhTK1daSnREU2lNQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzNDA4MilcLyIsImtleSI6InBQd2dDRUtCWjZiZ1JKSkp4Y1FfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01 HTTP/1.1", upstream: "http://docservice/FileUploader.ashx?url=&outputtype=&filetype=&title=&key=pPwgCEKBZ6bgRJJJxcQ_&vkey=c1kzeXFSUnFINDRmdENhNXRHZzNRS3RaN0U2dW1KYmhTK1daSnREU2lNQT0_eyJleHBpcmUiOiJcL0RhdGUoMTQ4NzU5NjMzNDA4MilcLyIsImtleSI6InBQd2dDRUtCWjZiZ1JKSkp4Y1FfIiwia2V5X2lkIjoiNjMyMDBhMmYtMDNhMy00NzYxLWE5N2MtMTJmZjM1NDc5OTc4IiwidXNlcl9jb3VudCI6MX01", host: "10.1.30.42
"

Greetings
Domcom
domcom
 
Posts: 7
Joined: Wed Feb 15, 2017 8:03 am

Re: 502 Bad Gateway nginx after restart server

Postby avataroff » Thu Mar 09, 2017 8:34 pm

POSSIBLE SOLUTION: (RE)START SUPERVISOR SERVICE ON DOCUMENT SERVER
Code: Select all
sudo service supervisor start
sudo systemctl enable supervisor


I was having the same problem, 502 error on the Document Server. I had done a clean install of both Document and Community Server on two machines running Ubuntu 16.04 using the Debian method. After install I used the Document Service Settings to link the servers. I was able to create and save documents. I rebooted the servers and got the 502 error on the document server, both when navigating to the IP address and when trying to change the settings in the Document Service section. So I created a new machine and installed the Document Server on it. When it was finished installing I ran:
Code: Select all
service --status-all
on both Document Servers and compared the service list. I noticed that Supervisor was running on the fresh install and not on the first machine. Starting the service fixed the problem. Apparently this service wasn't made persistent during install. Just run the code above and you should be good.
avataroff
 
Posts: 8
Joined: Thu Feb 02, 2017 5:09 pm

Next

Return to Installation issues

Who is online

Users browsing this forum: No registered users and 2 guests