This is a repeated problem on my Mac OS Catalina (10.15.7). I haven't tried other architectures. On the Linux cluster the package works very well as installed, but I believe that's a TCP connection. (I don't know anything about Postgres, such as whether the default protocol is expected to be TCP.)
To Reproduce
This is the error I get using qcfractal 0.15.6 and the default environment in the quickstart notebook in #695, but with +chardet, +importlib_resources, and with qcelemental 0.22.0 instead of 0.23.0.
>>> server = FractalSnowflakeHandler()
(from printing stderr)
createdb: error: could not connect to database template1: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.49462"?
The command is ['/Users/lily/anaconda3/envs/snowflake/bin/createdb', '-p', '49462'].
Expected behavior
Additional context
If I hack PostgresHarnes._run to pass in localhost, it switches to Unix sockets.
def _run(self, commands):
+ command_str = " ".join(list(map(str, commands)))
+ if (any(x in command_str for x in ["-p ", "--port="])
+ and not any(x in command_str for x in ["-h ", "--host="])):
+ commands.extend(["-h", "127.0.0.1"])
proc = subprocess.run(commands, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout = proc.stdout.decode()
if not self.quiet:
self.logger(stdout)
ret = {"retcode": proc.returncode, "stdout": stdout, "stderr": proc.stderr.decode()}
return ret
Describe the bug
This is a repeated problem on my Mac OS Catalina (10.15.7). I haven't tried other architectures. On the Linux cluster the package works very well as installed, but I believe that's a TCP connection. (I don't know anything about Postgres, such as whether the default protocol is expected to be TCP.)
To Reproduce
This is the error I get using qcfractal 0.15.6 and the default environment in the quickstart notebook in #695, but with +chardet, +importlib_resources, and with qcelemental 0.22.0 instead of 0.23.0.
(from printing stderr)
The command is
['/Users/lily/anaconda3/envs/snowflake/bin/createdb', '-p', '49462']
.Expected behavior
Additional context
If I hack PostgresHarnes._run to pass in localhost, it switches to Unix sockets.
https://github.com/MolSSI/QCFractal/blob/867b1bc9c87ae4be37d9656d95a7bd308b7b79a3/qcfractal/postgres_harness.py#L41-L49