surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.06k stars 81 forks source link

ERROR surreal::cli: Couldn't open the specified file: Address already in use (os error 98) #185

Closed micisse closed 5 months ago

micisse commented 5 months ago

Describe the bug Hello, to use Surrealist, I already have a server running from a terminal. In one of the previous versions, this wasn't a problem, but since the update, it's impossible to connect Surrealist to the server launched from the terminal. In the new version, Surrealist creates a new server and creates a PORT conflict.

Capture d’écran_2024-03-19_18-18-33

To Reproduce Steps to reproduce the behavior:

  1. Start server on terminal with surreal start --allow-all -u root -p root file:///<file_path> (I use file, not memory)
  2. Try to connect Surrealist to localhost:8000
  3. See error in console Capture d’écran_2024-03-19_18-18-49

Expected behavior Surrealist must also be able to connect to an existing server, not create a new one.

Environment (you can view the current version under Settings):

macjuul commented 5 months ago

The start and console buttons in the top right of the interface will spin up a server in the same way you would do via the terminal. It exists as an easy way to launch a localhost SurrealDB instance without having to use the terminal, and is separate from the concept of connecting.

Because of this you should avoid launching SurrealDB from the interface and terminal at the same time, as it could indeed try binding to the same port and fail. When you are running SurrealDB from the terminal, you should be able to connect to it from Surrealist just like you would when launching it from the interface