1

Topic: Separate SOGo Instance for EAS

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Centos 7.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes - Version 3.7
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I would like to create a second instance of SOGO to handle EAS clients.   I've found documentation for this process at https://sogo.nu/support/faq/dedicated-s … sync.html.   I thought I had seen docs specific to the iRedMail installed SOGo somewhere on iredmail.org, but I can't locate this.   Does this document exist?

The docs hosted at sogo.nu appear to apply to the iRedMail install, except for step 8 under the RedHat section.   This step changes the ProxyPass config for the /Microsoft-Server-ActiveSync URL.   Within the SOGo.conf file referenced by the document the ProxyPass option is commented in my install.   Does iRedMail have this ProxyPass option defined elsewhere?   I can't find this option uncommented in any of the config files.

Thanks,
Bob

2

Re: Separate SOGo Instance for EAS

It appears the documentation I referenced in my last post assumes SOGo is running with Apache (note the ProxyPass option).   As I wandered around the iRed installation I realized SOGo is running within Nginx.   

The config file referenced in step 8 above is located at /etc/nginx/templates/sogo.tmpl.   The syntax is slightly different than Apache, but it's easy to spot the port number which needs to be changed.

This still doesn't create a working config.   The sogod-eas service created by the documentation refuses to start.   The log shows the following:

Sep 04 15:08:00 sogod [10545]: version 4.0.8 (build root@shiva2.inverse 201908170130) -- starting
Sep 04 15:08:00 sogod [10545]: vmem size check enabled: shutting down app when vmem > 500 MB. Currently at 333 MB
Sep 04 15:08:00 sogod [10545]: <0x0x5638a6f5f5a0[SOGoProductLoader]> SOGo products loaded from '/usr/lib64/GNUstep/SOGo':
Sep 04 15:08:00 sogod [10545]: <0x0x5638a6f5f5a0[SOGoProductLoader]>   AdministrationUI.SOGo, Appointments.SOGo, CommonUI.SOGo, Contacts.SOGo, ContactsUI.SOGo, MailPartViewers.SOGo, Mailer.SOGo, MailerUI.SOGo, MainUI.SOGo, PreferencesUI.SOGo, SchedulerUI.SOGo, ActiveSync.SOGo
Sep 04 15:08:00 sogod [10545]: All products loaded - current memory usage at 378 MB
Sep 04 15:08:00 sogod [10545]: [WARN] <0x0x5638a705b0a0[WOWatchDog]> listening socket: attempt 1 failed
Sep 04 15:08:01 sogod [10545]: [WARN] <0x0x5638a705b0a0[WOWatchDog]> listening socket: attempt 2 failed
Sep 04 15:08:02 sogod [10545]: [WARN] <0x0x5638a705b0a0[WOWatchDog]> listening socket: attempt 3 failed
Sep 04 15:08:03 sogod [10545]: [WARN] <0x0x5638a705b0a0[WOWatchDog]> listening socket: attempt 4 failed
Sep 04 15:08:04 sogod [10545]: [WARN] <0x0x5638a705b0a0[WOWatchDog]> listening socket: attempt 5 failed
Sep 04 15:08:05 sogod [10545]: [ERROR] <0x0x5638a705b0a0[WOWatchDog]> unable to listen on specified port, check that no other process is already using it

I have a feeling sogod is reading /etc/sogo/sogo.conf and attempting to listen on port 20000.   So far I haven't found an option to override the WOPort option from that file or just use an alternate config file.   

Bob

3

Re: Separate SOGo Instance for EAS

It appears there are two ways to fix this problem.   I fixed it by assigning the sogod port numbers via the service files.

Method 1 - Set port numbers in service files:
1) Edit /etc/sogo/sogo.conf and remove (or comment) the WOPort option.
2) Edit /usr/lib/systemd/system/sogod.service and add -WOPort 127.0.0.1:20000 to the options specified in the ExecStart line.   For example:
ExecStart=/usr/sbin/sogod -WOPort 127.0.0.1:20000 -WOWorkersCount ${PREFORK} -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
3) Edit /usr/lib/systemd/system/sogod-eas.service and make changes similar to those made to the sogod.service.   Specify port 30000 instead of 20000.

This process worked for me.

Method 2 - Change plist file:
It appears the syntax for the plist file has changed.   The text present within the SOGo document is no longer correct.   The following should work:
<?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN"
      "http://www.gnustep.org/plist-0_9.xml">
      <plist version="0.9">
<dict>
<key>WOPort</key>
<string>30000</string>
</dict>
</plist>

4

Re: Separate SOGo Instance for EAS

Thanks for sharing.
We used separated sogo instance for EAS in one cluster setup before, but abandoned this (separate EAS instance) setup. The point is enough memory.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: Separate SOGo Instance for EAS

I wasn't able to get it working by adding ram.   I started with 16gb and increased to to 32gb with no noticeable improvement.   I asked on the sogo.nu mailing list and was told by a someone from Inverse.ca that the separate instance was the fix.   Seems to be working so far.   

The problem seems to be the ActiveSync users.   When I initially encountered the problems our students had just arrived for our fall semester.   When we hit about 400 ActiveSync users serious performance problems resulted, even with kernel parameter and sogo config changes.   When we got to 600 ActiveSync users the system was unusable.   Without a reboot about once an hour the system didn't work.

After the change to two instances performance has been much better.   I've just checked... we now have nearly 900 ActiveSync devices connecting.

Bob

6

Re: Separate SOGo Instance for EAS

Nice work, thanks for sharing. smile

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee