eWaterCycle / eWaterCycle/ewatercycle-hype

GRPC server is down when running the `model.ipynb`

Open
#3 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The GRPC server is down when running the `Hype` model (see the code and the error message below).
```py
model.initialize(cfg_file)

---------------------------------------------------------------------------
_InactiveRpcError Traceback (most recent call last)
Cell In[8], line 1
----> 1 model.initialize(cfg_file)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/ewatercycle/base/model.py:168, in eWaterCycleModel.initialize(self, config_file)
162 def initialize(self, config_file: str) -> None:
163 """Initialize the model.
164
165 Args:
166 config_file: Name of initialization file.
167 """
--> 168 self._bmi.initialize(config_file)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc4bmi/bmi_optionaldest.py:49, in OptionalDestBmi.initialize(self, config_file)
48 def initialize(self, config_file: Optional[str]) -> None:
---> 49 return self.origin.initialize(config_file)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc4bmi/bmi_memoized.py:57, in MemoizedBmi.initialize(self, filename)
55 def initialize(self, filename):
56 self.cache = dict()
---> 57 return self.origin.initialize(filename)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc4bmi/bmi_grpc_client.py:101, in BmiClient.initialize(self, filename)
99 return self.stub.initialize(bmi_pb2.InitializeRequest(config_file=fname))
100 except grpc.RpcError as e:
--> 101 handle_error(e)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc4bmi/bmi_grpc_client.py:99, in BmiClient.initialize(self, filename)
97 fname = "" if filename is None else filename
98 try:
---> 99 return self.stub.initialize(bmi_pb2.InitializeRequest(config_file=fname))
100 except grpc.RpcError as e:
101 handle_error(e)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc/_channel.py:1161, in _UnaryUnaryMultiCallable.__call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
1146 def __call__(
1147 self,
1148 request: Any,
(...)
1153 compression: Optional[grpc.Compression] = None,
1154 ) -> Any:
1155 (
1156 state,
1157 call,
1158 ) = self._blocking(
1159 request, timeout, metadata, credentials, wait_for_ready, compression
1160 )
-> 1161 return _end_unary_response_blocking(state, call, False, None)

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/grpc/_channel.py:1004, in _end_unary_response_blocking(state, call, with_call, deadline)
1002 return state.response
1003 else:
-> 1004 raise _InactiveRpcError(state)

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2023-11-03T10:12:17.896994836+01:00", grpc_status:14, grpc_message:"Socket closed"}"
>
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure in model.ipynb at model.initialize(cfg_file), then trace the Hype model’s gRPC server startup and connection handling using the traceback. Done means initialization completes without StatusCode.UNAVAILABLE (“Socket closed”) and the notebook can proceed.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, jupyter-notebook, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.