Averell
03/31/2022, 4:16 AMgrpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "upstream connect error or disconnect/reset before headers. reset reason: protocol error" debug_error_string = "{"created":"@1648544039.239355713","description":"Error received from peer ipv4:172.20.8.123:3030","file":"src/core/lib/surface/call.cc","file_line":903,"grpc_message":"upstream connect error or disconnect/reset before headers. reset reason: protocol error","grpc_status":14}" >
From within the dagit pod, I could telnet to the deployment k8s service (telnet my_user_app_deployment_name 3030
--> connected
).
May I get help on this issue?
Thanks a lot.daniel
03/31/2022, 2:25 PMAverell
03/31/2022, 8:58 PM/usr/local/lib/python3.7/site-packages/dagster/core/workspace/context.py:560: UserWarning: Error loading repository location user-code-example:dagster.core.errors.DagsterUserCodeUnreachableError: Could not reach user code server
Stack Trace:
File "/usr/local/lib/python3.7/site-packages/dagster/core/workspace/context.py", line 555, in _load_location
location = self._create_location_from_origin(origin)
File "/usr/local/lib/python3.7/site-packages/dagster/core/workspace/context.py", line 481, in _create_location_from_origin
return origin.create_location()
File "/usr/local/lib/python3.7/site-packages/dagster/core/host_representation/origin.py", line 291, in create_location
return GrpcServerRepositoryLocation(self)
File "/usr/local/lib/python3.7/site-packages/dagster/core/host_representation/repository_location.py", line 526, in __init__
list_repositories_response = sync_list_repositories_grpc(self.client)
File "/usr/local/lib/python3.7/site-packages/dagster/api/list_repositories.py", line 19, in sync_list_repositories_grpc
api_client.list_repositories(),
File "/usr/local/lib/python3.7/site-packages/dagster/grpc/client.py", line 164, in list_repositories
res = self._query("ListRepositories", api_pb2.ListRepositoriesRequest)
File "/usr/local/lib/python3.7/site-packages/dagster/grpc/client.py", line 110, in _query
raise DagsterUserCodeUnreachableError("Could not reach user code server") from e
The above exception was caused by the following exception:
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "upstream connect error or disconnect/reset before headers. reset reason: protocol error"
debug_error_string = "{"created":"@1648716422.905634674","description":"Error received from peer ipv4:172.20.39.151:3030","file":"src/core/lib/surface/call.cc","file_line":903,"grpc_message":"upstream connect error or disconnect/reset before headers. reset reason: protocol error","grpc_status":14}"
>
Stack Trace:
File "/usr/local/lib/python3.7/site-packages/dagster/grpc/client.py", line 107, in _query
response = getattr(stub, method)(request_type(**kwargs), timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
location_name=location_name, error_string=error.to_string()
daniel
03/31/2022, 8:58 PMAverell
03/31/2022, 9:01 PMdaniel
03/31/2022, 9:02 PMAverell
03/31/2022, 9:03 PM2022-03-30 01:48:43 +0000 - dagster.code_server - INFO - Started Dagster code server for package analytx on port 3030 in process 1
telnet
to test onlydaniel
03/31/2022, 9:05 PMdagster api grpc-health-check
command that you could run on the dagit pod - e.g. dagster api grpc-health-check -p 4000
. It will raise an error if there's an issue connecting to the gRPC server on that port, and return cleanly if its able to connectAverell
03/31/2022, 9:11 PMroot@dagster-dagit-76d57b9598-vvdpn:/# nslookup
> k8s-swyftx-user-app
Server: 172.20.0.10
Address: 172.20.0.10#53
Name: k8s-swyftx-user-app.dagster.svc.cluster.local
Address: 172.20.39.151
>
root@dagster-dagit-76d57b9598-vvdpn:/# telnet k8s-swyftx-user-app 3030
Trying 172.20.39.151...
Connected to k8s-swyftx-user-app.dagster.svc.cluster.local.
Escape character is '^]'.
^C
Connection closed by foreign host.
root@dagster-dagit-76d57b9598-vvdpn:/# ^C
root@dagster-dagit-76d57b9598-vvdpn:/# dagster api grpc-health-check -h k8s-swyftx-user-app -p 3030
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "upstream connect error or disconnect/reset before headers. reset reason: protocol error"
debug_error_string = "{"created":"@1648761065.717335601","description":"Error received from peer ipv4:172.20.39.151:3030","file":"src/core/lib/surface/call.cc","file_line":903,"grpc_message":"upstream connect error or disconnect/reset before headers. reset reason: protocol error","grpc_status":14}"
>
root@dagster-dagit-76d57b9598-vvdpn:/#
daniel
03/31/2022, 9:15 PMAverell
03/31/2022, 9:15 PMdaniel
03/31/2022, 9:19 PMAverell
03/31/2022, 9:20 PMdaniel
03/31/2022, 9:21 PMAverell
03/31/2022, 9:21 PMdaniel
03/31/2022, 9:23 PMAverell
03/31/2022, 9:25 PMdaniel
03/31/2022, 9:27 PMAverell
03/31/2022, 9:27 PMgrpc
instead of http
.
https://github.com/dagster-io/dagster/blob/3b55c4e864775b7a70ed8ff539629317a120250[…]ter/charts/dagster-user-deployments/templates/service-user.yaml
After having changed this, my dagit pod could connect to the dagster-app service. I'm not sure whether this service port name is something agreed globally, or it's only an Istio implementation.daniel
04/14/2022, 4:36 PMDagster Bot
04/14/2022, 4:37 PMAverell
04/14/2022, 4:41 PMpod_template_spec_metadata
?