Author Topic: SOGo logins successfully and goes back to the login screen  (Read 9707 times)

AleSanchez

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +2/-0
    • View Profile
SOGo logins successfully and goes back to the login screen
« on: November 20, 2018, 12:34:59 am »
Hi all!

I'm a happy user of Zentyal Servers.
This is my first mail server implementation over Zentyal. Fresh Install over Ubuntu 18.04 via apt, running on DigitalOcean. Everything is working fine, but SOGo.

When you try to login, it shows the welcome message, It redirect the browser to the main page (I suppose)  and then sends me back to the login screen.

Nov 19 20:21:58 sogod [31994]: SOGoRootPage successful login from '190.17.161.42' for user 'asanchez@eurovips.com' - expire = -1  grace = -1
Nov 19 20:21:58 sogod [31994]: 190.17.161.42 "POST /SOGo/connect HTTP/1.1" 200 54/77 0.164 - - 0
Nov 19 20:21:59 sogod [31994]: 190.17.161.42 "GET /SOGo/so/asanchez@eurovips.com HTTP/1.1" 200 8500/0 0.016 27563 69% 0

Any help would be appreciated.

Thank you.

poot

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #1 on: January 17, 2019, 05:31:44 pm »
I'm having this same issue, the problem seems to have started when I changed the name of the domain. Anyone else having this issue? Any thoughts from support?

freeware

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #2 on: February 03, 2019, 01:07:45 pm »
Yes, at me. After login drop back to login page.

KarlMCS

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +2/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #3 on: September 23, 2019, 06:55:34 pm »
Same problem on a fresh install of Zentyal 6.  Login is successful but then just reloads the login page.  All packages and modules are up to date.  SOGo logs don't say anything except that the login was successful, no errors.  I got it to load one time by rebooting the server and simultaneously clearing the browser cache, but I have not been able to get it to log in again...

Did you ever find a fix?

doncamilo

  • Zen Samurai
  • ****
  • Posts: 478
  • Karma: +165/-1
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #4 on: September 24, 2019, 01:53:49 pm »
 :)

I have found this document related with this topic:

https://users.sogo.narkive.com/yY5YaFMq/sogo-won-t-load-pages-after-loginl

Let me know if this fixed your issues please!

Cheers!
- Do my pigeons bother you passing over your land?
- They block the sun!

G. Guareschi., Don Camillo.,

AleSanchez

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +2/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #5 on: January 30, 2024, 10:12:21 pm »
Five years later and having forgotten that I had this problem before, I googled and found my own post.

This does not have to do with Zentyal but with Apache. In the SOGo documentation says clearly that you have to configure this in the Apache configuration:

Code: [Select]
RequestHeader set "x-webobjects-server-port" "80"
RequestHeader set "x-webobjects-server-name" "yourhostname"
RequestHeader set "x-webobjects-server-url" "http://yourhostname"

Match your hostname or fixed IP if you are in a testing server.
 

wilaya28

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #6 on: May 27, 2024, 03:33:08 pm »
Same problem on a fresh install of Zentyal 8

Siroco

  • Zentyal Staff
  • Zen Apprentice
  • *****
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #7 on: June 17, 2024, 12:29:08 pm »
Hi,
I have not been able to reproduce the error you got on a fresh installation.
I recommend you to open an issue on GitHub detailing the problem for the developers to review.
https://github.com/zentyal/zentyal/issues
Regards.

aehimself

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #8 on: August 02, 2024, 08:05:32 pm »
Have the same issue on Zentyal 8.0.3, fresh install, not even alive yet.
I have a feeling that this has something to do with accessing SOGo from different subnets...

For the time being not even the workaround from AleSanchez works, only a reboot... and only for a limited amount of time.

Siroco

  • Zentyal Staff
  • Zen Apprentice
  • *****
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #9 on: August 07, 2024, 12:59:34 pm »
Hi,

Could you explain how you reproduced the error?

I have a feeling that this has something to do with accessing SOGo from different subnets...

What do you mean?

I recommend you to open an issue on GitHub detailing the problem for the developers to review.

https://github.com/zentyal/zentyal/issues

Regards.

aehimself

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #10 on: August 09, 2024, 06:39:14 pm »
Reproduction was quite easy... Install SOGo and use it :) One day it decided to throw successful logons back to the login page without any trace of errors whatsoever.

As for the subnet comment it can be disregarded... I went on vacation and used a VPN (external, not running on Zentyal) to access the server and the issue occurred immediately. After restarting the server like 2 days in row fixed it and now I can access SOGo through VPN as well. What I thought initially is that accessing it from the VPNs subnet causes it to bug, but it was only a coincidence.

aehimself

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #11 on: October 13, 2024, 12:05:34 pm »
Fyi, I raised a GitHub issue about this.

In the mean time let me ask - what browser did you use when you encountered the endless login loop? On the same PC, Firefox failed to log in while Chromium was successful. Firefox and Chrome were able to log in from a handheld device.

I tried to empty SOGo sessions with sudo -u sogo /usr/sbin/sogo-tool expire-sessions 1 but the login loop remained.

aehimself

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #12 on: October 16, 2024, 11:42:14 pm »
I think the issue is with how Zentyal handles its default Apache configuration AND a long-lasting SOGo oversight. Let me explain.

In /usr/share/zentyal/stubs/sogo/SOGo.conf-apache.mas the following is set:

  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST


However, if HTTP mode is enabled, SOGo still can be accessed on port 80, which won't work due to the header mismatch.

Where SOGo fails is giving us a normal error message, as mentioned here: https://www.mail-archive.com/users@sogo.nu/msg29727.html

Once I forced HTTPS-mode only in Apache in /usr/share/zentyal/stubs/webserver/default.mas by adding

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}


my seemingly stuck sessions magically started to work. As the issue came and went I don't want to say anything just yet but I finally feel like making progress... I'll return later with a verdict.

If I am right, as a solution Zentyal either should enforce SSL to SOGo in Apache (preferred) or use %{HTTP_PORT} as x-webobjects-server-port header value in the default SOGo Apache config.

aehimself

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: SOGo logins successfully and goes back to the login screen
« Reply #13 on: October 20, 2024, 05:31:09 pm »
A possible solution to this is to make SOGo functioning on both HTTP and HTTPS. To achieve this, edit /etc/zentyal/stubs/sogo/SOGo.conf-apache.mas and change the following two declarations:

  # Old: RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-port" "%{HTTP_PORT}e" env=HTTP_PORT

  # Old: RequestHeader set "x-webobjects-server-url" "https://%{REQUEST_HOST}e:443"
  RequestHeader set "x-webobjects-server-url" "%{REQUEST_SCHEME}e://%{REQUEST_HOST}e" env=REQUEST_SCHEME,REQUEST_HOST


Important, as I mentioned in the GitHub ticket: I only checked SOGo access; I did not confirm any other (e.g. ActiveSync or calendar ICS sharing) functionality.