Starting Titan on startup using Systemd

213 views
Skip to first unread message

Kevin Isaac

unread,
Jun 2, 2017, 1:26:45 PM6/2/17
to Gremlin-users
I know that this is not the exact place to ask help about Titan, but the Aurelius group looks kinda abandoned and I hope anyone here who uses Titan or has any knowledge of it can be of help.

This is the startup script that I have so far:

[Unit]
Description=The Titan database
After=network.target

[Service]
User=sammy
Group=www-data
PIDFile=/tmp/titan.pid
Environment="PATH=/home/sammy/titan-1.0.0-hadoop1:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
WorkingDirectory=/home/sammy/titan-1.0.0-hadoop1
ExecStart=/home/sammy/titan-1.0.0-hadoop1/bin/titan.sh start
ExecStop=/home/sammy/titan-1.0.0-hadoop1/bin/titan.sh stop

[Install]
WantedBy=multi-user.target

So, I use the following command to start Titan: `sudo systemctl start titan.service`

What I get inturn, when I try `sudo systemctl status titan.service` immediately after starting is that Titan is started and it's running:

titan.service - The Titan database
   
Loaded: loaded (/etc/systemd/system/titan.service; disabled; vendor preset: enabled)
   
Active: active (running) since Fri 2017-06-02 16:46:05 UTC; 25s ago
 
Main PID: 10761 (titan.sh)
   
Tasks: 131
   
Memory: 741.6M
      CPU
: 41.077s
   
CGroup: /system.slice/titan.service
           
├─10761 /bin/bash /home/sammy/titan-1.0.0-hadoop1/bin/titan.sh start
[Unit]
           
├─10834 java -Dtitan.logdir=/home/sammy/titan-1.0.0-hadoop1/log -ea -javaagent:/home/sammy/titan-1.0.0-hadoop1/lib/jamm-0.3.0.jar -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -
           
├─11154 /usr/bin/java -Xms256m -Xmx1g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryEr
           
├─11265 java -server -Dtitan.logdir=/home/sammy/titan-1.0.0-hadoop1/bin/../log -Dlog4j.configuration=conf/gremlin-server/log4j-server.properties -Xms32m -Xmx512m -javaagent:/home/sammy/titan-1.0.0-hadoop1/lib/jamm-
           
└─11349 sleep 2


Jun 02 16:46:05 ubuntu-16-titan-2gb systemd[1]: Started The Titan database.
Jun 02 16:46:05 ubuntu-16-titan-2gb titan.sh[10761]: Forking Cassandra...
[Unit]
Jun 02 16:46:19 ubuntu-16-titan-2gb titan.sh[10761]: Running `nodetool statusthrift`... OK (returned exit status 0 and printed string "running").
Jun 02 16:46:19 ubuntu-16-titan-2gb titan.sh[10761]: Forking Elasticsearch...
Jun 02 16:46:26 ubuntu-16-titan-2gb titan.sh[10761]: Connecting to Elasticsearch (127.0.0.1:9300).... OK (connected to 127.0.0.1:9300).
Jun 02 16:46:26 ubuntu-16-titan-2gb titan.sh[10761]: Forking Gremlin-Server...


But, once gremlin-server is done forking and connected, Titan automatically shuts down. So, trying status after a few seconds, this happens:

sammy@ubuntu-16-titan-2gb:~/titan-1.0.0-hadoop1$ sudo systemctl status titan.service

titan.service - The Titan database
   
Loaded: loaded (/etc/systemd/system/titan.service; enabled; vendor preset: enabled)
   
Active: inactive (dead) since Fri 2017-06-02 16:52:56 UTC; 3min 18s ago
 
Process: 12957 ExecStop=/home/sammy/titan-1.0.0-hadoop1/bin/titan.sh stop (code=exited, status=0/SUCCESS)
 
Main PID: 12274 (code=exited, status=0/SUCCESS)


Jun 02 16:52:33 ubuntu-16-titan-2gb titan.sh[12274]: Running `nodetool statusthrift`... OK (returned exit status 0 and printed string "running").
Jun 02 16:52:33 ubuntu-16-titan-2gb titan.sh[12274]: Forking Elasticsearch...
Jun 02 16:52:40 ubuntu-16-titan-2gb titan.sh[12274]: Connecting to Elasticsearch (127.0.0.1:9300).... OK (connected to 127.0.0.1:9300).
Jun 02 16:52:40 ubuntu-16-titan-2gb titan.sh[12274]: Forking Gremlin-Server...
Jun 02 16:52:43 ubuntu-16-titan-2gb systemd[1]: Started The Titan database.
Jun 02 16:52:49 ubuntu-16-titan-2gb titan.sh[12274]: Connecting to Gremlin-Server (127.0.0.1:8182)..... OK (connected to 127.0.0.1:8182).
Jun 02 16:52:49 ubuntu-16-titan-2gb titan.sh[12274]: Run gremlin.sh to connect.
Jun 02 16:52:49 ubuntu-16-titan-2gb titan.sh[12957]: Killing Gremlin-Server (pid 12807)...
Jun 02 16:52:53 ubuntu-16-titan-2gb titan.sh[12957]: Killing Elasticsearch (pid 12677)...
Jun 02 16:52:53 ubuntu-16-titan-2gb titan.sh[12957]: Killing Cassandra (pid 12348)...


Titan is automatically killed as you can see in the last three lines and I can't figure out why this happens. This however is not the issue when Titan is started normally from the command-line. Can anyone point me what the issue here is? I could use some help with this.

Thank you.

Stephen Mallette

unread,
Jun 2, 2017, 3:14:21 PM6/2/17
to Gremlin-users
Gremlin Server will sometimes shut itself down if it doesn't like the conditions its running in. Usually dies if a port is already in use or something like that. If you can locate the Gremlin Server logs you might find some hints in there as to why it is shutting down.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/26071311-694f-467a-a0fa-caa74f6a259f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Isaac

unread,
Jun 2, 2017, 3:55:21 PM6/2/17
to Gremlin-users
Hey Stephen!

Alright. So I checked the `gremlin-server.log` file and I can see Gremlin Server shutting down. This is the content of the log file:

4559 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and configured ScriptEngines.
4678 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4680 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
4881 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4884 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
7942 [main] WARN  io.netty.util.internal.ThreadLocalRandom  - Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
8047 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
8047 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.
9063 [gremlin-server-shutdown] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down thread pools.
11274 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server - shutdown complete


Any idea what this can mean?

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Kevin Isaac

unread,
Jun 2, 2017, 4:04:50 PM6/2/17
to Gremlin-users
Sorry, I missed out an important chunk of that log information. Here it goes:

1755 [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [conf/gremlin-server/custom-titan-config.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: Configuration must contain a valid 'gremlin.graph' setting
java
.lang.RuntimeException: Configuration must contain a valid 'gremlin.graph' setting
 at org
.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:57)
 at org
.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
 at org
.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$27(GraphManager.java:50)
 at java
.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
 at org
.apache.tinkerpop.gremlin.server.GraphManager.<init>(GraphManager.java:48)
 at org
.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:94)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:88)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:290)
1761 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
2825 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded nashorn ScriptEngine
3428 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded gremlin-groovy ScriptEngine
4514 [main] WARN  org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor  - Could not initialize gremlin-groovy ScriptEngine with scripts/empty-sample.groovy as script could not be evaluated - javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
4515 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and configured ScriptEngines.
4576 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4578 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
4745 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4748 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
7802 [main] WARN  io.netty.util.internal.ThreadLocalRandom  - Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
7919 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.
7919 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.
9244 [gremlin-server-shutdown] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down thread pools.
11452 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server - shutdown complete


This is the content of the custom config file that I created:

storage.backend=cassandrathrift
storage
.hostname=localhost


index
.search.backend=elasticsearch
index
.search.hostname=localhost
index
.search.elasticsearch.client-only=true

I also tried adding a `storage.directory=/tmp/graph` but that didn't seem to move the needle.
Hey Stephen!


           
├─11154 /usr/bin/java -Xms256m -Xmx1g</

Kevin Isaac

unread,
Jun 2, 2017, 4:08:14 PM6/2/17
to Gremlin-users
And this is what my custom config file looks like:


storage
.backend=cassandrathrift
storage
.hostname=localhost


index
.search.backend=elasticsearch
index
.search.hostname=localhost
index
.search.elasticsearch.client-only=true

I also tried adding

storage.directory=/tmp/graph

but that didn't seem to move the needle. Am I overlooking something?

Thanks!


On Saturday, June 3, 2017 at 1:34:50 AM UTC+5:30, Kevin Isaac wrote:
Sorry, I missed out an important chunk of that log information. Here it goes:

1755 [main] WARN  org.apache.tinkerpop.gremlin.server.GremlinServer  - Graph [graph] configured at [conf/gremlin-server/custom-titan-config.properties] could not be instantiated and will not be available in Gremlin Server.  GraphFactory message: Configuration must contain a valid 'gremlin.graph' setting
java
.lang.RuntimeException: Configuration must contain a valid 'gremlin.graph' setting
 at org
.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:57)
 at org
.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
 at org
.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$27(GraphManager.java:50)
 at java
.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
 at org
.apache.tinkerpop.gremlin.server.GraphManager.<init>(GraphManager.java:48)
 at org
.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:94)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:88)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:290)
1761 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized Gremlin thread pool.  Threads in pool named with pattern gremlin-*
2825 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded nashorn ScriptEngine
3428 [main] INFO  org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines  - Loaded gremlin-groovy ScriptEngine
4514 [main] WARN  org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor  - Could not initialize gremlin-groovy ScriptEngine with scripts/empty-sample.groovy as script could not be evaluated - javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: graph for class: Script1
4515 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - Initialized GremlinExecutor and configured ScriptEngines.
4576 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4578 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
4745 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting
4748 [main] WARN  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Could not instantiate configured serializer class<span st

Robert Dale

unread,
Jun 2, 2017, 4:11:44 PM6/2/17
to gremli...@googlegroups.com
You should just stop now and move to DSE Graph, where the Titan devs went, or JanusGraph, where the Titan codebase forked and continues.

Robert Dale

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/43cb454c-2ce6-4071-b4c8-c07439deca86%40googlegroups.com.

Kevin Isaac

unread,
Jun 2, 2017, 4:22:33 PM6/2/17
to Gremlin-users
Hey Robert,

I'm not really using Titan for production but thanks for pointing out JanusGraph to me (I didn't know about the forked project).

But, I'm in search for a solution to this problem currently. Moreover, I think this is an issue with Gremlin Server and not with Titan itself.

Robert Dale

To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Stephen Mallette

unread,
Jun 3, 2017, 6:54:37 AM6/3/17
to Gremlin-users
I would pay attention to these two lines:

> There is no graph named [graph] configured to be used in the useMapperFromGraph setting
> 7942 [main] WARN  io.netty.util.internal.ThreadLocalRandom  - Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?

As for the "no graph named [graph]" problem, again, I don't think that an invalid graph setting should bring down gremlin server but maybe there is something interesting happening in titan.sh that triggers it that I don't remember. This file:

conf/gremlin-server/custom-titan-config.properties

needs a the configuration option specified in the error message you pasted:

> Configuration must contain a valid 'gremlin.graph' setting

so basically add this line:

gremlin.graph=com.thinkaurelius.titan.core.TitanFactory

note the samples that ship with Titan:


That should clear up that error plus the one related to the serializers like:

> Could not instantiate configured serializer class - org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 - it will not be available. There is no graph named [graph] configured to be used in the useMapperFromGraph setting

assuming that your graph is actually named "graph" in the gremlin-server yaml file.  As for the "Not enough entrophy?" thing you should be able to google around for an answer to that one - I think i've had to research that one before and found the answer pretty fast, but i don't remember what it refers to offhand.


To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/429dd02a-6f7d-4a22-9bef-d139eb8c5d65%40googlegroups.com.

Kevin Isaac

unread,
Jun 5, 2017, 5:43:29 AM6/5/17
to Gremlin-users
Hello Stephen,

So, I added the gremlin.graph config option to the config file. As you said, a lot of the errors cleared out. This is what I get now:

7782 [main] INFO  org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor  - A GraphTraversalSource is now bound to [g] with graphtraversalsource[standardtitangraph[cassandrathrift:[localhost]], standard]
7859 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
7860 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0
8072 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0
8073 [main] INFO  org.apache.tinkerpop.gremlin.server.AbstractChannelizer  - Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0
8180 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1.

# Not connected to the server
8181 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.


9348 [SIGTERM handler] INFO  com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager  - Closed Thrift connection pooler.
9483 [gremlin-server-shutdown] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down thread pools.
11701 [gremlin-server-stop] WARN  com.thinkaurelius.titan.graphdb.database.StandardTitanGraph  - Failed to remove shutdown hook
java
.lang.IllegalStateException: Shutdown in progress
 at java
.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:82)
 at java
.lang.Runtime.removeShutdownHook(Runtime.java:239)
 at com
.thinkaurelius.titan.graphdb.database.StandardTitanGraph.removeHook(StandardTitanGraph.java:241)
 at com
.thinkaurelius.titan.graphdb.database.StandardTitanGraph.close(StandardTitanGraph.java:175)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.lambda$null$7(GremlinServer.java:256)
 at java
.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597)
 at org
.apache.tinkerpop.gremlin.server.GremlinServer.lambda$stop$8(GremlinServer.java:253)
 at java
.lang.Thread.run(Thread.java:748)
11709 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Closed Graph instance [graph]
11710 [gremlin-server-stop] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server - shutdown complete


I tried running Titan normally and the following are the last three lines from the log file.

8521 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.

. OK (connected to 127.0.0.1:8182).
Run gremlin.sh to connect.


Apparently, the connection is not going through when Titan is started with Systemd as a service. I see you mentioned earlier that if the port is used by some other program, gremlin server shuts down by itself. I guess this may be a suspect but I don't know how this happens only when Titan is started as a service.

I also don't see the following warning anymore :

> 7942 [main] WARN  io.netty.util.internal.ThreadLocalRandom  - Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?

And not to mention the IllegalStateException which I think isn't the one that's causing the problem here.

Thanks.

Kevin Isaac

unread,
Jun 5, 2017, 5:48:33 AM6/5/17
to Gremlin-users
My message gets trimmed for no reason. So, this is the last three lines of the log file when Titan is run normally:


8521 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Channel started at port 8182.
. OK (connected to 127.0.0.1:8182).
Run gremlin.sh to connect.



Apparently, the connection is not going through when Titan is run as a service with Systemd. Also, the `not enough entropy` warning doesn't show up anymore. The `IllegalStateException` error is still there though, which I think isn't the one causing Gremlin Server to shut down anyway. Got any ideas?

Thank you!
8521 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  <span style="color: #660;" class="styled

Stephen Mallette

unread,
Jun 5, 2017, 6:29:37 AM6/5/17
to Gremlin-users
I doubt you have a port conflict on 8182 as Gremlin Server would typically log that and give you a nice message so you'd know what to fix. I really don't know what could be wrong. Perhaps you should add some more logging to titan.sh to see if you can figure out where it is dying and where it is triggering the stop command as it seems to shutdown in an orderly fashion.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/0f28ab47-b233-4cf0-b591-3e44636a058e%40googlegroups.com.

Kevin Isaac

unread,
Jun 6, 2017, 2:14:58 PM6/6/17
to Gremlin-users
Alright! A friend of mine had a look at this issue and apparently, to run a process that starts other processes as a systemd script, the `Type=forking` directory is to be set in the service file. So, this is how my service file looks like now:

[Unit]
Description=The Titan database
After=network.target


[Service]
Type=forking
User=sammy
Group=www-data
Environment="PATH=/home/sammy/titan-1.0.0-hadoop1/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
WorkingDirectory=/home/sammy/titan-1.0.0-hadoop1/

ExecStart=/home/sammy/titan-1.0.0-hadoop1/bin/titan.sh start
ExecStop=/home/sammy/titan-1.0.0-hadoop1/bin/titan.sh stop


[Install]
WantedBy=multi-user.target

Thanks to Stephen for helping me with the other issue.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages