You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sections/checklists.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,3 +101,17 @@
101
101
102
102
[] Code invoking Jersey Client reacts to 401/403 exception responses when using Authentication Token by deleting creating a new Auth Token and re-issuing request. (this triggers re-authentication)
103
103
104
+
### Debugging Workflow
105
+
106
+
[] host has an IP address (`ifconfig` / `ipconfig`)
107
+
[] host has an FQDN: `hostname -f`
108
+
[] FQDN resolves to hostname `nslookup $hostname`
109
+
[] hostname responds to pings `ping $hostname`
110
+
[] reverse DNS lookup of IPAddr returns hostname
111
+
[] clock is in sync with rest of cluster: `date`
112
+
113
+
[] keytab exists
114
+
[] keytab is readable by account running service.
115
+
[] keytab contains principals in listing `ktlist -kt $keytab`
116
+
[] keytab FQDN is in entry of form `shortname/$FQDN`
Copy file name to clipboardExpand all lines: sections/errors.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,13 @@ In `krb5.conf`:
107
107
[libdefaults]
108
108
udp_preference_limit = 1
109
109
110
+
## `GSSException: No valid credentials provided (Mechanism level: Connection reset)'
111
+
112
+
We've seen this triggered in Hadoop tests after the MiniKDC through an exception; it's thread
113
+
exited and hence the Kerberos client got a connection error.
114
+
115
+
When you see this assume network connectivity problems, or something up at the KDC itself.
116
+
110
117
## Principal not found
111
118
112
119
The hostname is wrong (or there is >1 hostname listed with different IP addrs) and so a principal
@@ -124,6 +131,68 @@ This apparently surfaces in [Java 8 after 8u40](http://sourceforge.net/p/spnego/
124
131
if Kerberos server doesn't support the first authentication mechanism which the client
125
132
offers, then the client fails. Workaround: don't use those versions of Java.
126
133
134
+
This is [now acknowledged by Oracle](http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8080129) and
135
+
has been fixed in 8u60.
136
+
137
+
138
+
## `Specified version of key is not available (44)`
139
+
140
+
```
141
+
Client failed to SASL authenticate: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: Failure unspecified at GSS-API level (Mechanism level: Specified version of key is not available (44))]
142
+
```
143
+
144
+
The meaning of this message —or how to fix it— is a mystery to all.
145
+
146
+
There is [some tentative coverage in Stack Overflow](http://stackoverflow.com/questions/24511812/krbexception-specified-version-of-key-is-not-available-44)
147
+
148
+
One possibility is that the keys in your keytab have expired. Did you know that can happen? It does.
149
+
One day your cluster works happily. The next your client requests are failing, with this message
java.io.IOException: Could not configure server because SASL configuration did not allow the ZooKeeper server to authenticate itself properly: javax.security.auth.login.LoginException: No password provided
185
+
at org.apache.zookeeper.server.ServerCnxnFactory.configureSaslLogin(ServerCnxnFactory.java:207)
186
+
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:87)
187
+
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:111)
188
+
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
189
+
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
190
+
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
191
+
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Copy file name to clipboardExpand all lines: sections/jaas.md
+35-6Lines changed: 35 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,43 @@ JAAS is a nightmare from the Enterprise Java Bean era, one which surfaces from t
20
20
21
21
JAAS provides for a standard configuration file format for specifying a *login context*; how code trying to run in a specific context/role should login and authenticate.
22
22
23
-
As a single jaas.conf file can have multiple contexts, the same file can be used to configure the server and clients of a service, each with different binding information. Different contexts can have different login/auth mechanisms, including Kerberos and LDAP, so that you can even specify different auth mechanisms for different roles.
23
+
As a single `jaas.conf` file can have multiple contexts, the same file can be used to configure the server and clients of a service, each with different binding information. Different contexts can have different login/auth mechanisms, including Kerberos and LDAP, so that you can even specify different auth mechanisms for different roles.
24
24
25
-
In Hadoop, the JAAS context is invariably Kerberos when it comes to talking to HDFS, YARN, etc. However, if Zookeeper enters the mix, it may be interacted with differently —and so need a different JAAS context.
25
+
In Hadoop, the JAAS context is invariably Kerberos when it comes to talking to HDFS, YARN, etc.
26
+
However, if Zookeeper enters the mix, it may be interacted with differently —and so need a different JAAS context.
26
27
27
28
Fun facts about JAAS
28
29
29
30
1. Nobody ever mentions it, but the file takes backslashed-escapes like a Java string.
30
-
1. It needs escaped backlash directory separators on Windows, such as: `C:\\security\\krb5.conf`. Get that wrong and your code will fail with what will inevitably be an unintuitive message.
31
-
1. Each context must declare the authentication module to use. The kerberos authentication model on IBM JVMs is different from that on Oracle and OpenJDK JVMs. You need to know the target JVM for the context —or create separate contexts for the different JVMs.
32
-
33
-
Hadoop's UGI class will dynamically create a JAAS context for Hadoop logins, dynamically determining the name of the kerberos module to use. For interacting purely with HDFS and YARN, you may be able to avoid needing to know about or understand JAAS.
31
+
1. It needs escaped backlash directory separators on Windows, such as: `C:\\security\\krb5.conf`.
32
+
Get that wrong and your code will fail with what will inevitably be an unintuitive message.
33
+
1. Each context must declare the authentication module to use.
34
+
The kerberos authentication model on IBM JVMs is different from that on Oracle and OpenJDK JVMs.
35
+
You need to know the target JVM for the context —or create separate contexts for the different JVMs.
36
+
1. The rules about when to use `=` within an entry, and when to complete an entry with a `;` appear to be:
37
+
start with the login module, one key=value line per entry, quote strings, finish with a `;`
38
+
within the same file.
39
+
40
+
Hadoop's UGI class will dynamically create a JAAS context for Hadoop logins, dynamically determining the name of the kerberos module to use. For interacting purely with HDFS and YARN, you may be able to avoid needing to know about or understand JAAS.
41
+
42
+
Example of a JAAS file valid for Sun
43
+
44
+
If you need a basic JAAS cient configuration which
0 commit comments