edgedb / edgedb-cli

The EdgeDB CLI
https://www.edgedb.com/docs/cli/index
Apache License 2.0
166 stars 23 forks source link

Answering "no" to auto-start in `project init` results in stopped instance #679

Closed elprans closed 2 years ago

elprans commented 2 years ago
Log ``` edgedb error: Please answer Y or N > N Checking EdgeDB versions... ┌────────────────────────┬────────────────────────────────────────────┐ │ Project directory │ /home/elvis/tmp/edgedb-testing │ │ Project config │ /home/elvis/tmp/edgedb-testing/edgedb.toml │ │ Schema dir (non-empty) │ /home/elvis/tmp/edgedb-testing/dbschema │ │ Installation method │ portable package │ │ Start configuration │ manual │ │ Version │ 1.0+9ecadfc │ │ Instance name │ edgedb_testing │ └────────────────────────┴────────────────────────────────────────────┘ Version 1.0+9ecadfc is already installed Initializing EdgeDB instance... Applying migrations... Applied m16u26fohqa3nzfwtmw4dzhyhzqqxrkvsezfifguv63jqgeg3syn2q (00001.edgeql) Note: adding first migration disables DDL. More info: https://edgedb.com/p/bare_ddl [edgedb] WARNING 3416008 2022-02-23T13:58:55.961 edb.server: Released an unhealthy pgcon; discard now. [edgedb] ---- Exception occurred ---- [edgedb] [edgedb] 1. ConnectionAbortedError: [edgedb] [edgedb] ---- Traceback ---- [edgedb] [edgedb] /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/server.py, line 1148, in task [edgedb] > await self.introspect_db(dbname) [edgedb] /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/server.py, line 715, in introspect_db [edgedb] > db_config = await self.introspect_db_config(conn) [edgedb] /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/server.py, line 731, in introspect_db_config [edgedb] > result = await conn.parse_execute_json( [edgedb] edb/server/pgcon/pgcon.pyx, line 782, in parse_execute_json [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 732, in _parse_execute_json [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 676, in _parse_execute_to_buf [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 2131, in wait_for_message [edgedb] [edgedb] [edgedb] ConnectionAbortedError: [edgedb] ERROR 3416008 2022-02-23T13:58:55.961 asyncio: Task exception was never retrieved [edgedb] future: .task() done, defined at /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/server.py:1146> exception=ConnectionAbortedError()> [edgedb] ---- Exception occurred: the database system is shutting down ---- [edgedb] [edgedb] 1. edb.server.pgcon.errors.BackendError: the database system is shutting down [edgedb] [edgedb] ---- Traceback ---- [edgedb] [edgedb] /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/connpool/pool.py, line 514, in _connect [edgedb] > conn = await self._connect_cb(block.dbname) [edgedb] /home/elvis/.local/share/edgedb/portable/1.0/lib/python3.10/site-packages/edb/server/server.py, line 326, in _pg_connect [edgedb] > rv = await pgcon.connect( [edgedb] edb/server/pgcon/pgcon.pyx, line 322, in connect [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 277, in _connect [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 273, in edb.server.pgcon.pgcon._connect [edgedb] [edgedb] edb/server/pgcon/pgcon.pyx, line 1759, in connect [edgedb] [edgedb] ```

Instance is left in the stopped state and one has to manually start it.

tailhook commented 2 years ago

Well, this was intentional. You are expected to run start --foreground when start-conf=manual. And also we couldn't start edgedb in any other way when we supported systemd only. So I'm not sure yet if we want to change this.

But it should print instructions instead of just spitting the error log.

1st1 commented 2 years ago

Dupe of https://github.com/edgedb/edgedb-cli/issues/710