title: [Error: Unspecified GSS failure. Minor code may provide more information: No key table entry found matching
body: <p>I have been working on implementing SSO in a NodeJS application using an AD hosted on an azure VM. I am using <a href="https://www.npmjs.com/package/kerberos" rel="nofollow noreferrer">npm-kerberos</a> in my application. Here is how I have configured everything:</p>
  
  <ul>
  <li>I have created an SPN for the service </li>
  <li>Generated a keytab with that SPN</li>
  <li>Replicated keytab in my ubuntu server /etc/</li>
  <li>Installed kerberos client and configued krb5.conf accordingly</li>
  </ul>
  
  <p>In my apllication I have installed kerberos npm:</p>
  
  <ul>
  <li>principalDetails method return HTTP/enpast.com@REALM.COM which is what I want.</li>
  <li>checkPassword also works all good.</li>
  <li>initializeServer fails using the SPN that I get from principalDetails.</li>
  </ul>
  
  <p>Here is code:</p>
  
  <pre><code>const service = 'HTTP/enpast.com@REALM.COM'
  kerberos.initializeServer(service, (err, data)=&gt;{
        if (err) {
          console.log('Failed intialization----&gt;', err);
        } else {
          console.log('Successfully initialized server', data);
        }
      });
  </code></pre>
  
  <p>Here is the error message I get:</p>
  
  <blockquote>
    <p>[Error: Unspecified GSS failure.  Minor code may provide more information: No key table entry found matching HTTP/enpast.com/realm.com@]</p>
  </blockquote>
  
  <p>Any leads to the cause will be highly appreciated. Thank you</p>