4

I am creating a web service in go micro...

service := web.NewService(
            web.Name(""),
            web.Address(""),
            web.Advertise(""),
            web.RegisterTTL(time.Second*30),
               web.Registry(reg),
        )

where reg := registry.NewRegistry(registryOptions)

func registryOptions(ops *registry.Options) {
    ops.Timeout = time.Second * 30
    ops.Secure = true
    ops.TLSConfig = &tls.Config{InsecureSkipVerify: true}
}

and I am starting the service with --registery=consul

Service is running inside docker container .. Though the service registers with consul but I am still getting the issue ..

consul.watch: Watch (type: services) errored: Unexpected response code: 400 (Client sent an HTTP request to an HTTPS server

Consul is set up for TLS configuration.

Arpit Pruthi
  • 177
  • 10

0 Answers0