Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caller.describe fails with RemoteOmnisci when there is no connection #406

Open
tupui opened this issue Jan 21, 2022 · 0 comments
Open

Caller.describe fails with RemoteOmnisci when there is no connection #406

tupui opened this issue Jan 21, 2022 · 0 comments
Labels
bug Something isn't working enhancement New feature or request heavydb Related to heavydb server

Comments

@tupui
Copy link
Contributor

tupui commented Jan 21, 2022

The following fails if there is no connection to a DB.

If should fail back to, say, local CPU target, or something sensible that reminds the expected output of describe (which would be a LLVM IR string and a note/warning that it may not correspond to the actual result when the target info cannot be retrieved from the server).

from rbc.omniscidb import RemoteOmnisci

omni = RemoteOmnisci()
def farenheight2celcius(f):
    return (f - 32)* 5 / 9

caller = omni('double(double)')(farenheight2celcius)
caller.describe()
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/rbc-dev/lib/python3.9/site-packages/thriftpy2/transport/socket.py", line 96, in open
    self.sock.connect(addr)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/rbc-dev/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3251, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-aad08ddc3c82>", line 1, in <module>
    a.describe()
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/remotejit.py", line 334, in describe
    for device, target_info in self.remotejit.targets.items():
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/remotejit.py", line 576, in targets
    self._targets = self.retrieve_targets()
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/omniscidb.py", line 753, in retrieve_targets
    self.session_id)
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/omniscidb.py", line 313, in session_id
    self._session_id = self.thrift_call('connect', user, pw, dbname)
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/omniscidb.py", line 356, in thrift_call
    return client(Omnisci={name: args})['Omnisci'][name]
  File "/Users/tupui/Documents/Quansight/Projects/Omnisci/rbc/rbc/thrift/client.py", line 197, in __call__
    with ctx as c:
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/rbc-dev/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/rbc-dev/lib/python3.9/site-packages/thriftpy2/rpc.py", line 129, in client_context
    transport.open()
  File "thriftpy2/transport/buffered/cybuffered.pyx", line 34, in thriftpy2.transport.buffered.cybuffered.TCyBufferedTransport.open
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/rbc-dev/lib/python3.9/site-packages/thriftpy2/transport/socket.py", line 103, in open
    raise TTransportException(
thriftpy2.transport.base.TTransportException: TTransportException(type=1, message="Could not connect to ('192.168.8.117', 6274)")
@tupui tupui added bug Something isn't working enhancement New feature or request heavydb Related to heavydb server labels Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request heavydb Related to heavydb server
Projects
None yet
Development

No branches or pull requests

1 participant