typedb / typedb

TypeDB: the power of programming, in your database
https://typedb.com
Mozilla Public License 2.0
3.85k stars 340 forks source link

./grakn server start...... Failing #2813

Closed SSK0001 closed 6 years ago

SSK0001 commented 6 years ago

Hi,

I am facing a problem with grakn failed to start. I tried re-installing all different components of grakn. I have tried reinstalling Java, Grarkn, Cleared Grakn - Nothing worked.

Here is the list of variables:

Grakn Version: 1.2 Operating system: Mac OS Sierra How did i install grakn: Using brew (faced problem in starting) and Download from official website (faced problem in starting this way too) Logs:

2018-05-22 10:18:40,050 [main] ERROR ai.grakn.bootup.graknengine.Grakn - Uncaught exception at thread [main]
ai.grakn.bootup.graknengine.pid.GraknPidException: pid file already exists: '[/tmp/grakn-engine.pid]'.
    at ai.grakn.bootup.graknengine.pid.GraknPidFileStore.attemptToWritePidFile(GraknPidFileStore.java:61)
    at ai.grakn.bootup.graknengine.pid.GraknPidFileStore.trackGraknPid(GraknPidFileStore.java:44)
    at ai.grakn.bootup.graknengine.pid.GraknPidManager.trackGraknPid(GraknPidManager.java:38)
    at ai.grakn.bootup.graknengine.Grakn.main(Grakn.java:62)
2018-05-22 10:19:05,306 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
2018-05-22 10:19:05,309 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
2018-05-22 10:19:05,312 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
2018-05-22 10:19:05,312 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties

Please help me resolve this issue.

Thanks, Santhosh.

lolski commented 6 years ago

It seems you have a dangling PID file under /tmp.

Grakn keeps PID files on the /tmp folder, and they should be cleaned up properly unless it does not exit in a graceful manner, for example when you do a kill -9.

Remove them by doing

grakn server stop
rm /tmp/grakn-storage.pid
rm /tmp/grakn-queue.pid
rm /tmp/grakn-engine.pid

And try to start grakn again:

grakn server start

If the issue persist, please add detailed information as per this guideline.

SSK0001 commented 6 years ago

Hi,

Thanks for the reply, Those commands that you have given did not work :|

  1. Grakn version: 1.2.0
  2. Your operating system: MacOS Sierra
  3. Currently from brew installed, (it did not work with grakn distribution download as well)
  4. The step which you did:

    brew cask install caskroom/versions/java8 brew install grakn ./grakn server start or grakn server start ./grakn server stop or grakn server stop

  5. The current state of Grakn, by running these commands:

    ls -la /tmp/*.pid

    -rw-r--r--  1 santhoshkumar  wheel  5 May 23 12:07 /tmp/grakn-storage.pid

    ps -ef | grep redis-server

    501 79454     1   0 Mon03PM ??         0:27.87 /usr/local/Cellar/grakn/1.2.0/libexec/services/redis/redis-server-osx 127.0.0.1:6379
    501   605 73727   0 12:09PM ttys005    0:00.00 grep redis-server

    jps (if this command is installed on the system. usually is, when you are on Oracle JDK) The logs. If they’re quite long, maybe try only posting the last 200 lines of each

    94411 CassandraDaemon
    71917 Graql
    607 Jps

    tail -n 200 $GRAKN_HOME/logs/cassandra.log

    No logs for cassandra..

    tail -n 200 $GRAKN_HOME/logs/grakn.log

    2018-05-21 09:28:22,429 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:28:22,433 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:28:22,434 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:28:22,434 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:28:22,435 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:28:22,435 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:28:22,794 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:28:22,795 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:30:59,007 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:30:59,012 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:30:59,014 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:30:59,015 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:30:59,016 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:30:59,016 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 09:30:59,357 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 09:30:59,357 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:02:28,564 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:02:28,568 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:02:28,571 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:02:28,571 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:02:28,572 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:02:28,572 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:02:28,912 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:02:28,912 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:12:38,763 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:12:38,767 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:12:38,768 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:12:38,769 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:12:38,770 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:12:38,770 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:12:39,111 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:12:39,111 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:19:29,471 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:19:29,475 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:19:29,476 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:19:29,477 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:19:29,478 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:19:29,478 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-21 10:19:29,803 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-21 10:19:29,803 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:18:38,446 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:18:38,451 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:18:38,454 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:18:38,454 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:18:38,456 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:18:38,456 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:18:38,940 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:18:38,940 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:18:40,050 [main] ERROR ai.grakn.bootup.graknengine.Grakn - Uncaught exception at thread [main]
    ai.grakn.bootup.graknengine.pid.GraknPidException: pid file already exists: '[/tmp/grakn-engine.pid]'.
    at ai.grakn.bootup.graknengine.pid.GraknPidFileStore.attemptToWritePidFile(GraknPidFileStore.java:61)
    at ai.grakn.bootup.graknengine.pid.GraknPidFileStore.trackGraknPid(GraknPidFileStore.java:44)
    at ai.grakn.bootup.graknengine.pid.GraknPidManager.trackGraknPid(GraknPidManager.java:38)
    at ai.grakn.bootup.graknengine.Grakn.main(Grakn.java:62)
    2018-05-22 10:19:05,306 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:19:05,309 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 10:19:05,312 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 10:19:05,312 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 15:25:52,244 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 15:25:52,249 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 15:25:52,252 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 15:25:52,252 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 15:25:52,253 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 15:25:52,253 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-22 15:25:52,728 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-22 15:25:52,728 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-23 12:07:30,953 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-23 12:07:30,959 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-23 12:07:30,961 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-23 12:07:30,962 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-23 12:07:30,963 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-23 12:07:30,963 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties
    2018-05-23 12:07:31,426 [main] INFO  ai.grakn.engine.GraknConfig - Project directory in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0
    2018-05-23 12:07:31,426 [main] INFO  ai.grakn.engine.GraknConfig - Configuration file in use: /Users/santhoshkumar/Work/grakn-dist-1.2.0/conf/grakn.properties

    tail -n 200 /tmp/grakn-queue.log

    ---(Nothing)----

Please help me to resolve this issue.

Thanks, Santhosh.

lolski commented 6 years ago

Can you make sure to replace $GRAKN_HOME with the path to your grakn distribution - in this case, tail -n 200 /usr/local/Cellar/grakn/1.2.0/logs/cassandra.log. Cassandra seems to have started, and thus seems unlikely not to log anything.

SSK0001 commented 6 years ago

Hello,

thanks for the reply.

My bad, I have pasted the wrong command. I did replace my home directory in the place of $GRAKN_HOME, I could not get any logs on that command.

Also i have lsed the logs folder and this is what I got.

total 40
drwxr-xr-x@  4 santhoshkumar  staff    136 May 21 09:28 .
drwxr-xr-x@ 13 santhoshkumar  staff    442 May 21 12:04 ..
-rw-r--r--   1 santhoshkumar  staff      0 May 21 09:28 grakn-postprocessing.log
-rw-r--r--   1 santhoshkumar  staff  17669 May 30 10:21 grakn.log

Thanks.

lolski commented 6 years ago

The exception which you've pasted indicates that there is a dangling /tmp/grakn-engine.pid file.

Do a cd $GRAKN_HOME && ./grakn server stop followed by ls /tmp . If the file does not exists you should be good to do ./grakn server start

SSK0001 commented 6 years ago

Hello,

Thanks for the reply.

I lsed /tmp folder and I found the PID that you mean

Santhoshs-MacBook-Pro:grakn-dist-1.2.0 santhoshkumar$ ls /tmp | grep grakn
grakn-storage.pid
Santhoshs-MacBook-Pro:grakn-dist-1.2.0 santhoshkumar$

also, I removed it using rm /tmp/grakn-storage.pid

and then when i run the server using grakn server start I get

=============================================================================
      ________  _____     _______  __    __  __    __      _______  ___
     |   __   ||   _  \  |   _   ||  |  /  /|  \  |  |    |   _   ||   |
     |  |  |__||  | |  | |  | |  ||  | /  / |   \ |  |    |  | |  ||   |
     |  | ____ |  |_| /  |  |_|  ||  |/  /  |    \|  |    |  |_|  ||   |
     |  ||_   ||   _  \  |   _   ||   _  \  |   _    |    |   _   ||   |
     |  |__|  ||  | \  \ |  | |  ||  | \  \ |  | \   | __ |  | |  ||   |
     |________||__|  \__\|__| |__||__|  \__\|__|  \__||__||__| |__||___|

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

Starting Storage....SUCCESS
Starting Queue........FAILED!
Unable to start Queue
Please run 'grakn server status' or check the logs located under 'logs' directory.

Please help me resolve this.

thanks.

marco-scoppetta commented 6 years ago

Hi @SSK0001 we have just released version 1.4 and we have fixed quite a few bootup issues. Please try with the latest version and feel free to open a new issue if you still have any problems starting Grakn.