Hanging while trying to open graph with Java API


#1

I’m trying to open up a simple Graph session:

GraknGraph graph = Grakn.session(Grakn.DEFAULT_URI, "grakn").open(GraknTxType.WRITE);

but this command hangs (no exceptions thrown, no error messages, it just won’t finish).

I’m using version 0.16.0 from Homebrew and my pom.xml looks like this

<properties>
    <grakn.version>0.16.0</grakn.version>
</properties>

<dependencies>
    <dependency>
        <groupId>ai.grakn</groupId>
        <artifactId>grakn-graph</artifactId>
        <version>${grakn.version}</version>
    </dependency>
    <dependency>
        <groupId>ai.grakn</groupId>
        <artifactId>titan-factory</artifactId>
        <version>${grakn.version}</version>
    </dependency>
</dependencies>

I can see my graph + query it at localhost:4567, and the graql shell works fine. Any tips?


#2

Hi @robbiejones96,

Can you give us anymore information about your setup?

Are you running grakn on the same machine that you trying to connect with

GraknGraph graph = Grakn.session(Grakn.DEFAULT_URI, "grakn").open(GraknTxType.WRITE);

Can you check that port 9160 is open and in use?

Also can you try connecting to a different keyspace other than “grakn” ?