1

Topic: 502 Bad Gateway when trying to acces the settings page in sogo

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
====

When i try to acces the sogo settings page, from mydomain.dk/sogo/ i get a "502 Bad Gateway"

nginx log i see:

r: _, request: "GET /SOGo/so/test4@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test4@mi … references", host: "cmail.liveweb.dk", referrer: "https://mydomain.dk/SOGo/so/test4@midle … /Mail/view"
2015/11/01 23:20:14 [error] 1901#0: *608 upstream prematurely closed connection while reading response header from upstream, client: 83.137.127.198, server: _, request: "GET /SOGo/so/test4@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test4@mi … references", host: "cmail.liveweb.dk", referrer: "https://mydomain.dk/SOGo/so/test4@midle … /Mail/view"
2015/11/01 23:20:54 [error] 1901#0: *607 upstream prematurely closed connection while reading response header from upstream, client: 83.137.127.198, server: _, request: "GET /SOGo/so/test4@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test4@mi … references", host: "cmail.liveweb.dk", referrer: "https://mydomain.dk/SOGo/so/test4@midle … endar/view"
2015/11/01 23:23:48 [error] 1901#0: *808 upstream prematurely closed connection while reading response header from upstream, client: 83.137.127.198, server: _, request: "GET /SOGo/so/test4@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test4@mi … references", host: "cmail.liveweb.dk", referrer: "https://mydomain.dk/SOGo/so/test4@midle … /Mail/view"

any idea on what the problem is?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: 502 Bad Gateway when trying to acces the settings page in sogo

Any error in /var/log/sogo/sogo.log?

3

Re: 502 Bad Gateway when trying to acces the settings page in sogo

the log seems to be empty?

all other sogo functions seems to work.

4

Re: 502 Bad Gateway when trying to acces the settings page in sogo

SOGo will log many info in /var/log/sogo/sogo.log, if it's empty, please try to restart SOGo service and check again.

5

Re: 502 Bad Gateway when trying to acces the settings page in sogo

I now have this in my log:



Nov 02 08:09:00 sogod [9621]: [ERROR] <0x0x7f73b1667138[NGBundleManager]> could not create bundle for path: '/usr/share/GNUstep/Libraries/gnustep-base/Ve$
Nov 02 08:09:00 sogod [9621]: [WARN] <0x0x7f73aefbd2c0[WOxElemBuilder]> could not locate builders: WOxExtElemBuilder,WOxExtElemBuilder
Nov 02 08:09:00 sogod [9621]: cmail.liveweb.dk "GET /SOGo HTTP/1.0" 302 0/0 0.059 - - 1M
Nov 02 08:09:00 sogod [9621]: cmail.liveweb.dk "GET /SOGo/ HTTP/1.0" 200 4393/0 0.014 12742 65% 1M
Nov 02 08:09:07 sogod [9621]: SOGoRootPage successful login from 'cmail.liveweb.dk' for user 'test2@midlertidig.nu' - expire = -1  grace = -1
Nov 02 08:09:07 sogod [9621]: [WARN] <0x0x7f73b1b39ae8[SOGoWebDAVAclManager]> entry '{DAV:}write' already exists in DAV permissions table
Nov 02 08:09:07 sogod [9621]: [WARN] <0x0x7f73b1b39ae8[SOGoWebDAVAclManager]> entry '{DAV:}write-properties' already exists in DAV permissions table
Nov 02 08:09:07 sogod [9621]: [WARN] <0x0x7f73b1b39ae8[SOGoWebDAVAclManager]> entry '{DAV:}write-content' already exists in DAV permissions table
Nov 02 08:09:07 sogod [9621]: cmail.liveweb.dk "POST /SOGo/connect HTTP/1.0" 200 27/59 0.012 - - 12K
Nov 02 08:09:07 sogod [9621]: cmail.liveweb.dk "GET /SOGo/test2%40midlertidig.nu HTTP/1.0" 302 0/0 0.001 - - 0
Nov 02 08:09:07 sogod [9621]: cmail.liveweb.dk "GET /SOGo/test2%40midlertidig.nu/view HTTP/1.0" 302 0/0 0.002 - - 0
Nov 02 08:09:07 sogod [9621]: cmail.liveweb.dk "GET /SOGo/so/test2@midlertidig.nu/Mail HTTP/1.0" 302 0/0 0.001 - - 0
Nov 02 08:09:07 sogod [9621]: cmail.liveweb.dk "GET /SOGo/so/test2@midlertidig.nu/Mail/view HTTP/1.0" 200 14481/0 0.410 88486 83% 4M
Nov 02 08:09:08 sogod [9621]: cmail.liveweb.dk "POST /SOGo/so/test2@midlertidig.nu/Calendar/alarmslist?browserTime=1446469748 HTTP/1.0" 200 2/0 0.004 - -$
Nov 02 08:09:08 sogod [9621]: cmail.liveweb.dk "POST /SOGo/so/test2@midlertidig.nu/Mail/0/mailboxes HTTP/1.0" 200 571/0 0.245 - - 0
Nov 02 08:09:08 sogod [9361]: cmail.liveweb.dk "POST /SOGo/so/test2@midlertidig.nu/Mail/foldersState HTTP/1.0" 200 0/0 0.002 - - 0
Nov 02 08:09:09 sogod [9621]: cmail.liveweb.dk "POST /SOGo/so/test2@midlertidig.nu/Mail/0/folderINBOX/unseenCount HTTP/1.0" 200 15/0 0.245 - - 0
EXCEPTION: <NSException: 0x7f73b1ec2118> NAME:NSRangeException REASON:Index 21 is out of range 21 (in 'objectAtIndex:') INFO:{Array = ("Jubil\U00E6um", "$
Nov 02 08:09:11 sogod [2138]: <0x0x7f73b17eae28[WOWatchDogChild]> child 9621 exited
Nov 02 08:09:11 sogod [2138]: <0x0x7f73b17eae28[WOWatchDogChild]>  (terminated due to signal 6, coredump)
Nov 02 08:09:11 sogod [2138]: <0x0x7f73b189cf28[WOWatchDog]> child spawned with pid 4816

6

Re: 502 Bad Gateway when trying to acces the settings page in sogo

and the ngnix error log:

2015/11/02 14:09:10 [error] 1901#0: *2079 upstream prematurely closed connection while reading response header from upstream, client: 131.165.106.2, server: _, request: "GET /SOGo/so/test2@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test2@mi … references", host: "cmail.liveweb.dk", referrer: "https://cmail.liveweb.dk/SOGo/so/test2@ … /Mail/view"
2015/11/02 14:09:11 [error] 1901#0: *2079 open() "/var/www/favicon.ico" failed (2: No such file or directory), client: 131.165.106.2, server: _, request: "GET /favicon.ico HTTP/1.1", host: "cmail.liveweb.dk", referrer: "https://cmail.liveweb.dk/SOGo/so/test2@ … references"

7

Re: 502 Bad Gateway when trying to acces the settings page in sogo

Did you change any SOGo settings in /etc/sogo/sogo.conf?

8

Re: 502 Bad Gateway when trying to acces the settings page in sogo

No, i  havent touched any of those settings. only did a few aditions to the postfix config.

9

Re: 502 Bad Gateway when trying to acces the settings page in sogo

I cannot find obvious error, any other error message in /var/log/sogo/sogo.log? If no other log, i'm afraid that you have to ask in SOGo mailing list instead.

10

Re: 502 Bad Gateway when trying to acces the settings page in sogo

Fair enough. There is nothing in sogo.conf the only thing i can find a error in, that apears each time i try and enter the settings part in sogo web interface is the nginx log. it says:

2015/11/03 08:49:48 [error] 1901#0: *3357 upstream prematurely closed connection while reading response header from upstream, client: 131.165.106.2, server: _, request: "GET /SOGo/so/test4@midlertidig.nu/preferences HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/so/test4@mi … references", host: "cmail.liveweb.dk", referrer: "https://cmail.liveweb.dk/SOGo/so/test4@ … /Mail/view"

11

Re: 502 Bad Gateway when trying to acces the settings page in sogo

Sorry, no idea at all.

I suggest turn on debug mode in /etc/sogo/sogo.conf with below parameter, if still no detailed error log, you have to ask support in SOGo mailing list instead. sorry about this, but it's a programming issue, not a sys admin issue.

    SOGoDebugRequests = YES;

12

Re: 502 Bad Gateway when trying to acces the settings page in sogo

the debug option dosent make anything output to the log file.

I think its a timeout isue in ngninx, i can see some others have had the same isue, i will try and look more into it, and if i find a solution post it here.

Thank for taking your time.