1

command:

bin/pulsar-admin sinks localrun -a connectors/pulsar-io-mongo-2.10.2.nar --tenant public --namespace default --inputs up-20wt --name mongo-sink --sink-config-file work/config.json --parallelism 1

log:

2023-01-06T14:56:27,441+0800 [pulsar-client-io-1-2] WARN  org.apache.pulsar.client.impl.ConnectionPool - [[id: 0xb0292161, L:/127.0.0.1:57408 - R:localhost/127.0.0.1:6650]] Connection handshake failed: org.apache.pulsar.client.api.PulsarClientException$AuthenticationException: Unable to authenticate

ERROR org.apache.pulsar.client.impl.ClientCnx - [id: 0xb0292161, L:/127.0.0.1:57408 ! R:localhost/127.0.0.1:6650] Failed to authenticate the client
INFO  org.apache.pulsar.client.impl.PulsarClientImpl - Client closing. URL: pulsar://localhost:6650

The deployment uses tls mutual auth: https://pulsar.apache.org/docs/2.10.x/security-tls-authentication

Both client.conf and broker.conf have enabled tls and related key files are setup correspondently.

And most importantly, my pulsar client(c++) can connect to the pulsar+ssl broker and pub message successfully.

so: why the mongo-io-sink created with pulsar-admin connect to the 6650 broker binary data port instead of the ssl 6651 port?

how to fix this sink creating issue?

blue
  • 11
  • 2
  • Do you provide the security credentials in the MongoDB sink connector's configuration file? The sink has to establish its own client connection to the Pulsar broker and needs to provide its own set of credentials. – David Kjerrumgaard Feb 17 '23 at 17:47
  • "so: why the mongo-io-sink created with pulsar-admin connect to the 6650 broker binary data port instead of the ssl 6651 port?" The default serviceURL (data port) for the sink is pulsar://localhost:6650, so you will need to override that in the configuration file as well. – David Kjerrumgaard Feb 17 '23 at 17:47

0 Answers0