Hi.
I am trying to make grpc connection on the new ES 20.6.0 in nodejs.
I am using @grpc/grpc-js library, and files generated from .proto files by grpc_tools_node_protoc.
The issue is after initial connect and trying to send request to server connection drops silently.
Looking to .Net client file I’ve found what I need to add authorization header to request metadata, from the debug logs it looks like it added fine, but that didn’t help.
I got nothing in server logs with --LogHttpRequests --LogFailedAuthenticationAttempts enabled.
This makes me think it is not an auth issue.
Eventstore instance is accessible with Http and tcp without any problem.
Are there any example for using grpc with nodejs, or any way to get more debug info server-side?
here are logs from client grpc library:
logs
2020-06-24T10:01:44.800Z | resolving_load_balancer | dns:localhost:2113 IDLE -> IDLE
2020-06-24T10:01:44.800Z | connectivity_state | dns:localhost:2113 IDLE -> IDLE
2020-06-24T10:01:44.801Z | dns_resolver | Resolver constructed for target dns:localhost:2113
2020-06-24T10:01:44.802Z | channel | dns:localhost:2113 createCall [0] method="/event_store.client.projections.Projections/Statistics", deadline=Infinity
2020-06-24T10:01:44.803Z | call_stream | [0] Sending metadata
2020-06-24T10:01:44.804Z | channel | Pick result: QUEUE subchannel: undefined status: undefined undefined
2020-06-24T10:01:44.804Z | call_stream | [0] write() called with message of length 0
2020-06-24T10:01:44.805Z | call_stream | [0] end() called
2020-06-24T10:01:50.534Z | call_stream | [0] deferring writing data chunk of length 5
2020-06-24T10:01:50.534Z | dns_resolver | Resolution update requested for target dns:localhost:2113
2020-06-24T10:01:50.535Z | resolving_load_balancer | dns:localhost:2113 IDLE -> CONNECTING
2020-06-24T10:01:50.535Z | channel | Pick result: QUEUE subchannel: undefined status: undefined undefined
2020-06-24T10:01:50.535Z | connectivity_state | dns:localhost:2113 IDLE -> CONNECTING
2020-06-24T10:01:50.536Z | resolving_load_balancer | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.536Z | channel | Pick result: QUEUE subchannel: undefined status: undefined undefined
2020-06-24T10:01:50.536Z | connectivity_state | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.537Z | dns_resolver | Resolved addresses for target dns:localhost:2113: [127.0.0.1:2113]
2020-06-24T10:01:50.538Z | pick_first | Connect to address list 127.0.0.1:2113
2020-06-24T10:01:50.539Z | subchannel | 127.0.0.1:2113 refcount 0 -> 1
2020-06-24T10:01:50.540Z | subchannel | 127.0.0.1:2113 refcount 1 -> 2
2020-06-24T10:01:50.540Z | pick_first | Start connecting to subchannel with address 127.0.0.1:2113
2020-06-24T10:01:50.540Z | pick_first | IDLE -> CONNECTING
2020-06-24T10:01:50.541Z | resolving_load_balancer | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.541Z | channel | Pick result: QUEUE subchannel: undefined status: undefined undefined
2020-06-24T10:01:50.541Z | connectivity_state | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.542Z | subchannel | 127.0.0.1:2113 IDLE -> CONNECTING
2020-06-24T10:01:50.542Z | pick_first | CONNECTING -> CONNECTING
2020-06-24T10:01:50.543Z | resolving_load_balancer | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.543Z | channel | Pick result: QUEUE subchannel: undefined status: undefined undefined
2020-06-24T10:01:50.544Z | connectivity_state | dns:localhost:2113 CONNECTING -> CONNECTING
2020-06-24T10:01:50.547Z | subchannel | 127.0.0.1:2113 CONNECTING -> READY
2020-06-24T10:01:50.547Z | pick_first | Pick subchannel with address 127.0.0.1:2113
2020-06-24T10:01:50.548Z | pick_first | CONNECTING -> READY
2020-06-24T10:01:50.548Z | resolving_load_balancer | dns:localhost:2113 CONNECTING -> READY
2020-06-24T10:01:50.549Z | channel | Pick result: COMPLETE subchannel: 127.0.0.1:2113 status: undefined undefined
2020-06-24T10:01:50.550Z | connectivity_state | dns:localhost:2113 CONNECTING -> READY
2020-06-24T10:01:50.551Z | subchannel | 127.0.0.1:2113 refcount 2 -> 3
2020-06-24T10:01:50.551Z | subchannel | 127.0.0.1:2113 refcount 3 -> 2
2020-06-24T10:01:50.553Z | subchannel | Starting stream with headers
authorization: Basic YWRtaW46Y2hhbmdlaXQ=
grpc-accept-encoding: identity,deflate,gzip
accept-encoding: identity,gzip
:authority: localhost:2113
user-agent: grpc-node-js/1.1.1
content-type: application/grpc
:method: POST
:path: /event_store.client.projections.Projections/Statistics
te: trailers
2020-06-24T10:01:50.553Z | call_stream | [0] attachHttp2Stream from subchannel 127.0.0.1:2113
2020-06-24T10:01:50.554Z | subchannel | 127.0.0.1:2113 callRefcount 0 -> 1
2020-06-24T10:01:50.555Z | call_stream | [0] sending data chunk of length 5 (deferred)
2020-06-24T10:01:50.555Z | call_stream | [0] calling end() on HTTP/2 stream
2020-06-24T10:01:50.559Z | call_stream | [0] ended with status: code=14 details=“Connection dropped”
2020-06-24T10:01:50.560Z | subchannel | 127.0.0.1:2113 callRefcount 1 -> 0
2020-06-24T10:01:50.564Z | subchannel | 127.0.0.1:2113 READY -> IDLE
2020-06-24T10:01:50.564Z | subchannel | 127.0.0.1:2113 refcount 2 -> 1
2020-06-24T10:01:50.565Z | pick_first | READY -> IDLE
2020-06-24T10:01:50.566Z | resolving_load_balancer | dns:localhost:2113 READY -> IDLE
2020-06-24T10:01:50.566Z | connectivity_state | dns:localhost:2113 READY -> IDLE
2020-06-24T10:01:50.567Z | call_stream | [0] HTTP/2 stream closed with code 8
17:01:50 ERROR (…/…/node_modules/@grpc/grpc-js/src/call.ts:81 in callErrorFromStatus) : 14 UNAVAILABLE: Connection dropped (environment=local, errorDetails=“Unhandled rejection”)
Unhandled rejection
2020-06-24T10:02:00.540Z | subchannel | 127.0.0.1:2113 refcount 1 -> 0
2020-06-24T10:02:00.543Z | subchannel | 127.0.0.1:2113 IDLE -> TRANSIENT_FAILURE
2020-06-24T10:02:00.546Z | subchannel | 127.0.0.1:2113 TRANSIENT_FAILURE -> IDLE