Bug 717968 - Zarafa doesn't work as user/group zarafa
Summary: Zarafa doesn't work as user/group zarafa
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: zarafa
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-30 14:48 UTC by Matěj Cepl
Modified: 2018-04-11 18:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-13 12:39:57 UTC


Attachments (Terms of Use)

Description Matěj Cepl 2011-06-30 14:48:07 UTC
When upgrading to EPEL Zarafa (zarafa-7.0.0-1.el6 on i686) from RPMs on zarafa.org I haven't got working system:

1) When starting services I got this error message:

[root@luther ~]# zarafa-restart 
Stopping zarafa-server:                                    [  OK  ]
Starting zarafa-server:                                    [  OK  ]
Stopping zarafa-spooler:                                   [  OK  ]
Starting zarafa-spooler: /usr/bin/zarafa-spooler: symbol lookup error: /usr/lib/libinetmapi.so.1: undefined symbol: _ZTIN5vmime10exceptions14sasl_exceptionE
                                                           [SELHALO]
Stopping zarafa-monitor:                                   [  OK  ]
Starting zarafa-monitor: Warning: Terminal locale not UTF-8, but UTF-8 locale is being forced.
         Screen output may not be correctly printed.
                                                           [  OK  ]
Stopping zarafa-gateway:                                   [  OK  ]
Starting zarafa-gateway: /usr/bin/zarafa-gateway: symbol lookup error: /usr/lib/libinetmapi.so.1: undefined symbol: _ZTIN5vmime10exceptions14sasl_exceptionE
                                                           [SELHALO]
Stopping zarafa-ical:                                      [  OK  ]
Starting zarafa-ical:                                      [  OK  ]

2) Also /var/log/zarafa/server.log ends with this backtrace:

Thu Jun 30 15:16:28 2011: Listening for pipe connections on /var/run/zarafa
Thu Jun 30 15:16:28 2011: Listening for TCP connections on port 236
Thu Jun 30 15:16:28 2011: Startup succeeded on pid 18515
Thu Jun 30 16:00:18 2011: Caught SIGABRT (6), out of memory or unhandled exception, traceback:
Thu Jun 30 16:00:18 2011: 0x000000080e2b57 /usr/bin/zarafa-server(_Z7sigsegvi+0xa7) [0x80e2b57]
Thu Jun 30 16:00:18 2011: 0x000000004b3400 [0x4b3400]
Thu Jun 30 16:00:18 2011: 0x000000004b3416 [0x4b3416]
Thu Jun 30 16:00:18 2011: 0x00000000cded71 /lib/libc.so.6(gsignal+0x51) [0xcded71]
Thu Jun 30 16:00:18 2011: 0x00000000ce064a /lib/libc.so.6(abort+0x17a) [0xce064a]
Thu Jun 30 16:00:18 2011: 0x00000000cd7df8 /lib/libc.so.6(__assert_fail+0xf8) [0xcd7df8]
Thu Jun 30 16:00:18 2011: 0x00000008210a43 /usr/bin/zarafa-server(_ZN16ECFileAttachment6CommitEv+0x183) [0x8210a43]
Thu Jun 30 16:00:18 2011: 0x00000008237f9b /usr/bin/zarafa-server(_Z16DeleteObjectHardP9ECSessionP10ECDatabaseP19ECAttachmentStoragejRSt4listI10DELETEITEMSaIS6_EEbS9_+0x16fb) [0x8237f9b]
Thu Jun 30 16:00:18 2011: 0x0000000823cd74 /usr/bin/zarafa-server(_Z13DeleteObjectsP9ECSessionP10ECDatabasePSt4listIjSaIjEEjjbb+0x204) [0x823cd74]
Thu Jun 30 16:00:18 2011: 0x0000000810b144 /usr/bin/zarafa-server(_Z15PurgeSoftDeleteP9ECSessionjPjS1_S1_+0x1514) [0x810b144]
Thu Jun 30 16:00:18 2011: 0x0000000810b886 /usr/bin/zarafa-server(_Z17SoftDeleteRemoverPv+0x1a6) [0x810b886]
Thu Jun 30 16:00:18 2011: 0x000000007d39e9 /lib/libpthread.so.0(+0x69e9) [0x7d39e9]
Thu Jun 30 16:00:18 2011: 0x00000000d920fe /lib/libc.so.6(clone+0x5e) [0xd920fe]
Thu Jun 30 16:00:18 2011: When reporting this traceback, please include Linux distribution name, system architecture and Zarafa version.

3) and no surprise that when accessing webmail, I got (but I guess this error message is almost meaningless and it is rather caused by the above disasters):

Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /etc/zarafa/webaccess/config.php on line 153
Not Found: PHP mapi extension not found
If you have upgraded zarafa, please restart Apache

Zarafa WebAccess can't start because of incompatible configuration.

Please correct above errors, a good start is by checking your '/etc/php.ini' file.

Or if you wish, you can disable this config check by editing the file '/usr/share/zarafa-webaccess/config.php', but this is not recommend.

Comment 1 Matěj Cepl 2011-06-30 20:39:20 UTC
OK, with the correct libvmime-0.9.2-0.1.20110626svn.el6.i686 and libical-0.43-5.1.el6.i686 I get zarafa running, but

a) whenever I want to change anything via IMAP I get this beauty:

Thu Jun 30 21:29:00 2011: [11320] IMAP Login from 192.168.1.3 for user matej
Thu Jun 30 21:29:00 2011: [11320] Pid 11320 caught SIGABRT (6), out of memory or unhandled exception, traceback:
Thu Jun 30 21:29:00 2011: [11320] 0x00000008052b27 /usr/bin/zarafa-gateway(_Z7sigsegvi+0x87) [0x8052b27]
Thu Jun 30 21:29:00 2011: [11320] 0x00000000523400 [0x523400]
Thu Jun 30 21:29:00 2011: [11320] 0x00000000523416 [0x523416]
Thu Jun 30 21:29:00 2011: [11320] 0x00000000906d71 /lib/libc.so.6(gsignal+0x51) [0x906d71]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000090864a /lib/libc.so.6(abort+0x17a) [0x90864a]
Thu Jun 30 21:29:00 2011: [11320] 0x000000008ffdf8 /lib/libc.so.6(__assert_fail+0xf8) [0x8ffdf8]
Thu Jun 30 21:29:00 2011: [11320] 0x000000063af8d1 /usr/lib/libzarafaclient.so(_ZN17WSMAPIPropStorage18HrUpdateSoapObjectEP10MAPIOBJECTP10saveObjectP15convert_context+0x1f1) [0x63af8d1]
Thu Jun 30 21:29:00 2011: [11320] 0x000000063af07b /usr/lib/libzarafaclient.so(_ZN17WSMAPIPropStorage12HrSaveObjectEjP10MAPIOBJECT+0x16b) [0x63af07b]
Thu Jun 30 21:29:00 2011: [11320] 0x000000063ae964 /usr/lib/libzarafaclient.so(_ZN17WSMAPIPropStorage14xECPropStorage12HrSaveObjectEjP10MAPIOBJECT+0x24) [0x63ae964]
Thu Jun 30 21:29:00 2011: [11320] 0x000000063a8c74 /usr/lib/libzarafaclient.so(_ZN13ECGenericProp11SaveChangesEj+0x1e4) [0x63a8c74]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000636fd34 /usr/lib/libzarafaclient.so(_ZN10ECMAPIProp11SaveChangesEj+0x84) [0x636fd34]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000637a88f /usr/lib/libzarafaclient.so(_ZN9ECMessage11SaveChangesEj+0x10f) [0x637a88f]
Thu Jun 30 21:29:00 2011: [11320] 0x000000063eaedb /usr/lib/libzarafaclient.so(_ZN21ECArchiveAwareMessage11SaveChangesEj+0x6b) [0x63eaedb]
Thu Jun 30 21:29:00 2011: [11320] 0x00000006373aa3 /usr/lib/libzarafaclient.so(_ZN9ECMessage8xMessage11SaveChangesEj+0x23) [0x6373aa3]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000806db34 /usr/bin/zarafa-gateway(_ZN4IMAP7HrStoreERKSt4listIjSaIjEESsSsPb+0x654) [0x806db34]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000807ee53 /usr/bin/zarafa-gateway(_ZN4IMAP10HrCmdStoreERKSsS1_S1_S1_b+0x323) [0x807ee53]
Thu Jun 30 21:29:00 2011: [11320] 0x00000008083131 /usr/bin/zarafa-gateway(_ZN4IMAP16HrProcessCommandERKSs+0x3471) [0x8083131]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000805426f /usr/bin/zarafa-gateway(_Z7HandlerPv+0x18f) [0x805426f]
Thu Jun 30 21:29:00 2011: [11320] 0x0000000808bb17 /usr/bin/zarafa-gateway(_Z18unix_fork_functionPFPvS_ES_iPi+0x97) [0x808bb17]
Thu Jun 30 21:29:00 2011: [11320] 0x00000008053efb /usr/bin/zarafa-gateway(_Z15running_servicePcS_+0x10cb) [0x8053efb]
Thu Jun 30 21:29:00 2011: [11320] 0x000000080552cf /usr/bin/zarafa-gateway(main+0x87f) [0x80552cf]
Thu Jun 30 21:29:00 2011: [11320] 0x000000008f2cc6 /lib/libc.so.6(__libc_start_main+0xe6) [0x8f2cc6]
Thu Jun 30 21:29:00 2011: [11320] 0x00000008052961 /usr/bin/zarafa-gateway() [0x8052961]
Thu Jun 30 21:29:00 2011: [11320] When reporting this traceback, please include Linux distribution name, system architecture and Zarafa version.

2) I am not able to deliver any message via zarafa-dagent
[root@luther zarafa]# formail -ds </var/mail/matej zarafa-dagent -v  matej
Mail will be delivered in Inbox
Rule rss2email doesn't match
Unable to commit message: 0x80040116
Unable to deliver message to 'matej', error code: 0x80040116


3) After some time the server crashes

Thu Jun 30 22:00:12 2011: Start to purge 20 messages
Thu Jun 30 22:00:14 2011: Caught SIGABRT (6), out of memory or unhandled exception, traceback:
Thu Jun 30 22:00:14 2011: 0x000000080e2b57 /usr/bin/zarafa-server(_Z7sigsegvi+0xa7) [0x80e2b57]
Thu Jun 30 22:00:14 2011: 0x00000000646400 [0x646400]
Thu Jun 30 22:00:14 2011: 0x00000000646416 [0x646416]
Thu Jun 30 22:00:14 2011: 0x00000008684d71 /lib/libc.so.6(gsignal+0x51) [0x8684d71]
Thu Jun 30 22:00:14 2011: 0x0000000868664a /lib/libc.so.6(abort+0x17a) [0x868664a]
Thu Jun 30 22:00:14 2011: 0x0000000867ddf8 /lib/libc.so.6(__assert_fail+0xf8) [0x867ddf8]
Thu Jun 30 22:00:14 2011: 0x00000008210a43 /usr/bin/zarafa-server(_ZN16ECFileAttachment6CommitEv+0x183) [0x8210a43]
Thu Jun 30 22:00:14 2011: 0x00000008237f9b /usr/bin/zarafa-server(_Z16DeleteObjectHardP9ECSessionP10ECDatabaseP19ECAttachmentStoragejRSt4listI10DELETEITEMSaIS6_EEbS9_+0x16fb) [0x8237f9b]
Thu Jun 30 22:00:14 2011: 0x0000000823cd74 /usr/bin/zarafa-server(_Z13DeleteObjectsP9ECSessionP10ECDatabasePSt4listIjSaIjEEjjbb+0x204) [0x823cd74]
Thu Jun 30 22:00:14 2011: 0x0000000810b144 /usr/bin/zarafa-server(_Z15PurgeSoftDeleteP9ECSessionjPjS1_S1_+0x1514) [0x810b144]
Thu Jun 30 22:00:14 2011: 0x0000000810b886 /usr/bin/zarafa-server(_Z17SoftDeleteRemoverPv+0x1a6) [0x810b886]
Thu Jun 30 22:00:14 2011: 0x000000004039e9 /lib/libpthread.so.0(+0x69e9) [0x4039e9]
Thu Jun 30 22:00:14 2011: 0x000000087380fe /lib/libc.so.6(clone+0x5e) [0x87380fe]
Thu Jun 30 22:00:14 2011: When reporting this traceback, please include Linux distribution name, system architecture and Zarafa version.
(END) 

---------------------------------------
I guess one of the problems might be change from zarafa.com rpms (run_as_user=root) to our ones (run_as_user=zarafa) ... I guess I may have still some rights/permissions/ownerships wrong. Any ideas?

Comment 2 Matěj Cepl 2011-06-30 21:32:53 UTC
OK, a step of progress:

the problem is when running as user/group zarafa. When I switched (very reluctantly; OTOH that was how zarafa.com RPMs worked) to run_as_{root,group}=root then suddenly everything works.

Comment 3 Matěj Cepl 2011-07-01 11:24:05 UTC
Dne 1.7.2011 02:51, Robert Scheck napsal(a):
> Edit /etc/zarafa/server.cfg and add "zarafa" to the list of allowed
> users.

If you mean local_admin_users than it was and it is of this value

local_admin_users       = root zarafa postfix

> Also ensure that the sockets in /var/run or /var/lib from Zarafa are
> e.g. removed after stopping Zarafa or chown'ed or so.

You mean /var/run/zarafa as in (from dagent.cfg and elsewhere)?

server_socket   =       file:///var/run/zarafa

What should be its ownership/permissions?

> Same likely applies to the /var/lib/zarafa directory itself or so.

??? I have dettached attachments there.

> I'll look into the other issues during the weekend. Maybe you found a
> bug, who knows?

However I have screwed up my configuration (and I can easily believe that it has been screwed up by running zarafa.com RPMs as root), any program has no business to crash.

Comment 4 Matěj Cepl 2011-07-01 21:57:56 UTC
When checking rights and ownerships according to this list

/var/run/zarafa* sockets should be root:root 666
/var/lib/zarafa/ should be zarafa:zarafa (recusively)
/var/log/zarafa/* should be zarafa:zarafa
and apache:apache (for /var/lib/zarafa-webaccess)

(and I have actually rm /var/run/zarafa* while zarafa was stopped)

then zarafa is running as user/group zarafa.

The only difference is that I have apparently before did only
chown zarafa:zarafa /var/lib/zarafa (not chown -R).

Wouldn't it be possible/adviseable to add to either %post, or /etc/init.d/zarafa-server, or somewhere else some checking that these rights/ownerships are correctly set?

Comment 5 Robert Scheck 2011-07-28 00:03:07 UTC
This issue is upstream Ticket#2011072810000011 for now. At first it is very
important that Zarafa itself fixes the issue that the server dies with proper
error messages, if there are lacking permissions. I'm also thinking about one
or the other chown/chmod in %post. I don't know whether it would be clever to
do this in the initscript, because systemd doesn't offer same flexibility as
the current shell script (initscript).

Comment 6 Robert Scheck 2011-07-29 20:17:13 UTC
I have sent a patch upstream which should solve point 3 of comment #1 (the
timezone warning) in a much better way then my hackish workaround is doing
at the moment. This patch has been also sent to Z-Push upstream.

Regarding Ticket#2011072810000011: The issue doesn't seem to be that easily
reproducible as thought. I will have to create a test case first.

Comment 7 Fedora Update System 2011-10-01 12:36:18 UTC
zarafa-7.0.2-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/zarafa-7.0.2-1.fc16

Comment 8 Fedora Update System 2011-10-01 12:36:53 UTC
zarafa-7.0.2-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/zarafa-7.0.2-1.fc15

Comment 9 Fedora Update System 2011-10-01 12:37:05 UTC
zarafa-7.0.2-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/zarafa-7.0.2-1.fc14

Comment 10 Fedora Update System 2011-10-01 12:37:08 UTC
zarafa-7.0.2-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/zarafa-7.0.2-1.el6

Comment 11 Fedora Update System 2011-10-01 12:37:12 UTC
zarafa-7.0.2-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/zarafa-7.0.2-1.el5

Comment 12 Fedora Update System 2011-10-24 22:57:24 UTC
zarafa-7.0.2-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-10-24 22:58:16 UTC
zarafa-7.0.2-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2011-10-25 03:32:58 UTC
zarafa-7.0.2-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2011-10-27 19:05:08 UTC
zarafa-7.0.2-1.el5, php53-mapi-7.0.2-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2011-10-27 19:06:51 UTC
zarafa-7.0.2-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Matěj Cepl 2011-12-13 12:39:57 UTC
Obviously zarafa (at least zarafa-7.0.3-1.el6.i686) works as zarafa user very well.


Note You need to log in before you can comment on or make changes to this bug.