Hello,
I used Docker Swarm to deploy DGraph and when I used HaProxy for load balancing, I received the following error message
Error: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Trying to connect an http1.x server"
debug_error_string = "{"created":"@1592373707.742817000","description":"Error received from peer ipv4:192.168.1.100:9083","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Trying to connect an http1.x server","grpc_status":14}"
>
My haProxy configuration is as follows
listen alpha-client-cluster
bind *:9083
mode http
maxconn 300
balance roundrobin
server server1 192.168.1.100:9080 maxconn 300 check
server server2 192.168.1.101:9081 maxconn 300 check
server server3 192.168.1.102:9082 maxconn 300 check
What should I do next or what information should I provide to help solve the problem
Which version of Dgraph are you using and machine specifications.
R: V20.03.3 ,Machine configuration 2 vCPU 4 GiB, a total of three Ali cloud machines,The three machine IPs are as follows
192.168.1.100 192.168.1.101 192.168.1.102
Steps followed by you to reach here.
R: I used Docker Swarm to deploy Dgraph,After deploying according to the DGraph document, HaProxy was added for load balancing
The steps for haProxy deployment are as follows
Three files in total
Hi @gumupaier, I have tried reproducing the error but everything is working fine for me and I am able to query/mutate data via Ratel. However, can you elaborate on a few more things?
Share the result of docker service ls on the manager node.
Are you able to mutate/query data via Ratel.
Any other insights on when exactly you are getting the error.
You should check if you are exposing the port correctly and that you are configuring Dgraph correctly with --port_offset. Which in your case is --port_offset 3.
hi
the problem was solved, I changed the HAProxy mode from HTTP to TCP, and now it can work normally. The current haProxy configuration file is as follows: