SOGo does not update WOWorkersCount

NethServer Version: 7.9
Module: SOGo 5.8.4

As I mentioned in the topic, my SOGo does not update the number of WOWorkersCount. Seems like it does not read the template (10 default, tried from 5 to 40) and start always with 3 Workers.

This happened (I’m not sure) after a SOGo upgrade from 5.7. Every Time I try to reconfigure the number of Workers, I get an error and the service does not restart. I have to restart it manually, but it start with 3 again.
Even if i change it with config setprop and do a signal-event nehtserver-sogo-update, it keeps ignoring the value, no errors, but service stops.
Strange behaviour: if I change the MemoryLimit, the change is applied. I still have to start the service manually. Only Workers changes are not recognized.

This is the error I get when I use the web dashboard:

[root@posta ~]#  echo '{"action":"configuration","status":"enabled","ActiveSync":"enabled","Dav":"enabled","webAccess":"public","AdminUsers":"admin","VirtualHost":"","WOWorkersCount":"9","SOGoInternalSyncInterval":"30","Notifications":"EMail,Appointment","MailAuxiliaryUserAccountsEnabled":"YES"}' | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-sogo/update | jq
{
  "steps": 10,
  "pid": 12897,
  "args": "",
  "event": "nethserver-sogo-update"
}
{
  "step": 1,
  "pid": 12897,
  "action": "S00initialize-default-databases",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.10",
  "time": "0.160729",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 1,
  "pid": 12897,
  "action": "S00initialize-default-databases"
}
{
  "step": 2,
  "pid": 12897,
  "action": "S05generic_template_expand",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.20",
  "time": "0.104368",
  "exit": 256,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 2,
  "pid": 12897,
  "action": "S05generic_template_expand"
}
{
  "step": 3,
  "pid": 12897,
  "action": "S10nethserver-sogo-mysqlsetup",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.30",
  "time": "0.00876",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 3,
  "pid": 12897,
  "action": "S10nethserver-sogo-mysqlsetup"
}
{
  "step": 4,
  "pid": 12897,
  "action": "S20nethserver-sogo-gnustepsetup",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.40",
  "time": "0.002433",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 4,
  "pid": 12897,
  "action": "S20nethserver-sogo-gnustepsetup"
}
{
  "step": 5,
  "pid": 12897,
  "action": "S30nethserver-sogo-MigrationV3.2.10ToV4.0.0",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.50",
  "time": "0.199446",
  "exit": 256,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 5,
  "pid": 12897,
  "action": "S30nethserver-sogo-MigrationV3.2.10ToV4.0.0"
}
{
  "step": 6,
  "pid": 12897,
  "action": "S31nethserver-sogo-MigrationV5.3.0ToV5.6.0",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.60",
  "time": "0.018806",
  "exit": 256,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 6,
  "pid": 12897,
  "action": "S31nethserver-sogo-MigrationV5.3.0ToV5.6.0"
}
{
  "step": 7,
  "pid": 12897,
  "action": "S40nethserver-sogo-create-selfHost",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.70",
  "time": "2.360487",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 7,
  "pid": 12897,
  "action": "S40nethserver-sogo-create-selfHost"
}
{
  "step": 8,
  "pid": 12897,
  "action": "S50nethserver-sogo-disable-webtop-activesync",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.80",
  "time": "0.057107",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 8,
  "pid": 12897,
  "action": "S50nethserver-sogo-disable-webtop-activesync"
}
{
  "step": 9,
  "pid": 12897,
  "action": "S60nethserver-sogo-remove-slice-messages",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "0.90",
  "time": "0.003333",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 9,
  "pid": 12897,
  "action": "S60nethserver-sogo-remove-slice-messages"
}
{
  "step": 10,
  "pid": 12897,
  "action": "S90adjust-services",
  "event": "nethserver-sogo-update",
  "state": "running"
}
{
  "progress": "1.00",
  "time": "1.299811",
  "exit": 0,
  "event": "nethserver-sogo-update",
  "state": "done",
  "step": 10,
  "pid": 12897,
  "action": "S90adjust-services"
}
{
  "pid": 12897,
  "status": "failed",
  "event": "nethserver-sogo-update"
}
{
  "type": "EventError",
  "id": 1694423293,
  "message": "update_action_failed"
}

systemctl status sogod

● sogod.service - SOGo is a groupware server
   Loaded: loaded (/usr/lib/systemd/system/sogod.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-09-11 11:22:17 CEST; 3s ago
  Process: 20013 ExecStart=/usr/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log (code=exited, status=0/SUCCESS)
 Main PID: 20014 (sogod)
   CGroup: /system.slice/sogod.service
           ├─20014 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─20015 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─20016 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           └─20017 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log

Sep 11 11:22:17 posta.servicesas.it systemd[1]: Starting SOGo is a groupware server...
Sep 11 11:22:17 posta.servicesas.it systemd[1]: Can't open PID file /var/run/sogo/sogo.pid (yet?) after start: No such file or directory
Sep 11 11:22:17 posta.servicesas.it systemd[1]: Started SOGo is a groupware server.

config show sogod

sogod=service
    ActiveSync=enabled
    AdminUsers=admin
    BackupTime=30 0
    Certificate=
    CustomEmailField=userPrincipalName
    Dav=enabled
    DraftsFolder=Drafts
    MailAuxiliaryUserAccountsEnabled=YES
    Notifications=EMail,Appointment
    SOGoInternalSyncInterval=30
    SOGoMaximumPingInterval=3540
    SOGoMaximumSyncInterval=3540
    SOGoMaximumSyncResponseSize=2048
    SOGoMaximumSyncWindowSize=100
    SentFolder=Sent
    SessionDuration=1440
    SxVMemLimit=1024
    TrashFolder=Trash
    VirtualHost=
    WOWatchDogRequestTimeout=60
    WOWorkersCount=9
    status=enabled
    webAccess=public

after a few minutes I restarted the service, I get WOWatchDog error in the logs and Outlook clients stops receving mail:

Sep 11 11:46:46 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:47 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:48 sogod [20014]: [WARN] <0x0x55d79fac8f70[WOWatchDogChild]> pid 20016 has been hanging in the same request for 12 minutes
Sep 11 11:46:48 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:50 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:51 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:52 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:53 sogod [20015]: <0x0x55d79fa255a0[SOGoActiveSyncDispatcher]> Sleeping 30 seconds while detecting changes for user marco in Ping...
Sep 11 11:46:54 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:54 sogod [20016]: <0x0x55d79f846220[SOGoActiveSyncDispatcher]> Sleeping 30 seconds while detecting changes for user carolina in Ping...
Sep 11 11:46:55 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:56 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:57 sogod [20014]: [WARN] <0x0x55d79fae1ae0[WOWatchDogChild]> pid 20017 has been hanging in the same request for 8 minutes
Sep 11 11:46:57 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!
Sep 11 11:46:59 sogod [20014]: [ERROR] <0x0x55d79faefea0[WOWatchDog]> No child available to handle incoming request!

Any idea why sogo ignores the template?

Simone

I found something more.

Looking at sogo.service, I found it use informations in /etc/sysconfig/sogo to start the Workers.

My files was broken:

# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
$^Z<9c><92>m<85>Îmo<93>LÒDüÜ<98>%gÏ?wêÁÅ·^Yø^VîùovH0õÉa<87>5£Ú*î Ø<92>ÃÌlÍ<9b><9b>S

I changed manually to try if it was the problem:

# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
PREFORK=9
USER=sogo

And now the status report number correctly.

● sogod.service - SOGo is a groupware server
   Loaded: loaded (/usr/lib/systemd/system/sogod.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-09-11 12:23:08 CEST; 2s ago
  Process: 27434 ExecStart=/usr/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log (code=exited, status=0/SUCCESS)
 Main PID: 27436 (sogod)
   CGroup: /system.slice/sogod.service
           ├─27436 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27437 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27438 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27439 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27440 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27441 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27442 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27443 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─27444 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           └─27445 /usr/sbin/sogod -WOWorkersCount 9 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log

Sep 11 12:23:08 posta.servicesas.it systemd[1]: Stopped SOGo is a groupware server.
Sep 11 12:23:08 posta.servicesas.it systemd[1]: Starting SOGo is a groupware server...
Sep 11 12:23:08 posta.servicesas.it systemd[1]: Can't open PID file /var/run/sogo/sogo.pid (yet?) after start: No such file or directory
Sep 11 12:23:08 posta.servicesas.it systemd[1]: Started SOGo is a groupware server.

But if I try to reconfigure the workers, from dashboard or via terminal, that file break again.

Simone

what is the output of config show sogod before and after you configure from the UI

this is the template, really simple

[root@mirror ~]# cat /etc/e-smith/templates/etc/sysconfig/sogo/10base 
PREFORK={($sogod{'WOWorkersCount'} || "3")}
USER=sogo

output of config show sogod before:

[root@posta sogo]# config show sogod
sogod=service
   ActiveSync=enabled
   AdminUsers=admin
   BackupTime=30 0
   Certificate=
   CustomEmailField=userPrincipalName
   Dav=enabled
   DraftsFolder=Drafts
   MailAuxiliaryUserAccountsEnabled=YES
   Notifications=EMail,Appointment
   SOGoInternalSyncInterval=30
   SOGoMaximumPingInterval=3540
   SOGoMaximumSyncInterval=3540
   SOGoMaximumSyncResponseSize=2048
   SOGoMaximumSyncWindowSize=100
   SentFolder=Sent
   SessionDuration=1440
   SxVMemLimit=1024
   TrashFolder=Trash
   VirtualHost=
   WOWatchDogRequestTimeout=60
   WOWorkersCount=9
   status=enabled
   webAccess=public

and output of config show sogod after:

[root@posta sogo]# config show sogod
sogod=service
    ActiveSync=enabled
    AdminUsers=admin
    BackupTime=30 0
    Certificate=
    CustomEmailField=userPrincipalName
    Dav=enabled
    DraftsFolder=Drafts
    MailAuxiliaryUserAccountsEnabled=YES
    Notifications=EMail,Appointment
    SOGoInternalSyncInterval=30
    SOGoMaximumPingInterval=3540
    SOGoMaximumSyncInterval=3540
    SOGoMaximumSyncResponseSize=2048
    SOGoMaximumSyncWindowSize=100
    SentFolder=Sent
    SessionDuration=1440
    SxVMemLimit=1024
    TrashFolder=Trash
    VirtualHost=
    WOWatchDogRequestTimeout=60
    WOWorkersCount=10
    status=enabled
    webAccess=public

and the file is broken again:

[root@posta sogo]# cat /etc/sysconfig/sogo
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
$▒▒m▒▒mo▒L▒D▒▒;▒%g▒?w▒▒ŷ▒▒▒ovH0▒▒a▒5▒▒*▒ؒ▒▒l͛▒S[root@posta sogo]#

and the service starts (manually) with 3 workers:

[root@posta sogo]# systemctl status sogod
● sogod.service - SOGo is a groupware server
   Loaded: loaded (/usr/lib/systemd/system/sogod.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-09-11 14:44:06 CEST; 8s ago
  Process: 21845 ExecStart=/usr/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log (code=exited, status=0/SUCCESS)
 Main PID: 21846 (sogod)
   CGroup: /system.slice/sogod.service
           ├─21846 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─21847 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           ├─21848 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
           └─21849 /usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log

Sep 11 14:44:06 posta.servicesas.it systemd[1]: Starting SOGo is a groupware server...
Sep 11 14:44:06 posta.servicesas.it systemd[1]: Can't open PID file /var/run/sogo/sogo.pid (yet?) after start: No such file or directory
Sep 11 14:44:06 posta.servicesas.it systemd[1]: Started SOGo is a groupware server.

This is my /etc/e-smith/templates/etc/sysconfig/sogo/10base template:

[root@posta sogo]# cat /etc/e-smith/templates/etc/sysconfig/sogo/10base
$▒▒m▒▒mo▒L▒D▒▒;▒%g▒?w▒▒ŷ▒▒▒ovH0▒▒a▒5▒▒*▒ؒ▒▒l͛▒S[root@posta sogo]# 

Changed to the one you mentioned, now I still got the error in GUI and have to start the service manually, but at least now it consider the new Workers.

Simone

you could trigger the event to expand and restart the service

signal-event nethserver-sogo-update

wtf is occuring :smiley:

1 Like