Results 1 to 3 of 3

Thread: zmstat-fd not starting when created a symbolic link from /opt to /usr/local

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    12
    Rep Power
    9

    Default zmstat-fd not starting when created a symbolic link from /opt to /usr/local

    Hi,



    I did a fresh install of zimbra 8 on CentOS 6.5 and after the installation notice stats were not running. After investigating the issue and reviewing numerous log files, I decided to look at the perl script (zmstat-fd). There is an expression where zmstat-fd checks the log file location via a realpath function.

    ls -ld /opt
    lrwxrwxrwx. 1 root root 10 Apr 16 01:43 /opt -> /usr/local

    /opt/zimbra/libexec/zmstat-fd
    Error: Specified log file must be created in /tmp, /var/log, /opt/zimbra/zmstat, /opt/zimbra/log, or /opt/zimbra/data/tmp

    from zmstat-fd

    $LOGFILE=realpath($LOGFILE);

    if ($LOGFILE !~ /^\/tmp|^\/var\/log|^\/opt\/zimbra\/log|^\/opt\/zimbra\/data\/tmp|^\/opt\/zimbra\/zmstat/) {
    print "Error: Specified log file must be created in /tmp, /var/log, /opt/zimbra/zmstat, /opt/zimbra/log, or /opt/zimbra/data/tmp\n";
    print "\n";
    exit(1);

    But when you create a symbolic link, realpath returns the, well, real path. In my case, I added a simple 'print' statement in the script and behold..

    perl -w /opt/zimbra/libexec/zmstat-fd
    /usr/local/zimbra/zmstat/fd.csv

    The expression will fail and zmstat-fd will not start. You'll need to update the zmstat-fd script to include your realpath.

    if ($LOGFILE !~ /^\/tmp|^\/var\/log|^\/opt\/zimbra\/log|^\/opt\/zimbra\/data\/tmp|^\/opt\/zimbra\/zmstat|^\/usr\/local\/zimbra\/zmstat/) {
    print "Error: Specified log file must be created in /tmp, /var/log, /opt/zimbra/zmstat, /opt/zimbra/log, or /opt/zimbra/data/tmp\n";
    print "\n";
    exit(1);
    }

    Hopefully, this will be resolved in a future release.

  2. #2
    Join Date
    May 2007
    Location
    Zimbra
    Posts
    1,285
    Rep Power
    10

    Default

    It is not supported to symlink /opt to /usr/local and install Zimbra. Try installing in a supported method.
    Quanah Gibson-Mount
    Server Architect
    Zimbra, Inc
    --------------------
    Zimbra :: the leader in open source messaging and collaboration

  3. #3
    Join Date
    Jan 2008
    Posts
    8
    Rep Power
    7

    Default

    Quote Originally Posted by quanah View Post
    It is not supported to symlink /opt to /usr/local and install Zimbra. Try installing in a supported method.
    Some hosting options come preset. In my odd instance, it had been working with ln -s /usr/opt /opt for this one particiular environment. Was doing my migration last night and I didn't realize this change with 8.0.7 until I had pulled the 8.06 version and did a diff to see what changed. Is it really necessary to exit on that check? This isn't a show stopper but it seems odd to abort. Lots of mount options for us to get around this. If you can't handle symlinks we just need to know.

    If this is documented, I missed it/

    My search just found this from 2009 about symlinks for /opt and them not being supported.

    http://www.zimbra.com/forums/adminis...t-symlink.html

    A quick keyword search in the system requirements document and the system adminitrator manual failed to bring up any hits about /opt and symlinks

    I get that traversal can be more difficult in some instances with symlinks but you handle it all over your code so I am at a loss of what is happening with this latest patch to zmstat-fd

    Put me down for not liking this new patch since it eliminates potential customers in supported platforms and will probably cause you more support problems. ;-)

    w/r

    Jim

Similar Threads

  1. Replies: 5
    Last Post: 04-22-2010, 05:28 AM
  2. Replies: 3
    Last Post: 02-22-2010, 04:26 AM
  3. /opt is a symbolic link ?
    By tiger2000 in forum Installation
    Replies: 3
    Last Post: 01-27-2009, 07:26 AM
  4. Replies: 2
    Last Post: 01-13-2009, 02:54 PM
  5. Replies: 5
    Last Post: 03-01-2007, 03:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •