[
https://issues.apache.org/jira/browse/DIRKRB-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16135268#comment-16135268
]
John Zhuge commented on DIRKRB-615:
-----------------------------------
[~jiajia] MiniKdc does not create kdc.conf to start SimpleKdcServer. All
configurations are done programmatically here:
https://github.com/apache/hadoop/blob/267e19a09f366a965b30c8d4dc75e377b0d92fff/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java#L297-L334.
MiniKdc's properties:
{noformat}
$ cat
hadoop-dist/target/hadoop-3.0.0-beta1-SNAPSHOT/etc/hadoop/minikdc.properties
# org.name=EXAMPLE (used to create the REALM)
# org.domain=COM (used to create the REALM)
# kdc.bind.address=localhost
# kdc.port = 0 (ephemeral port)
# instance=DefaultKrbServer
# max.ticket.lifetime=86400000 (1 day)
# max.renewable.lifetime=604800000 (7 days)
# transport=TCP
# debug=false
{noformat}
> Can not connect to simplekdc server
> -----------------------------------
>
> Key: DIRKRB-615
> URL: https://issues.apache.org/jira/browse/DIRKRB-615
> Project: Directory Kerberos
> Issue Type: Bug
> Affects Versions: 1.0.0-RC2
> Reporter: John Zhuge
> Assignee: Jiajia Li
>
> Started a simplekdc server which generated the following krb5.conf:
> {code}
> [libdefaults]
> kdc_realm = EXAMPLE.COM
> default_realm = EXAMPLE.COM
> udp_preference_limit = 1
> kdc_tcp_port = 10088
> #_KDC_UDP_PORT_
> [realms]
> EXAMPLE.COM = {
> kdc = localhost:10088
> }
> {code}
> But kinit failed to connect to simplekdc server on Mac:
> {noformat}
> $ kinit jzhuge
> [email protected]'s password:
> kinit: krb5_get_init_creds: unable to reach any KDC in realm EXAMPLE.COM,
> tried 1 KDC
> {noformat}
> Wireshark showed kinit used UDP, while simplekdc was configured with TCP.
> Replaced the {{kdc}} option in krb5.conf with {{kdc = tcp/localhost:10088}},
> kinit was able to connect.
> Suggested fix:
> Add {{<service>/}} prefix to option {{kdc}} in the template
> https://github.com/apache/directory-kerby/blob/trunk/kerby-kerb/kerb-simplekdc/src/main/resources/krb5-template.conf
> and
> https://github.com/apache/directory-kerby/blob/trunk/kerby-kerb/kerb-simplekdc/src/main/resources/krb5_udp-template.conf.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)