gRPC error with TLS
Ultchad opened this issue · comments
I have issue when i run kubemq server
with certificate (The same command work without TLS)
I can't send message in queue via gRPC:
$ kubemq queues send qdock1 'hello word 1'
2022/12/07 14:33:54 loaded configuration from /tmp/tmp.Ebe1N53171/config.yaml
Sending Queue Message:
{
"id": "",
"channel": "qdock1",
"client_id": "908ci19b-ec5a-4224-8422-64f386761da4",
"body_string": "hello word 1"
}
error: error sending queue message, rpc error: code = Unavailable desc = error reading from server: EOF
But I can list the queue (via API)
The certificates is valid (pub, key and ca)
I test with:
- kubemq TLS (security option) and reverse proxy for API
- kubemq without TLS and reverse proxy for API, REST and gRPC
I looked the exchanges of kubemq queues send qdock1 'hello word 1'
with the server:
With TLS or without TLS: i can read all exchanges
With kubemqctl
$ openssl s_client -connect server.domain:9090 <<< '' | openssl x509 > server.crt
$ kubemqctl config
? Select Connection Type: Direct
? Set Kubemq Host: server.domain
? Set Kubemq gRPC port interface: 50000
? Set Kubemq Rest port interface: 9090
? Set Kubemq Api port interface: 8080
? Set default interface: grpc
? Configure access control Yes
? Set SSL Secured connection ? Yes
? Set cert file path: ./server.crt
? Would you like to set connection ClientId ? No
? Would you like to set JWT Authentication token ? No
? Would you like to set license information?: No
Configuration completed and saved.
$ kubemqctl queues send qdock1 'hello word 1'
Sending Queue Message:
{
"id": "",
"channel": "qdock1",
"client_id": "4f49d68a-c700-47fb-b66e-1f1708b4dba6",
"body_string": "hello word 1"
}
Response:
{
"message_id": "ZgF6BTReA4o2Ubwq20LTxq",
"sent_at": "2022-12-07 16:06:40.756"
}
The kubemqctl client work but kubemq client not
Should we use kubemqctl from other reposity instead kubemq command (from this repository) ?
If kubemqctl works this mean that the connectivity is working.
check you client code
I am using kubemq-community client, kubemq
command from this repository
They don't have the option to set a certificate on the client
I don't understant , i re send my last question:
Should we use kubemqctl from other reposity instead kubemq
command (from this repository) ? (This is not a client I coded, it's your client)