MontrealCorpusTools / PolyglotDB

Language data store and linguistic query API
MIT License
36 stars 13 forks source link

(bug) pgdb install, dependency download "Connection reset by peer" even when dependencies present in environment #173

Open michaelhaaf opened 2 years ago

michaelhaaf commented 2 years ago

Everything in the "Conda development environment" instruction set (https://polyglotdb.readthedocs.io/en/latest/getting_started.html#conda-development-environment) work until the pgdb install command. There's a bug in the process where the pgdb script doesn't recognize that neo4j and influxdb have already been downloaded -- and then it has issues trying to download the packages itself.

Edit: I misunderstood the problem -- the python interface packages are downloaded automatically using the conda, development environment, but the services neo4j and influxdb themselves need to be installed separately still. The pgdb install script works normally on my home machine (Ubuntu 20.04) but not on roquefort (Ubuntu 18.04).

A couple tweaks to how the dependency installs are verified should fix this. Additionally, resolving the existing move to condaforge will also resolve this problem.

Edit: see above edit. My new hypothesis is that this is a network issue (something where https requests from cs.mcgill.ca are not accepted by the neo4j servers)

Expected Behavior (home system, Ubuntu 20.04)

(polyglotdb-dev) [michael@home PolyglotDB]$ pgdb install
No install directory was specified, so required files will be installed to /home/michael/.pgdb/data. Is that okay? (Y/N)y
Downloading Neo4j...
130MB [00:04, 30.9MB/s]                                                                                                                                                     
Downloading InfluxDB...
(polyglotdb-dev) [michael@home PolyglotDB]$

Buggy Behavior (roquefort, Ubuntu 18.04)

(polyglotdb-dev) [mhaaf@roquefort PolyglotDB]$ pgdb install 
No install directory was specified, so required files will be installed to /home/michael/.pgdb/data. Is that okay? (Y/N)y
Downloading Neo4j...
0.00B [00:00, ?B/s]
Traceback (most recent call last):
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/http/client.py", line 1454, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/home/linguistics/mhaaf/miniconda3/envs/polyglotdb-dev/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
michaelhaaf commented 1 year ago

Hypothesis: /home/linguistics/ is network mounted, past installations have been directly on the harddrive at /data/