ubuntu serve - cyrus fails to start

lowpass zijn.digital at gmail.com
Tue Apr 28 21:55:07 EDT 2015


I backed up:
/etc/imapd.conf
/etc/cyrus.conf
/etc/default/cyrus-imapd

and ...

# apt-get install cyrus-common-2.4 cyrus-imapd-2.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libzephyr4
Suggested packages:
  cyrus-pop3d-2.4 cyrus-murder-2.4 cyrus-replication-2.4 cyrus-nntpd-2.4
  cyrus-caldav-2.4 cyrus-doc-2.4 apt-listchanges
The following NEW packages will be installed:
  cyrus-common-2.4 cyrus-imapd-2.4 libzephyr4
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,781 kB of archives.
After this operation, 43.7 MB of additional disk space will be used.

And everything is just fine now. Spooky.

Bron: after you mentioned creating the dirs in a script before cyrus starts
up i remembered there's an "init-helper" script at /usr/lib/cyrus/bin that
includes that functionality. It was while looking at that that i realised i
was missing an armload of scripts, then also some binaries. Weird, weird
day.

And thanks for the replies! I guess i should apologise for the noise. I
realise this may seem all "dog ate my homework" but i swear i haven't the
faintest idea what happened. If you hear about anyone else having
mysterious deinstalls like that do let me know.

On Tue, Apr 28, 2015 at 9:31 PM, lowpass <zijn.digital at gmail.com> wrote:

> I had done an upgrade of some packages. I listed those at the end of my
> first message. I don't think any of them had anything to do with cyrus,
> though. But i'd rebooted the server afterwards; i think that's why the
> problem with cyrus began to appear.
>
> # zgrep cyrus-imapd /var/log/apt/
>
> I had already tried that. Nothing at all.
>
> # sh -x /etc/init.d/cyrus-imapd start
> + LC_ALL=C
> + export LC_ALL
> + PATH=/sbin:/usr/sbin:/bin:/usr/bin
> + PATH=/sbin:/usr/sbin:/bin:/usr/bin
> + NAME=cyrmaster
> + DAEMON=/usr/sbin/cyrmaster
> + PIDFILE=/var/run/cyrmaster.pid
> + DESC=Cyrus IMAPd
> + test -x /usr/sbin/cyrmaster
> + exit 0
>
> Good idea about shell debugging, thanks. In any case, it's failing because
> cyrmaster no longer exists. :-(
>
> Bron: no, nothing in syslog. I'd checked that first thing.
>
> I'm mystified as to what has happened. I think i'll try to (re)install
> those packages and see what comes of it. But, realistically, it looks like
> i should rebuild the server.
>
>
> On Tue, Apr 28, 2015 at 8:49 PM, Nic Bernstein <nic at onlight.com> wrote:
>
>>  You told us that you had run some apt commands prior to this problem,
>> but you haven't told us what they were.  If you tried to install something
>> which "replaces" cyrus-imapd, you may have forced its removal.
>>
>> What does "zgrep cyrus-imapd /var/og/apt/*" show?
>>     -nic
>>
>>
>> On 04/28/2015 07:38 PM, lowpass wrote:
>>
>> Gadzooks! It appears that the server is actually missing some things.
>>
>> # ls -l /usr/sbin/cyr*
>> -rwxr-xr-x 1 root root 2046 Mar  3  2014 /usr/sbin/cyrus
>>
>> # ls -l /usr/lib/cyrus/bin/
>> total 24
>> drwxr-xr-x 2 root root 4096 Apr 27 18:29 ./
>> drwxr-xr-x 3 root root 4096 Apr 27 18:29 ../
>> -rwxr-xr-x 1 root root 2945 Mar  3  2014 init-helper*
>> -rwxr-xr-x 1 root root 4018 Mar  3  2014 makedirs*
>> -rwxr-xr-x 1 root root 4965 Mar  3  2014 upgrade-db*
>>
>> # dpkg --get-selections | grep cyr
>> cyrus-admin-2.4                    install
>> cyrus-clients-2.4                install
>> cyrus-common                    install
>> cyrus-common-2.4                deinstall
>> cyrus-imapd-2.4                    deinstall
>> libcyrus-imap-perl24            install
>>
>> hmmm ...
>>
>> # dpkg-query -s cyrus-common-2.4
>> Package: cyrus-common-2.4
>> Status: deinstall ok config-files
>> ...
>> # dpkg-query -s cyrus-imapd-2.4
>> Package: cyrus-imapd-2.4
>> Status: deinstall ok config-files
>>
>> This is saying that the packages have been selected for removal. But, a)
>> I certainly have not done so; and b) they already seem to be gone. And i
>> see nothing at all about them in appt's history logs.
>>
>> Deep breaths.
>>
>> On Tue, Apr 28, 2015 at 7:49 PM, lowpass <zijn.digital at gmail.com> wrote:
>>
>>>   Thanks for the quick response, Bron. The symlink is ok.
>>>
>>> # ls -l /var/run
>>> lrwxrwxrwx 1 root root 4 Oct 18  2014 /var/run -> /run/
>>>
>>>  I tried creating the dir myself as you suggested:
>>>
>>> # mkdir /run/cyrus
>>> # chown cyrus /run/cyrus/
>>> # service cyrus-imapd start
>>>  [nothing]
>>>
>>>  I tried removing the --quiet flag from the startup script with same
>>> (non) results.
>>>
>>>  What about the pid? As i understand, it's not cyrus that creates that
>>> on startrup. In any case, it's NOT being created. From
>>> /etc/init.d/cyrus-imapd:
>>>
>>> NAME=cyrmaster
>>> PIDFILE="/var/run/${NAME}.pid"
>>>
>>>  I've posted a message on the Ubuntu forum as well, as i've a feeling
>>> the problem is not with cyrus. I was hoping, though, that another cyrus
>>> user might have run into this.
>>>
>>>  On Tue, Apr 28, 2015 at 6:55 PM, Bron Gondwana <brong at fastmail.fm>
>>> wrote:
>>>
>>>>
>>>> On Wed, Apr 29, 2015, at 08:46 AM, lowpass wrote:
>>>>
>>>> I do have socket and lock dirs under /var/lib/cyrus but they were last
>>>> modified several years ago and seem to be left over from some other config.
>>>> Other dirs there have seen more recent activity. Everything seems to be
>>>> pointing towards the socket & lock dirs being created under /run but
>>>> there's nothing there.
>>>>
>>>>
>>>>  /run is a tmpfs which gets created fresh on each reboot.
>>>>
>>>> Cyrus starts as user 'cyrus' and has no permission to create the
>>>> directories it needs.
>>>>
>>>> Your init script should create the directories - but if you moved them
>>>> somewhere other than where the package expects them to be, then it won't
>>>> create intermediate directories for you.
>>>>
>>>> So, here's the thing:
>>>>
>>>> 1) double check that /var/run and /run are the same place - they're
>>>> mostly a symlink in recent Debian/Ubuntu systems.  If not, I suggest that
>>>> you audit your configuration to be all in /var/run or all in /run (probably
>>>> a good idea anyway for more consistency.
>>>>
>>>> 2) run these commands as root:
>>>>
>>>> mkdir /run/cyrus
>>>>  chown cyrus /run/cyrus
>>>>
>>>> 3) either put those commands in a startup script that runs before Cyrus
>>>> starts, or edit the init script for Cyrus - though note that if you edit
>>>> the init script, you'll have to re-apply those edits on upgrade.
>>>>
>>>> Unfortunately, this isn't something we can fix in the Cyrus binaries.
>>>> They try to create the directories, but they just plain don't have
>>>> permissions to do so at that stage of the process.
>>>>
>>>> Regards,
>>>>
>>>> Bron.
>>>>
>>>>  --
>>>>  Bron Gondwana
>>>>  brong at fastmail.fm
>>>>
>>>>
>>>>
>>>>  ----
>>>> Cyrus Home Page: http://www.cyrusimap.org/
>>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>>>> To Unsubscribe:
>>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>>>
>>>
>>>
>>
>>
>> ----
>> Cyrus Home Page: http://www.cyrusimap.org/
>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>>
>>
>> --
>> Nic Bernstein                             nic at onlight.com
>> Onlight llc.                              www.onlight.com
>> 219 N. Milwaukee St., Ste. 2A	          v. 414.272.4477
>> Milwaukee, Wisconsin  53202		  f. 414.290.0335
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20150428/0932b8a9/attachment.html 


More information about the Info-cyrus mailing list