Troubleshooting the R Client
This guide covers troubleshooting the R client. See Develop an R Client Query and R Client Overview for the basicis of installing and using the Deephaven R client.
Timeouts
During the creation of the SessionManager
object, three network connections are made
in the order indicated below.
- Download the
connection.json
file from the provided URL. (This is a temporary connection that only lives while getting the file.) - Connect to the Deephaven Enterprise Authentication service.
- Connect to the Deephaven Enterprise Controller service.
The connections to Authentication and Controller are made based on the
information downloaded from connection.json
. These two connections
are maintained for as long as the SessionManager
object is valid.
All three operations must succeed for SessionManager
to be properly initialized or an error results. When experiencing connectivity issues, or if the information contained in the connection.json
file downloaded is wrong, you may see an error similar to:
Error: std::string deephaven_enterprise::utility::GetUrl(const string&)@/opt/deephaven/src/iris/DhcInDhe/cpp-client/utility/src/net.cc:121: Timeout was reached
Deephaven clients use gRPC, an open-source RPC framework from Google, to communicate with Deephaven servers. gRPC treats network errors as potentially temporary and uses a timeout model for network failures. This means that if the host address is incorrect or the server is down, the connection attempt does not fail immediately. Instead, gRPC keeps trying to connect, assuming that a new host name registration may appear or the server may restart and make the port available.
If the network issue is not resolved before the timeout window expires, the connection attempt fails and an error is returned.
Treating network connectivity issues as potentially temporary failures helps make the deployed infrastructure, clients, and servers more resilient. However, from a user's perspective, if there is a network failure, it may appear that the client is unresponsive for two minutes before an error occurs.
Important
The default timeout used by Deephaven in its clients is 2 minutes.
Tip
To help debug network and connectivity issues, set the GRPC_VERBOSITY
environment variable before starting an R session. The possible values are info
and debug
, with debug
providing more detailed, but noisier, output.
Setting GRPC_VERBOSITY
will print details of the gRPC
connection establishment, including SSL authentication and certificate validation, to the standard output.