<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 04/28/2015 08:31 PM, lowpass wrote:<br>
    <blockquote
cite="mid:CAKYtSzv6oqBvsZHkB3M2CNwf8egt_xqszfYweyAXpO63d6Da3g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>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.<br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Something, at some point, set cyrus-imapd-2.4 and cyrus-common-2.4
    to 'deinstall', and a subsequent 'apt' command, even an upgrade,
    would then cause the deinstallation to take hold.&nbsp; The actual
    setting of the dpkg database to 'deinstall' may have happened some
    time ago.<br>
    <br>
    The reboot would just be icing on the cake, as most
    pre-or-post-removal scripts will stop the service (although that
    often doesn't work well).<br>
    <br>
    <blockquote
cite="mid:CAKYtSzv6oqBvsZHkB3M2CNwf8egt_xqszfYweyAXpO63d6Da3g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div><br>
                # zgrep cyrus-imapd /var/log/apt/<br>
              </div>
              <br>
              I had already tried that. Nothing at all.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Just to be clear, that command, as you typed it above, will not
    work.&nbsp; You need to run 'zgrep cyrus-imapd /var/log/apt/*'.&nbsp; Without
    the glob at the end (*) you're just zgrepping the DIRENT.&nbsp; And, for
    the record, zgrep will error with the &lt;recursive&gt; flag, "-R."<br>
    <br>
    <blockquote
cite="mid:CAKYtSzv6oqBvsZHkB3M2CNwf8egt_xqszfYweyAXpO63d6Da3g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div># sh -x /etc/init.d/cyrus-imapd start<br>
              + LC_ALL=C<br>
              + export LC_ALL<br>
              + PATH=/sbin:/usr/sbin:/bin:/usr/bin<br>
              + PATH=/sbin:/usr/sbin:/bin:/usr/bin<br>
              + NAME=cyrmaster<br>
              + DAEMON=/usr/sbin/cyrmaster<br>
              + PIDFILE=/var/run/cyrmaster.pid<br>
              + DESC=Cyrus IMAPd<br>
              + test -x /usr/sbin/cyrmaster<br>
              + exit 0<br>
              <br>
              Good idea about shell debugging, thanks. In any case, it's
              failing because cyrmaster no longer exists. :-(<br>
            </div>
          </div>
          <br>
        </div>
        Bron: no, nothing in syslog. I'd checked that first thing.<br>
        <br>
        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.<br>
      </div>
    </blockquote>
    <br>
    You should be fine just doing an "# apt-get install cyrus-imapd-2.4
    cyrus-common-2.4" since the config files are still in place.&nbsp; This
    package re-installation shouldn't touch any existing data.<br>
    <br>
    Cheers,<br>
    &nbsp;&nbsp;&nbsp; -nic<br>
    <br>
    <blockquote
cite="mid:CAKYtSzv6oqBvsZHkB3M2CNwf8egt_xqszfYweyAXpO63d6Da3g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Apr 28, 2015 at 8:49 PM, Nic
          Bernstein <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:nic@onlight.com" target="_blank">nic@onlight.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> You told us that you
              had run some apt commands prior to this problem, but you
              haven't told us what they were.&nbsp; If you tried to install
              something which "replaces" cyrus-imapd, you may have
              forced its removal.<br>
              <br>
              What does "zgrep cyrus-imapd /var/og/apt/*" show?<br>
              &nbsp;&nbsp;&nbsp; -nic
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 04/28/2015 07:38 PM, lowpass wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Gadzooks! It appears that the server
                      is actually missing some things.<br>
                      <br>
                      # ls -l /usr/sbin/cyr*<br>
                      -rwxr-xr-x 1 root root 2046 Mar&nbsp; 3&nbsp; 2014
                      /usr/sbin/cyrus<br>
                      <br>
                      # ls -l /usr/lib/cyrus/bin/<br>
                      total 24<br>
                      drwxr-xr-x 2 root root 4096 Apr 27 18:29 ./<br>
                      drwxr-xr-x 3 root root 4096 Apr 27 18:29 ../<br>
                      -rwxr-xr-x 1 root root 2945 Mar&nbsp; 3&nbsp; 2014
                      init-helper*<br>
                      -rwxr-xr-x 1 root root 4018 Mar&nbsp; 3&nbsp; 2014 makedirs*<br>
                      -rwxr-xr-x 1 root root 4965 Mar&nbsp; 3&nbsp; 2014
                      upgrade-db*<br>
                      <br>
                      # dpkg --get-selections | grep cyr<br>
                      cyrus-admin-2.4&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; install<br>
                      cyrus-clients-2.4&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; install<br>
                      cyrus-common&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; install<br>
                      cyrus-common-2.4&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; deinstall<br>
                      cyrus-imapd-2.4&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; deinstall<br>
                      libcyrus-imap-perl24&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; install<br>
                      <br>
                      hmmm ...<br>
                      <br>
                      # dpkg-query -s cyrus-common-2.4<br>
                      Package: cyrus-common-2.4<br>
                      Status: deinstall ok config-files<br>
                      ...<br>
                      # dpkg-query -s cyrus-imapd-2.4<br>
                      Package: cyrus-imapd-2.4<br>
                      Status: deinstall ok config-files<br>
                      <br>
                      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.<br>
                      <br>
                      Deep breaths.<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Apr 28, 2015 at
                        7:49 PM, lowpass <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:zijn.digital@gmail.com"
                            target="_blank">zijn.digital@gmail.com</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div dir="ltr">
                            <div>
                              <div>
                                <div>
                                  <div>Thanks for the quick response,
                                    Bron. The symlink is ok.<br>
                                    <br>
                                    # ls -l /var/run<br>
                                    lrwxrwxrwx 1 root root 4 Oct 18&nbsp;
                                    2014 /var/run -&gt; /run/<br>
                                    <br>
                                  </div>
                                  I tried creating the dir myself as you
                                  suggested:<br>
                                  <br>
                                  # mkdir /run/cyrus<br>
                                  # chown cyrus /run/cyrus/<br>
                                  # service cyrus-imapd start<br>
                                </div>
                                [nothing]<br>
                                <br>
                              </div>
                              <div>I tried removing the --quiet flag
                                from the startup script with same (non)
                                results.<br>
                              </div>
                              <div><br>
                              </div>
                              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:<br>
                              <br>
                              NAME=cyrmaster<br>
                              PIDFILE="/var/run/${NAME}.pid"<br>
                              <br>
                            </div>
                            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.<br>
                          </div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">
                              <div>
                                <div>On Tue, Apr 28, 2015 at 6:55 PM,
                                  Bron Gondwana <span dir="ltr">&lt;<a
                                      moz-do-not-send="true"
                                      href="mailto:brong@fastmail.fm"
                                      target="_blank">brong@fastmail.fm</a>&gt;</span>
                                  wrote:<br>
                                </div>
                              </div>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">
                                <div>
                                  <div>
                                    <div><span>
                                        <div>&nbsp;</div>
                                        <div>On Wed, Apr 29, 2015, at
                                          08:46 AM, lowpass wrote:<br>
                                        </div>
                                        <blockquote type="cite">
                                          <div dir="ltr">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
                                            &amp; lock dirs being
                                            created under /run but
                                            there's nothing there.<br>
                                          </div>
                                        </blockquote>
                                        <div>&nbsp;</div>
                                      </span>
                                      <div>/run is a tmpfs which gets
                                        created fresh on each reboot.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>Cyrus starts as user 'cyrus'
                                        and has no permission to create
                                        the directories it needs.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>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.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>So, here's the thing:<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>1) double check that /var/run
                                        and /run are the same place -
                                        they're mostly a symlink in
                                        recent Debian/Ubuntu systems.&nbsp;
                                        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.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>2) run these commands as
                                        root:<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>mkdir /run/cyrus<br>
                                      </div>
                                      <div>chown cyrus /run/cyrus<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>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.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>Unfortunately, this isn't
                                        something we can fix in the
                                        Cyrus binaries.&nbsp; They try to
                                        create the directories, but they
                                        just plain don't have
                                        permissions to do so at that
                                        stage of the process.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>Regards,<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>Bron.<br>
                                      </div>
                                      <div>&nbsp;</div>
                                      <div>
                                        <div>--<br>
                                        </div>
                                        <div>Bron Gondwana<br>
                                        </div>
                                        <div><a moz-do-not-send="true"
                                            href="mailto:brong@fastmail.fm"
                                            target="_blank">brong@fastmail.fm</a><br>
                                        </div>
                                        <div>&nbsp;</div>
                                      </div>
                                      <div>&nbsp;</div>
                                    </div>
                                    <br>
                                  </div>
                                </div>
                                ----<br>
                                Cyrus Home Page: <a
                                  moz-do-not-send="true"
                                  href="http://www.cyrusimap.org/"
                                  target="_blank">http://www.cyrusimap.org/</a><br>
                                List Archives/Info: <a
                                  moz-do-not-send="true"
                                  href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/"
                                  target="_blank">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a><br>
                                To Unsubscribe:<br>
                                <a moz-do-not-send="true"
                                  href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus"
                                  target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a><br>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>----
Cyrus Home Page: <a moz-do-not-send="true" href="http://www.cyrusimap.org/" target="_blank">http://www.cyrusimap.org/</a>
List Archives/Info: <a moz-do-not-send="true" href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/" target="_blank">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a>
To Unsubscribe:
<a moz-do-not-send="true" href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888">
                  <pre cols="72">-- 
Nic Bernstein                             <a moz-do-not-send="true" href="mailto:nic@onlight.com" target="_blank">nic@onlight.com</a>
Onlight llc.                              <a moz-do-not-send="true" href="http://www.onlight.com" target="_blank">www.onlight.com</a>
219 N. Milwaukee St., Ste. 2A                  v. <a moz-do-not-send="true" href="tel:414.272.4477" value="+14142724477" target="_blank">414.272.4477</a>
Milwaukee, Wisconsin  53202                  f. <a moz-do-not-send="true" href="tel:414.290.0335" value="+14142900335" target="_blank">414.290.0335</a>
</pre>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">----
Cyrus Home Page: <a class="moz-txt-link-freetext" href="http://www.cyrusimap.org/">http://www.cyrusimap.org/</a>
List Archives/Info: <a class="moz-txt-link-freetext" href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a>
To Unsubscribe:
<a class="moz-txt-link-freetext" href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Nic Bernstein                             <a class="moz-txt-link-abbreviated" href="mailto:nic@onlight.com">nic@onlight.com</a>
Onlight llc.                              <a class="moz-txt-link-abbreviated" href="http://www.onlight.com">www.onlight.com</a>
219 N. Milwaukee St., Ste. 2A                  v. 414.272.4477
Milwaukee, Wisconsin  53202                  f. 414.290.0335
</pre>
  </body>
</html>