edgedb-cli icon indicating copy to clipboard operation
edgedb-cli copied to clipboard

Installation error on Mac Mojave 10.14 - first try of edgedb

Open leonh opened this issue 4 years ago • 10 comments

Mac:edgedb leon$ edgedb server init tutorial
┌──────────────────────┬──────────────────────────────────────────────────────────────┐
│ Instance Name        │ tutorial                                                     │
│ Mode                 │ User Service                                                 │
│ Data Directory       │ /Users/leon/Library/Application Support/edgedb/data/tutorial │
│ Credentials Path     │ /Users/leon/.edgedb/credentials/tutorial.json                │
│ Database Server Port │ 10700                                                        │
│ Default User         │ edgedb                                                       │
│ Default Database     │ edgedb                                                       │
│ EdgeDB Version       │ 1.0a3                                                        │
└──────────────────────┴──────────────────────────────────────────────────────────────┘
[2021-03-11T13:08:14Z ERROR edgedb::server::init] Bootstrap error, cleaning up...
edgedb error: cannot bootstrap /Users/leon/Library/Application Support/edgedb/data/tutorial: Failed running "/Library/Frameworks/EdgeDB.framework/Versions/1-alpha3/lib/edgedb-server-1-alpha3/bin/edgedb-server" "--bootstrap-only" "--log-level=warn" "--data-dir" "/Users/leon/Library/Application Support/edgedb/data/tutorial": No such file or directory (os error 2)


Steps to Reproduce:

  1. follow tutorial on https://www.edgedb.com/docs/tutorial/install
  2. curl https://sh.edgedb.com --proto '=https' -sSf1 | sh
  3. edgedb server init tutorial (see results above)
  4. cd /Users/leon/Library/Application\ Support/edgedb/data (this works with the backslash in the path)
  5. cd /Users/leon/Library/"Application Support"/edgedb/data (this works)
  6. cd /Users/leon/Library/Application Support/edgedb/data (doesn't work)

leonh avatar Mar 11 '21 13:03 leonh

@tailhook, why is a3 being installed here?

elprans avatar Mar 11 '21 17:03 elprans

I ran curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh

as suggested in the install docs.

leonh avatar Mar 11 '21 17:03 leonh

@leonh, did you run edgedb server install after or eddgedb server init tutorial directly after running the curl command?

elprans avatar Mar 11 '21 17:03 elprans

first shell window.

Mac:envs leon$ curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
info: downloading installer

Welcome to EdgeDB!

This will install the official EdgeDB command-line tools.

The `edgedb` binary will be placed in the user bin directory located at:

  /Users/leon/.edgedb/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /Users/leon/.profile
  /Users/leon/.bash_profile


┌──────────────────────┬───────────────────────────┐
│ Installation Path    │ /Users/leon/.edgedb/bin   │
│ Modify PATH Variable │ yes                       │
│ Profile Files        │ /Users/leon/.profile      │
│                      │ /Users/leon/.bash_profile │
└──────────────────────┴───────────────────────────┘
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1
# The EdgeDB command-line tool is now installed!

We've updated your shell profile to have /Users/leon/.edgedb/bin in your `PATH`
environment variable. Next time you open the terminal it will be configured
automatically.

For this session please run:
  source /Users/leon/.edgedb/env

To install the EdgeDB server component locally run:
  edgedb server install
Mac:envs leon$ edgedb server install
-bash: edgedb: command not found

then opened a new shell...

Mac:edgedb leon$ edgedb server install
EdgeDB 1-alpha3 (1.0a3) is already installed. Use `edgedb server upgrade` for upgrade.
Mac:edgedb leon$ edgedb server upgrade
Mac:edgedb leon$ edgedb
Connecting to an EdgeDB instance at localhost:5656...
^C
Mac:edgedb leon$ edgedb server init tutorial
┌──────────────────────┬──────────────────────────────────────────────────────────────┐
│ Instance Name        │ tutorial                                                     │
│ Mode                 │ User Service                                                 │
│ Data Directory       │ /Users/leon/Library/Application Support/edgedb/data/tutorial │
│ Credentials Path     │ /Users/leon/.edgedb/credentials/tutorial.json                │
│ Database Server Port │ 10700                                                        │
│ Default User         │ edgedb                                                       │
│ Default Database     │ edgedb                                                       │
│ EdgeDB Version       │ 1.0a3                                                        │
└──────────────────────┴──────────────────────────────────────────────────────────────┘
[2021-03-11T13:02:06Z ERROR edgedb::server::init] Bootstrap error, cleaning up...
edgedb error: cannot bootstrap /Users/leon/Library/Application Support/edgedb/data/tutorial: Failed running "/Library/Frameworks/EdgeDB.framework/Versions/1-alpha3/lib/edgedb-server-1-alpha3/bin/edgedb-server" "--bootstrap-only" "--log-level=warn" "--data-dir" "/Users/leon/Library/Application Support/edgedb/data/tutorial": No such file or directory (os error 2)

leonh avatar Mar 12 '21 13:03 leonh

This seems to be very similar to #269. Do this:

edgedb server uninstall --version 1-alpha3
edgedb server install --version 1-beta1
edgedb server init

elprans avatar Mar 12 '21 17:03 elprans

this is what is happend...

Mac:envs leon$ edgedb server uninstall --version 1-alpha3
The following commands will be run with elevated privileges using sudo:
    sudo rm -rf /Library/Frameworks/EdgeDB.framework /Library/LaunchDaemons/com.edgedb.edgedb-server-1-alpha3.plist
    sudo pkgutil --forget com.edgedb.edgedb-server-1-alpha3
Depending on system settings sudo may now ask you for your password...
Password:
Forgot package 'com.edgedb.edgedb-server-1-alpha3' on '/'.
Mac:envs leon$ edgedb server install --version 1-beta1
┌─────────────────────┬───────────────────────┬───────────────────┐
│ Installation method │ Native System Package │ --method=package  │
│ Major version       │ 1-beta1               │ --version=1-beta1 │
│ Exact version       │ 1.0b1-2021030102      │                   │
└─────────────────────┴───────────────────────┴───────────────────┘
The following commands will be run with elevated privileges using sudo:
    sudo _EDGEDB_INSTALL_SKIP_BOOTSTRAP=1 installer -package /var/folders/90/9bk7zgx57cqcrlwvph3d42j00000gn/T/.tmp96rwa4/edgedb-server-1-beta1_1.0b1_2021030102.pkg -target /
Depending on system settings sudo may now ask you for your password...
installer: Package name is EdgeDB
installer: Upgrading at base path /
installer: The upgrade was successful.

Edgedb server is installed now. Great!
Initialize and start a new database instance with:
  edgedb server init <instance-name>
Mac:envs leon$ edgedb server init
error: The following required arguments were not provided:
    <name>

USAGE:
    edgedb server init <name> --start-conf <start-conf> --default-database <default-database> --default-user <default-user>

For more information try --help
Mac:envs leon$ edgedb server init tutorial
┌──────────────────────┬──────────────────────────────────────────────────────────────┐
│ Instance Name        │ tutorial                                                     │
│ Mode                 │ User Service                                                 │
│ Data Directory       │ /Users/leon/Library/Application Support/edgedb/data/tutorial │
│ Credentials Path     │ /Users/leon/.edgedb/credentials/tutorial.json                │
│ Database Server Port │ 10700                                                        │
│ Default User         │ edgedb                                                       │
│ Default Database     │ edgedb                                                       │
│ EdgeDB Version       │ 1.0b1                                                        │
└──────────────────────┴──────────────────────────────────────────────────────────────┘
/Users/leon/Library/LaunchAgents/com.edgedb.edgedb-server-tutorial.plist: service already loaded
[2021-03-12T18:00:16Z ERROR edgedb::server::init] Bootstrap error, cleaning up...
edgedb error: cannot bootstrap /Users/leon/Library/Application Support/edgedb/data/tutorial: cannot establish connection for 30s: No such file or directory (os error 2)

leonh avatar Mar 12 '21 18:03 leonh

Looks to me like setting Data Directory as /Users/leon/Library/"Application Support"/edgedb/data/tutorial would help?

leonh avatar Mar 12 '21 18:03 leonh

Looks to me like setting Data Directory as /Users/leon/Library/"Application Support"/edgedb/data/tutorial would help?

No. Quoting is not a problem here. The "No such file or directory (os error 2)" is actually because edgedb socket was not found (and it should be in /Users/leon/.edgedb/run so no spaces here). I think this is because edgedb is slow to start or something more serious is going on.

Can you look at: /Users/leon/.edgedb/logs/tutorial.log?

tailhook avatar Mar 12 '21 18:03 tailhook

directory /Users/leon/.edgedb/logs/ exists but it is empty

/Users/leon/.edgedb/config/instance_ports.json

{ "tutorial": 10700 }

leonh avatar Mar 13 '21 09:03 leonh

This looks like socket length issue that was made more visible long time ago, and #626 should make it a non-issue except for quite long user+instance names.

tailhook avatar Jan 12 '22 14:01 tailhook