skyrocknroll opened a new issue #224: Unable to produce message when TLS is enabled with Auth Token Authentication URL: https://github.com/apache/pulsar-client-go/issues/224 #### Expected behavior * We should be able to produce the message #### Actual behavior ``` INFO[0000] Connecting to broker remote_addr="pulsar+ssl://pulsar-node-1.bm.infra:6651" INFO[0001] TCP connection established local_addr="10.8.0.8:43824" remote_addr="pulsar+ssl://pulsar-node-1.bm.infra:6651" INFO[0001] Connection is ready local_addr="10.8.0.8:43824" remote_addr="pulsar+ssl://pulsar-node-1.bm.infra:6651" INFO[0001] Connecting to broker remote_addr="pulsar://pulsar-node-1.bm.infra:6650" WARN[0002] Failed to connect to broker. error=EOF remote_addr="pulsar://pulsar-node-1.bm.infra:6650" INFO[0002] Connection closed remote_addr="pulsar://pulsar-node-1.bm.infra:6650" INFO[0004] Connecting to broker remote_addr="pulsar://pulsar-node-1.bm.infra:6650" WARN[0005] Failed to connect to broker. error=EOF remote_addr="pulsar://pulsar-node-1.bm.infra:6650" INFO[0005] Connection closed remote_addr="pulsar://pulsar-node-1.bm.infra:6650" INFO[0009] Connecting to broker remote_addr="pulsar://pulsar-node-1.bm.infra:6650" WARN[0010] Failed to connect to broker. error=EOF remote_addr="pulsar://pulsar-node-1.bm.infra:6650" INFO[0010] Connection closed remote_addr="pulsar://pulsar-node-1.bm.infra:6650" ``` #### Steps to reproduce ```go package main import ( "context" "fmt" "github.com/apache/pulsar-client-go/pulsar" ) func main() { client, err := pulsar.NewClient(pulsar.ClientOptions{ URL: "pulsar+ssl://pulsar-node-1.bm.infra:6651", //TLSTrustCertsFilePath: "/home/uva/beam/certs/stage-bm-infra.crt", //TLSAllowInsecureConnection: true, Authentication: pulsar.NewAuthenticationToken("dfdfdfd"), TLSValidateHostname: true, }) if err != nil { fmt.Println(err.Error()) return } producer, err := client.CreateProducer(pulsar.ProducerOptions{ Topic: "persistent://public/default/native-go-client-test-1", DisableBatching: true, //HashingScheme: pulsar.JavaStringHash, //CompressionType: pulsar.NoCompression, }) if err != nil { fmt.Println(err.Error()) } msg := pulsar.ProducerMessage{ Key: "fooo", Payload: []byte(`consul_health_checks,host=wolfpit,node=consul-server-node,check_id="serfHealth",check_name="Serf Health Status",service_id="",status="passing",passing=1i,critical=0i,warning=0i 1464698464486439902`), } id, err := producer.Send(context.Background(), &msg) if err != nil { fmt.Println("Not able to produce the message %s", err.Error()) } if err != nil { fmt.Println(err.Error()) } } ``` #### System configuration **Pulsar version**: 2.4.2
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
