0

Not a duplicate of this though the title is similar (the result of the issue is the same, but it doesn't stem from the same origin, my Java version being Java 8).

I am using the Pre-Packaged distribution version 0.6.1 and it was working until very recently. I don't recall having made any changes to the configuration since it worked.

Even using the verbose option, I can't seem to pinpoint the origin of the error as all seems correct until no logs appear anymore until the timeout, as if there was an infinite loop. Additionally, increasing the timeout has yield no result.

Here is a truncated output:

Forking Cassandra...
Running `nodetool statusbinary`. 
<TRUNCATE>
INFO  [main] 2022-08-08 09:12:03,173 StorageService.java:1536 - JOINING: Finish joining ring
INFO  [main] 2022-08-08 09:12:03,193 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='edgestore_lock_')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='txlog')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='janusgraph_ids')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='system_properties')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='graphindex_lock_')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='system_properties_lock_')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='edgestore')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='graphindex')
INFO  [main] 2022-08-08 09:12:03,194 SecondaryIndexManager.java:512 - Executing pre-join tasks for: CFS(Keyspace='janusgraph', ColumnFamily='systemlog')
INFO  [main] 2022-08-08 09:12:03,221 StorageService.java:2452 - Node localhost/127.0.0.1 state jump to NORMAL
..................... timeout exceeded (60 seconds)
See /home/<PATH>/Documents/Progs/JanusGraph/janusgraph-full-0.6.1/bin/../logs/cassandra.log for Cassandra log output.

Thanks to everyone who will read!

GregoirePelegrin
  • 1,206
  • 2
  • 7
  • 23

1 Answers1

0

The infinite loop intuition was correct!

Solution (dirty)

Add -Dcom.sun.jndi.rmiURLParsing=legacy in the line statusbinary="`$BIN/../cassandra/bin/nodetool statusbinary 2>/dev/null | tr -d '\n\r'`" in the wait_for_cassandra method. (Results in statusbinary="`$BIN/../cassandra/bin/nodetool -Dcom.sun.jndi.rmiURLParsing=legacy statusbinary 2>/dev/null | tr -d '\n\r'`")
This should solve the issue.

Explanations

In bin/janusgraph.sh, the start of Cassandra is handled by the start method, which will then wait for the process to be up before moving on to ElasticSearch and JanusGraph. The wait is handled by the wait_for_cassandra method.
In this method, there is an infinite loop waiting for cassandra/bin/nodetool to return "running", and which does not handle any other case (i.e. errors, no return, ...).

I thus tried the cassandra/bin/nodetool statusbinary command on its own. It returned an error nodetool: Failed to connect to '127.0.0.1:7199' - URISyntaxException: 'Malformed IPv6 address at index 7: rmi://[127.0.0.1]:7199'..
Searching this error, I found this StackOverflow post and more importantly this answer. (It seems the error may come from an OpenJDK update)
As I failed to find where to add the JAVA_TOOL_OPTIONS parameter in order to have it as an environment variable, I resorted to directly modify the bin/janusgraph.sh file.

If you have any way to do it properly, I'd be glad to know it!

GregoirePelegrin
  • 1,206
  • 2
  • 7
  • 23