1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

[FIX] Kerberos error on email parser

Discussion in 'Using Kayako Classic' started by Technocrat, Mar 15, 2012.

  1. Technocrat

    Technocrat Established Member

    So after receiving the:
    Kerberos error: No credentials cache found (try running kinit)
    error I tried to find the solution. The problem is caused by PHP IMAP and Kerberos.

    There are a couple of different solutions out there on the forums. I am going to try and put them all together into one post here. Because its annoying reading all the posts.

    It should be noted that these fixes require you have a good understanding of your server environment. None of these fixes are "easy" and do require you to do some system level manipulation.
    1. Recompile PHP without Kerberos
      • This option is the easiest if you have the ability to do so (which I do not). All you should need to do is use "--without-kerberos --with-imap=shared" switches while compiling
    2. Add user to Kerberos
      • This option is a temporary fix. It will expire when the ticket does (as I discovered).
      • While in SU use:
        • kinit <username>@<UPPERCASE.KERBEROS.REALM>
        • Example: kinit technocrat@MYSITE.COM
          • Notice the uppercase realm
      • I do not recommend this!!
    3. Recompile the PHP IMAP extension
      • This is the fix I ended up using (thanks to chrismorley for giving me the directions)
        • Create a php file on your web server ie info.php
          • Put the following code
            • <?php echo phpinfo();
          • I know you can see this information in the admin area but trust me this way is easier.
        • Browse to that file
        • Find and record:
          • PHP Version (its at the very top)
            • Example: 5.3.10
            • If you have something like 5.3.6-13ubuntu3.6 this is where it can be a bit tricky. You can try to find your version by using Google, but for this you should be able to use anything greater than or equal to the major and minor version, while still in that major branch. So in this example you could use 5.3.6 through 5.3.10. However you cannot use 5.4.0 (most likely).
          • extension_dir (its under core)
            • Example: /usr/lib/php5/20090626+lfs
        • Go to your server and download your version of PHP
        • Unzip/untar it
        • Make a note of the directory it makes
          • For this example I will use /usr/php-5.3.10
        • Download the PHP IMAP library
        • Unzip/untar it
        • Make a note of the directory it makes
          • For this example I will use /usr/imap-2007f
        • Go into the imap directory
        • Run: export CPPFLAGS=-DOPENSSL_NO_KRB5
        • Run: MakeFile or make lr5 depending on your environment
          • I am assuming that the thing compiled without errors. If you have errors you should be able to find the solution with Google. I have two errors both of which were caused by missing libraries. Once I added them it compiled
        • Go into your downloaded php directory
        • ./configure your PHP with:
          • --without-kerberos
          • --with-imap=shared,/usr/imap-2007f
            • Notice the /user/imap-2007f you will need to change that to match where your compile IMAP library is
          • --with-imap-ssl
          • You might need custom switches depending on your environment. Remember you are not going to make an entire PHP build you just want the IMAP extension.
        • Now run Make
          • It should fully compile
        • Now go into ./modules directory you should see a imap.so file.
        • You might want to go into your php extension directory and rename the current imap.so file. Just in case this doesn't work and you need to put it back
        • copy or move the imap.so file from the compiled modules directory to the active php modules directory
          • Example: mv /usr/php-5.3.10/modules/imap.so /usr/lib/php5/20090626+lfs/imap.so
        • Restart your apache
        • Test the parser again.
        • If everything went right it should be working
    You can see chrismorley's post:
    http://forums.kayako.com/threads/es...p3-mails-are-not-downloaded.16717/#post-87530
    For another look at the IMAP compile solution
     
  2. Jamie Edwards

    Jamie Edwards Staff Member

    Wow, what a useful guide. Thank you for sharing your findings here, I'm sure others will find it very valuable!
     
  3. Technocrat

    Technocrat Established Member

    That's my hope :)

    I should have added you should probably delete the php info file when you are done
     
  4. Asbjorn.B

    Asbjorn.B Member

    Hi.
    We have had this problem for a while with our Kayako on centos x64. On one email queue it will happen severeal times every day, and yesterday it wasn't any emails coming in on that queue at all.
    As I'm writing this the emails has started coming in again, but we'd like this problem not to be repeated.
    I tried all these three fixes, but got problems:

    1. Couldn't compile PHP without kerberos because libc was installed with kerberos support. I had to install libc because of another error, u8t_canonical is missing. I have no idea how to install libc without kerberos support as I don't have much experience with centos.
    2. Which user should I use? What is the kerberos realm?
    3. I tried this and successfully managed to get through all the errors I encountered, but no imap.so file was created. Why not? Something to do with the 64bits os?

    I hope I can get some help from you experts! :)
     
  5. Technocrat

    Technocrat Established Member

    Wish I could be more helpful, however I don't know Centos all that well.

    2) Is your domain or AD.
    3) If you got past the errors then in theory it should have been made. Did you try to search for it?
     
  6. Asbjorn.B

    Asbjorn.B Member

    Thanks for your answer.
    2. We have an AD domain. Is it just supposed to be helpdesk-mail-user@domain-name?
    3. At least I couldn't see any errors. This post is the best search result I found. :)

    We had problems again today.
     
  7. Technocrat

    Technocrat Established Member

    2) Yes.
    3) This is really the best option and probably the only that will work long term. So I would suggest trying to get this working. You might need to look through Centos's support forums to figure out how to do it. Compiling should be pretty strait forward for them.
     
  8. Kevin Delaney

    Kevin Delaney New Member

  9. Technocrat

    Technocrat Established Member

    Good to know
     
  10. Kevin Delaney

    Kevin Delaney New Member

    I'm still having the same problem that Asbjorn.B is when running ./configure on PHP, though. :(

    Any idea on how to get around this?
     
  11. Technocrat

    Technocrat Established Member

    Sorry I am not much of a linux guy. I would suggest posting on the support forum for them.
     
  12. Kevin Delaney

    Kevin Delaney New Member

  13. Technocrat

    Technocrat Established Member

    Thanks. Wish I could edit my post and put that in there for other people. Hopefully they scroll down.
     
  14. Charles Holtzkampf

    Charles Holtzkampf New Member

    Hi all, just wondering if someone could offer advice. I am suffering from the above error, but only for one of my email queues. Both of which are pointing to the same server and are using TLS?
     

Share This Page