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

Nzpy hangs if backend sends notice just after handshake completion #39

Closed
shabbir10july opened this issue Jan 20, 2021 · 0 comments
Closed

Comments

@shabbir10july
Copy link
Contributor

It is observed that in some cases, nzpy hangs if backend sends notice just after handshake completion. For e.g: due to some issue in system, a notice is sent everytime nzsql is fired.

[nz@ipshost-0 nzbatchbnr_test]$ nzsql -l
NOTICE:  SET PATH: unable to locate the schema / database 'SQLEXT'
  List of databases
   DATABASE   | OWNER
--------------+-------
 SYSTEM       | ADMIN
 TPCDS100_BNR | ADMIN
(2 rows)

stacktrace of nzpy:

  File "/nz/export/nzscratch_dir/nzbatchbnr_test/nzbatchbnrUtil.py", line 18, in getConn
    return nzpy.connect(user="admin",password="password",host="localhost",port=5480, database=f"{dbname}")
  File "/usr/local/lib/python3.6/site-packages/nzpy/__init__.py", line 50, in connect
    application_name, max_prepared_statements, datestyle, logLevel, tcp_keepalive,char_varchar_encoding, logOptions)
  File "/usr/local/lib/python3.6/site-packages/nzpy/core.py", line 1515, in __init__
    response = hs.startup(database, securityLevel, user, password)
  File "/usr/local/lib/python3.6/site-packages/nzpy/handshake.py", line 96, in startup
    if not self.conn_connection_complete(self._sock.read):
  File "/usr/local/lib/python3.6/site-packages/nzpy/handshake.py", line 527, in conn_connection_complete
    _read(8) # do not use just ignore
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 971, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 833, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 590, in read
    v = self._sslobj.read(len, buffer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant