Grakn server status error after changing default Visualiser port [0.18.0][RESOLVED]


#1

Hi all,

After upgrading Grakn from 0.17.1 to 0.18.0, I only changed the default port for the Visualiser.
Then when I ran Grakn, storage and queue seemed to start well, but server status indicated NOT RUNNING for Grakn:

$ ./grakn server status
=============================================================================
      ________  _____     _______  __    __  __    __      _______  ___
     |   __   ||   _  \  |   _   ||  |  /  /|  \  |  |    |   _   ||   |
     |  |  |__||  | |  | |  | |  ||  | /  / |   \ |  |    |  | |  ||   |
     |  | ____ |  |_| /  |  |_|  ||  |/  /  |    \|  |    |  |_|  ||   |
     |  ||_   ||   _  \  |   _   ||   _  \  |   _    |    |   _   ||   |
     |  |__|  ||  | \  \ |  | |  ||  | \  \ |  | \   | __ |  | |  ||   |
     |________||__|  \__\|__| |__||__|  \__\|__|  \__||__||__| |__||___|

                          Grakn: The Database For AI
=============================================================================

Storage: RUNNING
Queue: RUNNING
Grakn: NOT RUNNING

Nevertheless, I can access the Visualiser on the new port without any problem, and logs indicate that Grakn server is running.

Here are the commands results, as requested here:

$ ls -la /tmp/*.pid
-rw-rw-r-- 1 grakn grakn 6 Dec 11 09:48 /tmp/grakn.pid
-rw-rw-r-- 1 grakn grakn 6 Dec 11 09:48 /tmp/grakn-queue.pid
-rw-rw-r-- 1 grakn grakn 5 Dec 11 09:48 /tmp/grakn-storage.pid

$ ps -ef | grep redis-server
grakn    24232     1  0 09:48 ?        00:00:03 ./services/redis/redis-server-linux 127.0.0.1:6379

$ jps
369 Jps
23826 CassandraDaemon
24242 GraknEngineServer

$ cat logs/grakn.log [truncated]
2017-12-11 09:45:08,461 [main] INFO  ai.grakn.engine.GraknEngineConfig - Project directory in use: ./services/
2017-12-11 09:45:08,467 [main] INFO  ai.grakn.engine.GraknEngineConfig - Configuration file in use: ./services/../conf/grakn.properties
2017-12-11 09:45:08,467 [main] INFO  ai.grakn.engine.GraknEngineConfig - Number of threads set to: 4
2017-12-11 09:45:08,910 [main] INFO  a.g.e.t.m.r.RedisTaskManager - Running queue consumer with 32 execution threads
2017-12-11 09:45:09,575 [main] INFO  ai.grakn.engine.GraknEngineServer - Starting task manager ai.grakn.engine.tasks.manager.redisqueue.RedisTaskManager
2017-12-11 09:45:09,592 [main] INFO  ai.grakn.engine.GraknEngineServer -
==================================================
2017-12-11 09:45:09,593 [main] INFO  ai.grakn.engine.GraknEngineServer -
     ___  ___  ___  _  __ _  _     ___  ___
    / __|| _ \/   \| |/ /| \| |   /   \|_ _|
   | (_ ||   /| - || ' < | .` | _ | - | | |
    \___||_|_\|_|_||_|\_\|_|\_|(_)|_|_||___|

 Web Dashboard available at [http://0.0.0.0:8867]
2017-12-11 09:45:09,593 [main] INFO  ai.grakn.engine.GraknEngineServer -
==================================================
2017-12-11 09:45:09,599 [main] INFO  ai.grakn.engine.GraknEngineServer - ********-66e95d04-a719-4153-b917-9d73626f6016 is checking the system schema
2017-12-11 09:45:15,768 [main] INFO  ai.grakn.engine.GraknEngineServer - Grakn started in 6.176 s
2017-12-11 09:48:11,701 [GraknEngineServer-shutdown] INFO  a.g.e.t.m.r.RedisTaskManager - Closing task manager
2017-12-11 09:48:11,744 [GraknEngineServer-shutdown] ERROR ai.grakn.redisq.Redisq - Error during close
java.util.concurrent.ExecutionException: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at ai.grakn.redisq.Redisq.close(Redisq.java:345)
        at ai.grakn.engine.tasks.manager.redisqueue.RedisTaskManager.close(RedisTaskManager.java:100)
        at ai.grakn.engine.GraknEngineServer.stopTaskManager(GraknEngineServer.java:346)
        at ai.grakn.engine.GraknEngineServer.close(GraknEngineServer.java:183)
        at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
        at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)
        at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
        at redis.clients.jedis.Protocol.process(Protocol.java:151)
        at redis.clients.jedis.Protocol.read(Protocol.java:215)
        at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
        at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:259)
        at redis.clients.jedis.Connection.getBulkReply(Connection.java:248)
        at redis.clients.jedis.Jedis.brpoplpush(Jedis.java:2541)
        at ai.grakn.redisq.Redisq.iteration(Redisq.java:233)
        at ai.grakn.redisq.Redisq.lambda$startConsumer$1(Redisq.java:161)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        ... 1 common frames omitted
2017-12-11 09:48:11,745 [GraknEngineServer-shutdown] INFO  ai.grakn.redisq.Redisq - Closed grakn
2017-12-11 09:48:37,840 [main] INFO  ai.grakn.engine.GraknEngineConfig - Project directory in use: ./services/
2017-12-11 09:48:37,846 [main] INFO  ai.grakn.engine.GraknEngineConfig - Configuration file in use: ./services/../conf/grakn.properties
2017-12-11 09:48:37,846 [main] INFO  ai.grakn.engine.GraknEngineConfig - Number of threads set to: 4
2017-12-11 09:48:38,118 [main] INFO  a.g.e.t.m.r.RedisTaskManager - Running queue consumer with 32 execution threads
2017-12-11 09:48:38,659 [main] INFO  ai.grakn.engine.GraknEngineServer - Starting task manager ai.grakn.engine.tasks.manager.redisqueue.RedisTaskManager
2017-12-11 09:48:38,676 [main] INFO  ai.grakn.engine.GraknEngineServer -
==================================================
2017-12-11 09:48:38,678 [main] INFO  ai.grakn.engine.GraknEngineServer -
     ___  ___  ___  _  __ _  _     ___  ___
    / __|| _ \/   \| |/ /| \| |   /   \|_ _|
   | (_ ||   /| - || ' < | .` | _ | - | | |
    \___||_|_\|_|_||_|\_\|_|\_|(_)|_|_||___|

 Web Dashboard available at [http://0.0.0.0:8867]
2017-12-11 09:48:38,678 [main] INFO  ai.grakn.engine.GraknEngineServer -
==================================================
2017-12-11 09:48:38,684 [main] INFO  ai.grakn.engine.GraknEngineServer - ********-eec4d411-568d-4ab9-8180-5df03a9faf01 is checking the system schema
2017-12-11 09:48:44,023 [main] INFO  ai.grakn.engine.GraknEngineServer - Grakn started in 5.347 s

So it seems that the interpreted error occurs on closing, then should be in some way corrupting the Grakn server status on new start.

Regards,

Gunther

Grakn.AI 0.18.0 [downloaded]
Tomcat 8.0.28
JDK 1.8.0_91
CentOS 7 64bits

#2

Can you copy and paste the output of

cat ./conf/grakn.properties| grep server.host

and

cat ./conf/grakn.properties| grep server.port

Additionally, can you let us know if curl-ing the configuration endpoint works:

curl $host:$port/configuration # replace $host and $port with the value from `server.host` and `server.port`, respectively
echo $? # also, check the status of the curl operation

#3

Here are the requested commands results:

$ cat ./conf/grakn.properties | grep server.host
server.host=0.0.0.0

$ cat ./conf/grakn.properties | grep server.port
# server.port=4567
server.port=8867

curl 0.0.0.0:8867/configuration
{"knowledge-base.analytics":"distributed","knowledge-base.sharding-threshold":"10000","cache.db-cache-size":"0.25","knowledge-base.default-keyspace":"grakn","cache.db-cache":"true","storage.backend":"grakn-production","password.protected":"false","admin.password":"grakn","server.port":"8867","log.level":"INFO","cache.db-cache-time":"180000","server.host":"0.0.0.0","grakn.version":"0.18.0","server.static-file-dir":"../services/assets/","knowledge-base.schema-cache-timeout-ms":"600000","tasks.postprocessing.delay":"60000","cache.db-cache-clean-wait":"20","knowledge-base.mode":"production","queue.host":"localhost:6379","storage.connection-timeout":"20000","storage.hostname":"127.0.0.1","taskmanager.implementation":"ai.grakn.engine.tasks.manager.RedisTaskManager","loader.repeat-commits":"5","log.dirs":"../logs/","loader.threads":"4"}

$ echo $?
0

Regards,
Gunther


#4

Can you remove the commented server.port line altogether?

We have a bug where we incorrectly parse the commented line as an actual line for specific for server.host and server.port configuration. It should be fixed in the upcoming release.

Let me know if this workaround works for you!


#5

Thanks! Removing the commented line solved the problem.