Bug 250107 - akonadi server fails to start when home is in AFS
Summary: akonadi server fails to start when home is in AFS
Status: RESOLVED DUPLICATE of bug 179006
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 23:35 UTC by Dirk Heinrichs
Modified: 2010-11-09 23:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Heinrichs 2010-09-03 23:35:57 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

Since special files (incl. sockets) are not supported in AFS, mysql can't create a socket file, thus akonadi server can't connect to the database.


ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] search paths:  ("/sw/bin", "/afs/altum.de/home/heini/bin", "/bin", "/sbin", "/usr/local/bin", "/usr/local/sbin", "/usr/bin", "/usr/sbin", "/usr/X11R6/bin", "/usr/games", "/usr/NX/bin", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin")
[akonadiserver] Found mysql_install_db:  "/usr/bin/mysql_install_db"
[akonadiserver] Found mysql_upgrade:  "/usr/bin/mysql_upgrade"
"akonadiserver" [out] "Looking for 'mysql' as: /usr/bin/mysql
" 
"akonadiserver" [out] "Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
" 
"akonadiserver" [out] "Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--socket=/afs/altum.de/home/heini/.local/share/akonadi/db_misc/mysql.socket' 
" 
[akonadiserver] /usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/afs/altum.de/home/heini/.local/share/akonadi/db_misc/mysql.socket' (2) when trying to connect
[akonadiserver] FATAL ERROR: Upgrade failed
[akonadiserver] Database process exited unexpectedly during initial connection!
[akonadiserver] executable: "/usr/sbin/mysqld"
[akonadiserver] arguments: ("--defaults-file=/afs/altum.de/home/heini/.local/share/akonadi//mysql.conf", "--datadir", "/afs/altum.de/home/heini/.local/share/akonadi/db_data/", "--socket=/afs/altum.de/home/heini/.local/share/akonadi/db_misc/mysql.socket")
[akonadiserver] stdout: ""
[akonadiserver] stderr: ""
[akonadiserver] exit code: 1


Reproducible: Always

Steps to Reproduce:
Put user's home dir into AFS, run kontact (or anything that triggers akonadi).

Actual Results:  
akonadi server fails to start.

Expected Results:  
akonadi server should start.
Comment 1 Wolfgang Scheicher 2010-09-16 15:26:20 UTC
Same as or related to bugs 179006 , 182292 and 203460 .
( Don't mistake the closed bugs with a fix, they should be reopened imho )
I would really hope that the issue is given more priority, i can't stick to kde 3.5.x forever.
Comment 2 Dirk Heinrichs 2010-09-16 18:24:31 UTC
BTW: Because of this I've installed PostgreSQL on a central machine and pointed akonadi to this one. Unfortunately akonadi insists on starting a local server which also fails (because it's 1) not installed and 2) see above).
Comment 3 Tobias Koenig 2010-10-08 14:51:37 UTC
Hej,

this bug has been fixed recently in 4.5 branch and trunk.
You have to put the following section

[Connection]
SocketDirectory=/some/path/on/non-afs-share

into ~/.config/akonadi/akonadiserverrc and remove the 'Options' entry from the [MYSQL] section. Akonadi server must not be running during this change!

Ciao,
Tobias
Comment 4 Dirk Heinrichs 2010-10-09 08:40:49 UTC
Thanks a lot. But why not put it into /tmp/ksocket-<user>, where other kde related sockets are already stored, automatically? It shouldn't be the users responsibility to configure this (many users don't even know what a socket is, I guess).
Comment 5 Wolfgang Scheicher 2010-10-09 11:20:15 UTC
Because that is a kde thing, and akonadi can't rely on that.
However, /tmp/<somedir> is a good place, and i would like to see a automatic solution in the end.

It's really time to get a user-socket directory into the XDG Base Directory Specification.

Btw. - does that SocketDirectory option support some syntax so i can put the username as $VAR into it? because i intend to configure that one globally ...
How would the syntax look like then?
Comment 6 Dirk Heinrichs 2010-11-06 19:26:42 UTC
(In reply to comment #3)
> You have to put the following section
> 
> [Connection]
> SocketDirectory=/some/path/on/non-afs-share
> 
> into ~/.config/akonadi/akonadiserverrc and remove the 'Options' entry from 
> the [MYSQL] section. Akonadi server must not be running during this change!

Tried this with 4.5.3, doesn't work :(
Comment 7 Tobias Koenig 2010-11-09 23:36:14 UTC

*** This bug has been marked as a duplicate of bug 179006 ***