[SOLVED] Error while starting GRAQL shell (Ubuntu 16.04)


#1

Able to launch Grakn server successfully but running into this when launching graql shell:

Web Dashboard available at [http://0.0.0.0:4567]
06-06-2017 00:55:34.793 [main] INFO ai.grakn.engine.GraknEngineServer -

06-06-2017 00:55:47.461 [graql-session-0] ERROR ai.grakn.engine.session.GraqlSession - java.lang.IllegalArgumentException: Graph Factory [ai.grakn.factory.TitanInternalFactory] is not valid
at ai.grakn.factory.FactoryBuilder.newFactory(FactoryBuilder.java:101)
at ai.grakn.factory.FactoryBuilder.getGraknGraphFactory(FactoryBuilder.java:82)
at ai.grakn.factory.FactoryBuilder.getFactory(FactoryBuilder.java:62)
at ai.grakn.factory.GraknSessionImpl.configureGraphFactoryRemote(GraknSessionImpl.java:153)
at ai.grakn.factory.GraknSessionImpl.configureGraphFactory(GraknSessionImpl.java:134)
at ai.grakn.factory.GraknSessionImpl.getConfiguredFactory(GraknSessionImpl.java:90)
at ai.grakn.factory.GraknSessionImpl.open(GraknSessionImpl.java:79)
at ai.grakn.engine.session.GraqlSession.refreshGraph(GraqlSession.java:120)
at ai.grakn.engine.session.GraqlSession.lambda$new$48(GraqlSession.java:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at ai.grakn.factory.FactoryBuilder.newFactory(FactoryBuilder.java:99)
… 11 more
Caused by: com.thinkaurelius.titan.core.TitanConfigurationException: Cannot determine local host
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.computeUniqueInstanceId(GraphDatabaseConfiguration.java:1510)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getOrGenerateUniqueInstanceId(GraphDatabaseConfiguration.java:1522)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1434)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
at ai.grakn.factory.TitanInternalFactory.configureGraph(TitanInternalFactory.java:113)
at ai.grakn.factory.TitanInternalFactory.newTitanGraph(TitanInternalFactory.java:88)
at ai.grakn.factory.TitanInternalFactory.buildTinkerPopGraph(TitanInternalFactory.java:84)
at ai.grakn.factory.TitanInternalFactory.buildTinkerPopGraph(TitanInternalFactory.java:60)
at ai.grakn.factory.AbstractInternalFactory.getTinkerPopGraph(AbstractInternalFactory.java:141)
at ai.grakn.factory.AbstractInternalFactory.getTinkerPopGraph(AbstractInternalFactory.java:135)
at ai.grakn.factory.AbstractInternalFactory.getGraph(AbstractInternalFactory.java:110)
at ai.grakn.factory.AbstractInternalFactory.open(AbstractInternalFactory.java:95)
at ai.grakn.factory.SystemKeyspace.loadSystemOntology(SystemKeyspace.java:114)
at ai.grakn.factory.FactoryBuilder.newFactory(FactoryBuilder.java:107)
at ai.grakn.factory.FactoryBuilder.getGraknGraphFactory(FactoryBuilder.java:82)
at ai.grakn.factory.AbstractInternalFactory.getSystemFactory(AbstractInternalFactory.java:80)
at ai.grakn.factory.AbstractInternalFactory.(AbstractInternalFactory.java:74)
at ai.grakn.factory.TitanInternalFactory.(TitanInternalFactory.java:64)
… 16 more
Caused by: java.net.UnknownHostException: ip-172-30-4-49: ip-172-30-4-49: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.computeUniqueInstanceId(GraphDatabaseConfiguration.java:1508)
… 35 more


#2

Hi @cebollo!

Sorry you’re having trouble with the setup! Can you give us more information?

  • are you able to access the Grakn Visualiser on port 4567 in the browser?
  • what Grakn version are you using?
  • have you changed any config files (grakn.properties or cassandra.yaml)?
  • the contents of your /etc/hosts
  • what addresses/ports Grakn/Cassandra are listening: run netstat -ntlp or ss -tln

#3
  • The loading bar appears and loads, but ultimately nothing shows
  • I am using 0.12.1
  • I haven’t changed any config files
  • 127.0.0.1 localhost

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

  • tcp 0 0 127.0.0.1:7199 0.0.0.0:* LISTEN 2673/java
    tcp 0 0 127.0.0.1:43747 0.0.0.0:* LISTEN 2673/java
    tcp 0 0 127.0.0.1:9160 0.0.0.0:* LISTEN 2673/java
    tcp 0 0 127.0.0.1:9042 0.0.0.0:* LISTEN 2673/java
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:7000 0.0.0.0:* LISTEN 2673/java
    tcp6 0 0 :::22 :::* LISTEN -
    tcp6 0 0 :::4567 :::* LISTEN 2935/java

#4

Everything looks to be set up correctly.

Does it work when you specify the URI like this?

./bin/graql.sh -r 127.0.0.1:4567

#5

No errors immediately appear, but nothing loads in the browser (aside from the loading bar). Here’s the log:

23-06-2017 00:07:06.730 [qtp156108217-15] ERROR a.g.e.GraknEngineServerException - New Grakn Engine Server exception {}
com.thinkaurelius.titan.core.TitanConfigurationException: Cannot determine local host
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.computeUniqueInstanceId(GraphDatabaseConfiguration.java:1510)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getOrGenerateUniqueInstanceId(GraphDatabaseConfiguration.java:1522)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1434)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
at ai.grakn.factory.TitanInternalFactory.configureGraph(TitanInternalFactory.java:113)
at ai.grakn.factory.TitanInternalFactory.newTitanGraph(TitanInternalFactory.java:88)
at ai.grakn.factory.TitanInternalFactory.buildTinkerPopGraph(TitanInternalFactory.java:84)
at ai.grakn.factory.TitanInternalFactory.buildTinkerPopGraph(TitanInternalFactory.java:60)
at ai.grakn.factory.AbstractInternalFactory.getTinkerPopGraph(AbstractInternalFactory.java:141)
at ai.grakn.factory.AbstractInternalFactory.getTinkerPopGraph(AbstractInternalFactory.java:135)
at ai.grakn.factory.AbstractInternalFactory.getGraph(AbstractInternalFactory.java:110)
at ai.grakn.factory.AbstractInternalFactory.open(AbstractInternalFactory.java:95)
at ai.grakn.factory.EngineGraknGraphFactory.getGraph(EngineGraknGraphFactory.java:65)
at ai.grakn.engine.controller.SystemController.getKeyspaces(SystemController.java:113)
at spark.RouteImpl$1.handle(RouteImpl.java:61)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:126)
at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)


#6

It seems that Grakn can’t resolve the hostname of your server properly - this would be ip-172-30-4-49 from the initial error you posted.

The quick fix is to add the following line to your /etc/hosts (as root):

127.0.0.1 ip-172-30-4-49

The second part should be the output of the command hostname in your terminal.

The actual issue here is your DNS resolution doesn’t seem to be configured correctly so that should be fixed if possible.


#7

great success, thank you!


#8

That’s fantastic! Let us know if you have any question about the stack.