Skip to content

Bad SASL negotiation status: 3 (GSS initiate failed) #172

@pksilen

Description

@pksilen

We experience an error when connecting to hive using Kerberos auth:
Bad SASL negotiation status: 3 (GSS initiate failed)

Below is our code and before executing our code, we execute kinit:

kinit -kt {{ .Values.krb5.keytabFile }} {{ .Values.krb5.principal }};


	configuration.Username = cfg.HiveUsername
	configuration.Password = cfg.HivePassword
	configuration.Service = cfg.HiveService
	configuration.FetchSize = cfg.HiveFetchsize

	if cfg.HiveAuth == "KERBEROS" || cfg.HiveAuth == "kerberos" {
		configuration.TLSConfig = &tls.Config{
			InsecureSkipVerify: true,
		}
	}

	connection, errConn := gohive.Connect(cfg.HiveHost, cfg.HivePort, cfg.HiveAuth, configuration)
	if errConn != nil {
		return nil, fmt.Errorf("Could not connect to Hive. %v", errConn)
	}

	return &HiveClient{
		Configuration: configuration,
		Connection:    connection,
	}, nil

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions