Kopano don't start automatically on reboot

This weekend i did an upgrade from ucs 4.1.4 to 4.2.1. Since today kopano works again. I found, that it didn’t start automatically after reboot. As discribed in Kopano won’t start after upgrade to 4.2 i installed the defined version of mysql. After this ucs showed me an update für mysql which i installed too. Now i’m able to start kopano by kopano-server on the console. It seems, that kopano starts before mysql is up and running.

UCS 4.2-1 errata157

Kopano Core 8.3.1.32

systemctl status kopano-server.service
● kopano-server.service - Kopano Core Storage Server
   Loaded: loaded (/lib/systemd/system/kopano-server.service; enabled)
   Active: failed (Result: exit-code) since Mon 2017-09-04 14:52:23 CEST; 27min ago
     Docs: man:kopano-server(8)
           man:kopano-server.cfg(5)
           man:kopano-admin(8)
 Main PID: 2198 (code=exited, status=255)

server.log nach reboot

Mon Sep  4 15:24:59 2017: [ notice] Starting server version 8,3,1,35, pid 2234
Mon Sep  4 15:25:01 2017: [error  ] KDatabase::Connect(): database access error -2147483641, mysql error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Mon Sep  4 15:25:01 2017: [crit   ] Unable to connect to database: MYSQL not initialized
Mon Sep  4 15:25:01 2017: [ notice] Server shutdown complete.

apt-cache policy mysql-server
mysql-server:
  Installiert:           5.5.57-0.A~4.2.1.201708021657
  Installationskandidat: 5.5.57-0.A~4.2.1.201708021657
  Versionstabelle:
 *** 5.5.57-0.A~4.2.1.201708021657 0
        500 https://updates.software-univention.de/4.2/maintained/component/ 4.2-1-errata/all/ Packages
        100 /var/lib/dpkg/status
     5.5.57-0.33.201707311954 0
        500 https://updates.software-univention.de/4.1/maintained/component/ 4.1-4-errata/all/ Packages
     5.5.55-0.29.201705021645 0
        500 https://updates.software-univention.de/4.1/maintained/component/ 4.1-4-errata/all/ Packages
     5.5.54-0.A~4.2.0.201703071716 0
        500 https://updates.software-univention.de/4.2/maintained/ 4.2-0/all/ Packages
     5.5.54-0.27.201701251948 0
        500 https://updates.software-univention.de/4.1/maintained/component/ 4.1-4-errata/all/ Packages
     5.5.53-0.26.201611161616 0
        500 https://updates.software-univention.de/4.1/maintained/component/ 4.1-4-errata/all/ Packages
     5.5.52-0.25.201609281418 0
        500 https://updates.software-univention.de/4.1/maintained/ 4.1-4/all/ Packages
     5.5.46-0.17.201512141630 0
        500 https://updates.software-univention.de/4.1/maintained/ 4.1-1/all/ Packages
     5.5.46-0.16.201512141629 0
        500 https://updates.software-univention.de/4.0/maintained/ 4.0-5/all/ Packages
        500 https://updates.software-univention.de/4.0/maintained/component/ 4.0-4-errata/all/ Packages
     5.5.44-0.15.201508042121 0
        500 https://updates.software-univention.de/4.0/maintained/ 4.0-3/all/ Packages
     5.5.40-0.14.201502051002 0
        500 https://updates.software-univention.de/4.0/maintained/ 4.0-1/all/ Packages
     5.5.40-0.11.201411010605 0
        500 https://updates.software-univention.de/4.0/maintained/ 4.0-0/all/ Packages
       
https://help.univention.com/t/kopano-wont-start-after-upgrade-to-4-2/6097/11 durchgegangen - funktioniert noch nicht


kopano-server start

Now kopano core is up and running :slight_smile:

Is there a way to repair this problem ? Thanks for you help.

perhaps mysql starts too slow.
You could extend kopano-server.service and add this after After=network.target mysql.service mariadb.service:

Wants=mysql.service

verify this setting via systemctl show kopano-server

Tnx for reply. Can you tell me how to extend kopano-server.service ?

Hallo, ThorstenS,

i inserted the line to kopano-server.service as you suggested. After i restarted the server, kopano-server didn’t start automatically. Seemed to be the same as before.

here’s the output of systemctl show kopano-server:

root@srv01:~# systemctl show kopano-server
Type=simple
Restart=no
NotifyAccess=none
RestartUSec=100ms
Type=simple
Restart=no
NotifyAccess=none
RestartUSec=100ms
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min
WatchdogUSec=0
WatchdogTimestampMonotonic=0
StartLimitInterval=10000000
StartLimitBurst=5
StartLimitAction=none
FailureAction=none
PermissionsStartOnly=no
RootDirectoryStartOnly=no
RemainAfterExit=no
GuessMainPID=yes
MainPID=0
ControlPID=0
Result=exit-code
ExecMainStartTimestamp=Don 2017-09-07 12:43:37 CEST
ExecMainStartTimestampMonotonic=99401732
ExecMainExitTimestamp=Don 2017-09-07 12:43:39 CEST
ExecMainExitTimestampMonotonic=101427359
ExecMainPID=2277
ExecMainCode=1
ExecMainStatus=255
ExecStart={ path=/usr/sbin/kopano-server ; argv[]=/usr/sbin/kopano-server -F ; i
ExecReload={ path=/bin/kill ; argv[]=/bin/kill -HUP $MAINPID ; ignore_errors=no 
Slice=system.slice
CPUAccounting=no
CPUShares=18446744073709551615
StartupCPUShares=18446744073709551615
CPUQuotaPerSecUSec=(null)
BlockIOAccounting=no
BlockIOWeight=18446744073709551615
StartupBlockIOWeight=18446744073709551615
MemoryAccounting=no
MemoryLimit=18446744073709551615
DevicePolicy=auto
Environment=LC_ALL=C LANG=C
UMask=0022
LimitCPU=18446744073709551615
LimitFSIZE=18446744073709551615
LimitDATA=18446744073709551615
LimitSTACK=18446744073709551615
LimitCORE=18446744073709551615
LimitRSS=18446744073709551615
LimitNOFILE=4096
LimitAS=18446744073709551615
LimitNPROC=7368
LimitMEMLOCK=65536
LimitLOCKS=18446744073709551615
LimitSIGPENDING=7368
LimitMSGQUEUE=819200
LimitNICE=0
LimitRTPRIO=0
LimitRTTIME=18446744073709551615
OOMScoreAdjust=0
Nice=0
IOScheduling=0
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
TimerSlackNSec=50000
CPUSchedulingResetOnFork=no
NonBlocking=no
StandardInput=null
StandardOutput=journal
StandardError=inherit
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
SyslogPriority=30
SyslogLevelPrefix=yes
SecureBits=0
CapabilityBoundingSet=18446744073709551615
MountFlags=0
PrivateTmp=no
PrivateNetwork=no
PrivateDevices=no
ProtectHome=no
ProtectSystem=no
SameProcessGroup=no
IgnoreSIGPIPE=yes
NoNewPrivileges=no
SystemCallErrorNumber=0
RuntimeDirectoryMode=0755
KillMode=control-group
KillSignal=15
SendSIGKILL=yes
SendSIGHUP=no
Id=kopano-server.service
Names=kopano-server.service
Requires=basic.target
Wants=mysql.service system.slice
WantedBy=multi-user.target
Conflicts=shutdown.target
Before=shutdown.target multi-user.target
After=network.target mysql.service mariadb.service systemd-journald.socket basic
Documentation=man:kopano-server(8) man:kopano-server.cfg(5) man:kopano-admin(8)
Description=Kopano Core Storage Server
LoadState=loaded
ActiveState=failed
SubState=failed
FragmentPath=/lib/systemd/system/kopano-server.service
UnitFileState=enabled
InactiveExitTimestamp=Don 2017-09-07 12:43:37 CEST
InactiveExitTimestampMonotonic=99401832
ActiveEnterTimestamp=Don 2017-09-07 12:43:37 CEST
ActiveEnterTimestampMonotonic=99401832
ActiveExitTimestamp=Don 2017-09-07 12:43:39 CEST
ActiveExitTimestampMonotonic=101427844
InactiveEnterTimestamp=Don 2017-09-07 12:43:39 CEST
InactiveEnterTimestampMonotonic=101427844
CanStart=yes
CanStop=yes
CanReload=yes
CanIsolate=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=yes
OnFailureJobMode=replace
lines 101-123

Do you have another idea to solve the problem ?

oh, I’m sorry. Then I have no other idea for you. :grimacing:

Is there no one who can help me in this case ? :frowning: Just another idea ?

Mastodon