Skip to content

Snowflake doesn't start up #1000

@jaclark5

Description

@jaclark5

Describe the bug
When I tried to start up a snowflake server it failed. Note that this was a bit of a journey so the subsequent PR includes changes to help with debugging:

  1. I didn't realize my Postgres server was too old
  2. LC_ALL was an empty env variable

To Reproduce

from qcfractal.snowflake import FractalSnowflake
snowflake = FractalSnowflake()

Expected behavior
Expect snowflake server to start up

Additional context

 ---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[1], line 21
     19 #qc_client = qcportal.PortalClient(ADDRESS, cache_dir=".")
     20 from qcfractal.snowflake import FractalSnowflake
---> 21 snowflake = FractalSnowflake()
     22 client = snowflake.client()

File ~/bin/QCFractal/qcfractal/qcfractal/snowflake.py:82, in FractalSnowflake.__init__(self, start, compute_workers, database_config, extra_config, host, tmpdir_parent)
     79 if database_config is None:
     80     # db and socket are subdirs of the base temporary directory
     81     db_dir = os.path.join(self._tmpdir, "db")
---> 82     self._pg_harness = create_snowflake_postgres(host, db_dir)
     83     self._pg_harness.create_database(True)
     84     db_config = self._pg_harness.config

File ~/bin/QCFractal/qcfractal/qcfractal/postgres_harness.py:681, in create_snowflake_postgres(host, data_dir)
    679 config = DatabaseConfig(**db_config)
    680 pg_harness = PostgresHarness(config)
--> 681 pg_harness.initialize_postgres()
    682 return pg_harness

File ~/bin/QCFractal/qcfractal/qcfractal/postgres_harness.py:580, in PostgresHarness.initialize_postgres(self)
    577 psql_conf_path.write_text(psql_conf)
    579 # Start the postgres instance
--> 580 self.start()
    581 self._logger.info("Postgresql instance successfully initialized and started")

File ~/bin/QCFractal/qcfractal/qcfractal/postgres_harness.py:456, in PostgresHarness.start(self)
    448 err_msg = (
    449     "Error starting PostgreSQL. Did you remember to initialize it (qcfractal-server init)?"
    450     f"\noutput:\n{stdout}\nstderr:\n{stderr}"
    451     f"\nlogfile: {logfile}"
    452     f"\nlog tail:\n{log_tail}"
    453 )
    455 if retcode != 0:
--> 456     raise RuntimeError(err_msg)
    457 if not (("server started" in stdout) or ("server starting" in stdout)):
    458     raise RuntimeError(err_msg)

RuntimeError: Error starting PostgreSQL. Did you remember to initialize it (qcfractal-server init)?
output:
waiting for server to start.... stopped waiting

stderr:
pg_ctl: could not start server
Examine the log output.

logfile: /var/folders/dr/9nnhm1493kv7_s9r_wj_l_jm0000gn/T/tmp8x7mxbyz/db/qcfractal_database.log
log tail:
2026-04-06 11:47:08.547 EDT [84645] LOG:  starting PostgreSQL 15.17 (Homebrew) on aarch64-apple-darwin24.6.0, compiled by Apple clang version 17.0.0 (clang-1700.6.3.2), 64-bit
2026-04-06 11:47:08.548 EDT [84645] LOG:  listening on IPv6 address "::1", port 55290
2026-04-06 11:47:08.548 EDT [84645] LOG:  listening on IPv4 address "127.0.0.1", port 55290
2026-04-06 11:47:08.548 EDT [84645] LOG:  listening on Unix socket "/var/folders/dr/9nnhm1493kv7_s9r_wj_l_jm0000gn/T/tmp8x7mxbyz/db/sock/.s.PGSQL.55290"
2026-04-06 11:47:08.549 EDT [84645] FATAL:  postmaster became multithreaded during startup
2026-04-06 11:47:08.549 EDT [84645] HINT:  Set the LC_ALL environment variable to a valid locale.
2026-04-06 11:47:08.549 EDT [84645] LOG:  database system is shut down

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions