[macOS] edgedb server init failure
See original GitHub issueHi EdgeDb team ππ»
Hereβs a small issue that Iβm facing when trying to init a db on macOS Big Sur.
Informations
- EdgeDB Version:
1-alpha7
- OS Version: macOS Big Sur (11.1)
Steps to Reproduce
- Launch
edgedb server init foo_test
Output
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Instance Name β foo_test β
β Mode β User Service β
β Data Directory β /Users/guillaume/Library/Application Support/edgedb/data/foo_test β
β Credentials Path β /Users/guillaume/.edgedb/credentials/foo_test.json β
β Database Server Port β 10702 β
β Default User β edgedb β
β Default Database β edgedb β
β EdgeDB Version β 1.0a7 β
ββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
WARNING 1689 2021-02-04 08:42:43,873 py.warnings: /Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py:598: DeprecationWarning: Option `--bootstrap` is deprecated, use `--bootstrap-only`
warnings.warn(
WARNING 1689 2021-02-04 08:42:56,323 edb.server: terminating connection because of crash of another server process
WARNING 1689 2021-02-04 08:42:56,357 edb.server: server bootstrap did not complete successfully, removing the data directory
======================================== Exception occurred: pg_ctl stop exited with status 1: pg_ctl: directory "/Users/guillaume/Library/Application Support/edgedb/data/foo_test" does not exist
=========================================
2. asyncpg.exceptions.ConnectionDoesNotExistError: connection was closed in the middle of operation
----------------------------------------------------------------------------------------------------------------- Traceback ------------------------------------------------------------------------------------------------------------------
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py, line 324, in run_server
> need_cluster_restart = _init_cluster(cluster, args)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py, line 146, in _init_cluster
> need_restart = asyncio.run(
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/asyncio/runners.py, line 43, in run
> return loop.run_until_complete(main)
uvloop/loop.pyx, line 1456, in uvloop.loop.Loop.run_until_complete
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/bootstrap.py, line 1210, in ensure_bootstrapped
> await _bootstrap(cluster, pgconn, args)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/bootstrap.py, line 1141, in _bootstrap
> std_schema, refl_schema, compiler = await _init_stdlib(
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/bootstrap.py, line 633, in _init_stdlib
> await metaschema._execute_sql_script(conn, tpldbdump.decode('utf-8'))
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/pgsql/metaschema.py, line 3912, in _execute_sql_script
> await conn.execute(sql_text)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/asyncpg/connection.py, line 272, in execute
> return await self._protocol.query(query, timeout)
asyncpg/protocol/protocol.pyx, line 316, in query
asyncpg.exceptions.ConnectionDoesNotExistError: connection was closed in the middle of operation
===================================================================================== During handling of the above exception, another exception occurred =====================================================================================
1. edb.server.pgcluster.ClusterError: pg_ctl stop exited with status 1: pg_ctl: directory "/Users/guillaume/Library/Application Support/edgedb/data/foo_test" does not exist
----------------------------------------------------------------------------------------------------------------- Traceback ------------------------------------------------------------------------------------------------------------------
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/bin/edgedb-server, line 10, in <module>
> sys.exit(main())
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/click/core.py, line 829, in __call__
> return self.main(*args, **kwargs)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/click/core.py, line 782, in main
> rv = self.invoke(ctx)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/click/core.py, line 1066, in invoke
> return ctx.invoke(self.callback, **ctx.params)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/click/core.py, line 610, in invoke
> return callback(*args, **kwargs)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py, line 688, in main
> server_main(**kwargs)
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py, line 677, in server_main
> run_server(ServerConfig(**kwargs))
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/main.py, line 363, in run_server
> cluster.stop()
/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/lib/python3.8/site-packages/edb/server/pgcluster.py, line 516, in stop
> raise ClusterError(
edb.server.pgcluster.ClusterError: pg_ctl stop exited with status 1: pg_ctl: directory "/Users/guillaume/Library/Application Support/edgedb/data/foo_test" does not exist
[2021-02-04T07:43:01Z ERROR edgedb::server::init] Bootstrap error, cleaning up...
[2021-02-04T07:43:01Z ERROR edgedb::server::init] Cannot clean up storage /Users/guillaume/Library/Application Support/edgedb/data/foo_test: No such file or directory (os error 2)
edgedb error: cannot bootstrap /Users/guillaume/Library/Application Support/edgedb/data/foo_test: Command "/Library/Frameworks/EdgeDB.framework/Versions/1-alpha7/lib/edgedb-server-1-alpha7/bin/edgedb-server" "--bootstrap" "--log-level=warn" "--data-dir" "/Users/guillaume/Library/Application Support/edgedb/data/foo_test" exit code: 1
To investigate further, Iβve tried to see how macOS build its internal architecture and hereβs the result:
When launching ls /Users/guillaume/Library
, my directory display both Application Support
and ApplicationSupport
, both have an edgedb
subdirectory with the files in it, Iβm not sure where edgedb must store the files but thereβs probably something related with the issue π€
Thanks for the feedback and have a great day π
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
The CLI β Get Started | EdgeDB Docs
To get started with EdgeDB, the first step is install the edgedb CLI. ... If you encounter a command not found error, you...
Read more >BackendUnavailableError when trying to connect to Fly.io ...
edgedb error : BackendUnavailableError: cannot fetch database version: Postgres is not available: Connection is lost, please check server logΒ ...
Read more >All You Need to Know about EdgeDB - AppSignal Blog
Between the client and EdgeDB server, we have the EdgeDB binary protocol ... First, install EdgeDB and initialize the REST API project.
Read more >EdgeDB (@edgedatabase) / Twitter
If you run a big, messy query in the EdgeDB REPL and get an error, you can press the up arrow to get...
Read more >FATAL ERROR lock file "postmaster.pid" already exists
Since your server is already started, your command: pg_ctl -D /usr/local/var/postgres start. Returns an error, saying that there is a lockΒ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes. Use
--method=docker
when installing:Seems to be nothing actionable left. Closing