-
-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Milestone
Description
ArcadeDB Version: v21.9.1-SNAPSHOT
JDK Version: openjdk version "11.0.2" 2019-01-15
OS: macOS Mojave v.10.14.6
Expected behavior
Console must connect to a remote database
Actual behavior
Console returns the following error:
WARNI [RemoteDatabase] Error on executing command, retrying... (payload=Not Found, error=org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1])
Error: A JSONObject text must begin with '{' at 1 [character 2 line 1]
Steps to reproduce
- Start the server (server.sh)
- Create a database (via Studio)
- Start the console (console.sh)
- Try to connect to the remote database:
> connect remote:127.0.0.1/ciaone root ciaone1234
connect remote:127.0.0.1/ciaone root ciaone1234
2021-09-03 07:52:03.952 WARNI [RemoteDatabase] Error on executing command, retrying... (payload=Not Found, error=org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1])
Error: A JSONObject text must begin with '{' at 1 [character 2 line 1]
>
The problem is that Console doesn't use the API version prefix. It tries to connect to the URL http://127.0.0.1:2480/server instead of http://127.0.0.1:2480/api/v1/server.
See:
| String url = protocol + "://" + connectToServer.getFirst() + ":" + connectToServer.getSecond() + "/" + operation; |
and:
| routes.addPrefixPath("/api/v1",// |
At the moment, the fix is trivial, but we should find a way to sync the API version among the projects to avoid a similar problem in the future.
Reactions are currently unavailable