Skip to content

Commit d22127c

Browse files
committed
recommended workflow for dealing with version mismatch. It didn't work for me though.
1 parent 5664a5e commit d22127c

File tree

2 files changed

+56
-16
lines changed

2 files changed

+56
-16
lines changed

sections/biblography.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
1. [JAAS Configuration (Java 8)](http://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/tutorials/LoginConfigFile.html)
1414
1. For OS/X users, the GUI ticket viewer is `/System/Library/CoreServices/Ticket\ Viewer.app`
1515
1. [Colouris01], Colouris, Dollimore & Kindberg, 2001, *Distributed System Concepts and Design*,
16-
1. [JAva 8 GSS API](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/jgss-features.html)
17-
16+
1. [Java 8 GSS API](https://docs.oracle.com/javase/8/docs/technotes/guides/security/jgss/jgss-features.html)
17+
1818
### Kerberos, Active Directory and Apache Hadoop
1919

20+
1. [Microsoft Technet Introduction to Kerberos](https://technet.microsoft.com/en-us/library/cc772815(v=ws.10).aspx)
2021
1. [Kabakov14], Kabakov,
2122
[Securing Hadoop environments with Kerberos and active directory](https://developer.ibm.com/hadoop/blog/2014/09/03/securing-hadoop-environments-kerberos-active-directory/),
2223
IBM, 2014
@@ -26,4 +27,3 @@
2627
1. [Cloudera15] Cloudera,
2728
[Integrating Hadoop Security with Active Directory](http://www.cloudera.com/content/cloudera/en/documentation/core/v5-3-x/topics/cdh_sg_hadoop_security_active_directory_integrate.html),
2829
2015
29-
1. [Coluris01], Colouris et al, *Distributed System Concepts and Design*, 2001

sections/errors.md

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ Switch to openjdk or go to your JVM supplier (Oracle, IBM) and download the JCE
5555

5656
This may appear in a stack trace starting with something like:
5757

58-
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
59-
58+
```
59+
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
60+
```
6061

6162
It's very common, and essentially means "you weren't authenticated"
6263

@@ -70,11 +71,13 @@ Possible causes:
7071

7172
## Clock skew too great
7273

73-
GSSException: No valid credentials provided (Mechanism level: Attempt to obtain new INITIATE credentials failed! (null)) . . . Caused by: javax.security.auth.login.LoginException: Clock skew too great
74+
```
75+
GSSException: No valid credentials provided (Mechanism level: Attempt to obtain new INITIATE credentials failed! (null)) . . . Caused by: javax.security.auth.login.LoginException: Clock skew too great
7476
75-
GSSException: No valid credentials provided (Mechanism level: Clock skew too great (37) - PROCESS_TGS
77+
GSSException: No valid credentials provided (Mechanism level: Clock skew too great (37) - PROCESS_TGS
7678
77-
kinit: krb5_get_init_creds: time skew (343) larger than max (300)
79+
kinit: krb5_get_init_creds: time skew (343) larger than max (300)
80+
```
7881

7982
This comes from the clocks on the machines being too far out of sync.
8083

@@ -104,12 +107,14 @@ Rarely seen. Switching kerberos to use TCP rather than UDP makes it go away
104107

105108
In `krb5.conf`:
106109

107-
[libdefaults]
108-
udp_preference_limit = 1
110+
```
111+
[libdefaults]
112+
udp_preference_limit = 1
113+
```
109114

110115
## `GSSException: No valid credentials provided (Mechanism level: Connection reset)'
111116

112-
We've seen this triggered in Hadoop tests after the MiniKDC through an exception; it's thread
117+
We've seen this triggered in Hadoop tests after the MiniKDC through an exception; its thread
113118
exited and hence the Kerberos client got a connection error.
114119

115120
When you see this assume network connectivity problems, or something up at the KDC itself.
@@ -123,7 +128,9 @@ See the comments above about DNS for some more possibilities.
123128

124129
## During SPNEGO Auth: Defective token detected
125130

126-
GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
131+
```
132+
GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
133+
```
127134

128135
The token supplied by the client is not accepted by the server.
129136

@@ -160,16 +167,39 @@ KVNO Timestamp Principal
160167
5 12/16/14 11:46:05 zookeeper/devix.cotham.uk@COTHAM
161168
```
162169

170+
One thing to see there is the version number in the KVNO table.
171+
172+
Oracle describe the JRE's handling of version numbers [in their bug database](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6984764).
173+
174+
From an account logged in to the system, you can look at the client's version number
175+
176+
```
177+
$ kvno zookeeper/devix@COTHAM
178+
zookeeper/devix@COTHAM: kvno = 1
179+
```
180+
181+
*Recommended strategy*
182+
183+
Rebuild your keytabs.
184+
185+
1. Take a copy of your current keytab dir, for easy reverting.
186+
1. Use `ktlist -kt` to list the entries in each keytab.
187+
1. Use `ls -al` to record their user + group values + permissions.
188+
1. In `kadmin.local`, re-export every key to the keytabs which needed it with `xst -norandkey`
189+
1. Make sure the file owners and permissions are as before.
190+
1. Restart everything.
191+
163192

164193
## `javax.security.auth.login.LoginException: No password provided`
165194

166195
When this surfaces in a server log, it means the server couldn't log in as the user. That is,
167-
there isn't an entry in the supplied keytab for that user.
196+
there isn't an entry in the supplied keytab for that user and the system (obviously) doesn't
197+
want to fall back to user-prompted password entry.
168198

169199
Some of the possible causes
170200

171-
* The wrong keytab was specified
172-
* There isn't an entry in the keytab for the user
201+
* The wrong keytab was specified.
202+
* There isn't an entry in the keytab for the user.
173203
* The hostname of the machine doesn't match that of a user in the keytab, so a match of `service/host`
174204
fails.
175205

@@ -191,15 +221,25 @@ java.io.IOException: Could not configure server because SASL configuration did n
191221
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
192222
193223
```
224+
### `kinit: Client not found in Kerberos database while getting initial credentials`
225+
226+
This is fun: it means that the user is not known.
227+
228+
Possible causes
194229

230+
1. The user isn't in the database.
231+
1. You are trying to connect to a different KDC than the one you thought you were using.
232+
1. You aren't who you thought you were.
195233

196234
# Hadoop Web/REST APIs
197235

198236
## AuthenticationToken ignored
199237

200238
This has been seen in the HTTP logs of Hadoop REST/Web UIs:
201239

202-
WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: AuthenticationToken ignored: org.apache.hadoop.security.authentication.util.SignerException: Invalid signature
240+
```
241+
WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: AuthenticationToken ignored: org.apache.hadoop.security.authentication.util.SignerException: Invalid signature
242+
```
203243

204244
This means that the caller did not have the credentials to talk to a Kerberos-secured channel.
205245

0 commit comments

Comments
 (0)