Connecting to a remote server



I tried to run one of the examples on a remote server:

I changed the file a bit, because it checks to see if there is a local server.

However, I get the following stacktrace when running the example:

Is it at all possible to connect to a remote server?

Best regards,


Hi Jeroen,

Thanks for testing out Grakn!

We suspect that this has something to do with your server setup. Specifically that the file has an internally pointing storage.hostname. Would you be able to check the configuration file (or send it to us) so that we can confirm this?

Let us know how it turns out.



Hi Alex,

Thanks for your reply. I downloaded Grakn, and started the server. I haven’t touched anything. Then from another server, I tried connecting to it using the Java example I showed.
I know it’s running, because I can open the web UI.



Internally, the Grakn client retrieves its properties from the server. The default configuration tries to access the storage backend on localhost ( and because Grakn is not running locally, you see the error.

Take a look at on the server. You should change the storage.hostname property to be the external IP of the server that you are running Grakn on.



Thanks Alex, this sort of works. I did have to change cassandra.yml as well, so it doens’t listen on localhost only.


Great! Glad it worked out. We’ll make a note of this in our documentation as well.


We should make sure that you should only change the configuration at one place, perhaps, guys? @filipe @alex?
And yes, we should add this to docs, @stichbury

Glad it worked @jeroen! Let us know if you need any help! :slight_smile:


Indeed. We are in the process of cleaning up the configs and that should be the result of doing so.


Hey everyone,

I’m running grakn-dist-0.16.0 on a remote server, and having a similar problem.

When I tried changing the cassandra.yaml file, it raised other errors (I must say I’m unfamiliar with Cassandra configurations…).

Can you please give me some instructions on what parameters do I need to change, besides storage.hostname in



Got help from @thanh on Slack - if anyone encounters the same problem:

  • Edit ./conf/main/

  • Edit ./conf/cassandra/cassandra.yaml:
    seeds: "EXTERNAL.ip.v4.address"
    broadcast_address: EXTERNAL.ip.v4.address
    listen_address: INTERNAL.ip.v4.address
    rpc_address: INTERNAL.ip.v4.address

  • Access it from the Java API:
    GraknSession session = Grakn.session(“EXTERNAL.ip.v4.address”, keySpaceName);

Performance issues when working from a remote client

Hi everyone,

I have done what IIya posted but when cassandra is starting, the following error is raised; “.Unknown listen_address ‘INTERNAL.ip.v4.address’”.

I’m running grakn-dist-0.16.0 also on a Google Cloud Platform VM.

Is there anything to do before editing those files?




Hi Adrian,

Is that your error verbatim? You need to replace the string ‘INTERNAL.ip.v4.address’ with the internal IP address of the Google Cloud virtual machine.

Also please be aware that your application needs to be in the same network as Grakn in order for this to work.


Hi Thanh,

Sorry, i interpreted that i had to pass some kind of structure that contains the IP, and that it was present by default. Also i tried replacing the IP, but an exception is raised when the engine is starting, i think it is due my application is not in the same network as Grakn. Thanks for the help Thanh.

Well i need this for a demo, to show the potential of Grakn, and it should be accessible online.
Do you have anything in mind to get this working?.
I’m using GCP but also i can use Microsoft Azure. Is creating a VPN a good solution, have you tried it?. I will really appreciate that you can give me this information.


Do you need Grakn accessible via the Java API to clients outside of GCP?
You can run Graql queries from the Dashboard on port 4567.

If accessing via the Java API, we would highly recommend the app is in the same network as Grakn as the app has to access the storage layer directly. I have not tried with a VPN but it should work. You will need to set all the configuration options to the internal IP address.

If you need to access Grakn directly from your PC, you can use the configuration that Ilya provided but you need to open the firewall on port 9160 to your PC’s IP address.

If you would like to talk this through in more detail, feel free to join our Slack channel:


Hi Thanh, indeed, i need Grakn accessible via the Java API to clients outside GCP.
I was able to do queries to the Grakn Dashboard from my PC using SSH port forwarding. I didn’t know about the port 9160.
Thanks for the invite to Slack and the info. I will setup the VPN first (i don’t know much about that) and then i think i will be prepared to discuss the details.