ancashoria / graphql-kafka-subscriptions

Apollo graphql subscriptions over Kafka protocol
MIT License
187 stars 55 forks source link

"Error: No provider for SASL mechanism GSSAPI" on Centos / Host resolution Error #27

Closed Davenporten closed 4 years ago

Davenporten commented 4 years ago

I'm working on CentOS and I've installed the latest graphql-kafka-subscriptions and an passing the following configurations to the KafkaPubSub

{
  topic: <kafka_topic>,
  host: <host>,
  port: <port>,
  globalConfig: {
    'security.protocol': 'SASL_PLAINTEXT',
    'sasl.kerberos.service.name': 'kafka',
    'sasl.kerberos.keytab': <keytab_file>,
    'sasl.kerberos.principal': <principal>
  }
}

From here I have two problems (though maybe they're related?). If I do a curl on the the graphql instance I get back

Error: No provider for SASL mechanism GSSAPI: recompile librdkafka with libsasl2 or openssl support. Current build options: PLAIN

This is of course a problem in librdkafka, but as much as I've searched I cannot figure out how to get it the libs that it needs. I've even tried exporting the env vars for MacOS with no success.

If however I don't send anything, no curl request, I get

[Error: Local: Host resolution failure]
[Error: Local: All broker connections are down]

<Path>/node_modules/node-rdkafka/lib/error.js:402
  return new LibrdKafkaError(e);
         ^
Error: Local: Broker transport failure
    at Function.createLibrdkafkaError [as create] (<Path>/node_modules/node-rdkafka/lib/error.js:402:10)
    at <Path>/node_modules/node-rdkafka/lib/client.js:341:28

The host however is reachable from my machine so I'm wondering if there is some underlying problem that the error messages don't fulling explain. Also as a note

[Error: Local: Host resolution failure]
[Error: Local: All broker connections are down]

Were console logs I added manually to node-rdkafka.

Any help/direction you could give me on this would be much appreciated!