Skip to content

Console cannot connect to remote database #27

@giastfader

Description

@giastfader

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

  1. Start the server (server.sh)
  2. Create a database (via Studio)
  3. Start the console (console.sh)
  4. 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:

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions