kopano-search start up error
-
check the rights on var/run/kopano/server.sock
i’ll bet its root:root and your running kopano:kopano -
Everything in /var/run/kopano is kopano:kopano including server.sock and search.sock
Looking at the users I see:
[root@microserver ~]# kopano-cli --list-users User list for Default (4): User Full Name Homeserver Store ------------------------------------------------------------------------------------------------ SYSTEM SYSTEM Kopano 8962FFEFFB7B4D639BC5967C4BB58234 test1 test1 test1 Kopano 1300B1D4844B479DADEB761401E0479F test3 test3 test3 Kopano 8CFDBB16AAEE478590CFC17F1A09152D testusertestuser password123 Kopano 8E4FB4CF16CE4735B365234B55319634
I have only created 2, test1 and test3. Should the others (especially testusertestuser) be there?
-
Hi @nickh,
it’s been some time we discussed this topic. Did you solve your issue? If not, you might want to check if max_allowed_packet parameter in mysqld.cnf is increased as supposed in Kopano Wiki.
-
Unfortunately mine is already 32M.
-
@nickh, is your kopano-server connecting to the mysql-server via TCP or socket?
-
TCP on port 3308 (non-standard) and it is a MariaDB server.
-
@nickh, you could also try to connect to the database server via socket (i.e. in server.cfg: mysql_socket = /var/run/mysqld/mysqld.sock) if both are on the same machine. The combination of rising max_allowed_packet and using the mysql_socket solved the issue on my system (Ubuntu 18.04).
-
Brilliant. MariaDB is running in a sandbox on port 3308 and it means its socket file is different from standard (/var/lib/system-mysql/mysql.sock). That sorted it.
Thanks.
-
Hmm. It looks like it always happens if you stop/restart kopano-server while kopano-search is running. This means you have to stop kopano-search before stopping kopano-server and start it after starting kopano-server. This is not very workable.
Either the unit files need to be linked by dependencies or the two processes need to be run with a single command. It can be scripted but messy. For a condrestart you’d get something like:
#!/bin/sh set SEARCH-RESTART="" systemctl is-active kopano-search -q if [ $? -eq 0 ]; then systemctl stop kopano-search set SEARCH-RESTART='yes' fi systemctl condrestart kopano-server if [ -n "$SEARCH-RESTART" ]; then systemctl start kopano-search fi
A restart would be similar.
-
I always do it that way because if I stop kopano-server I always get errors in search.log like (I cut the long part)
MAPI.Struct.MAPIErrorNotFound: MAPI error 8004010F (MAPI_E_NOT_FOUND)
I did not find any recommendation in the docs but I think kopano-server should always be the last to be stopped and the first to be startet (even though kopano-server logs
[error ] Error while connecting to search on "file:///var/run/kopano/search.sock"
when kopano-search ist not running. Which is obvious ;-)