Skip to content

Troubleshooting

spmallette edited this page Jul 23, 2012 · 9 revisions

This page contains frequently identified problems with Rexster and its components.

Not using “localhost” to access REST API/Dog House?

If you set up Rexster with the default configuration in a server environment and try to access it by IP or DNS as in:

http://8.8.8.8:8182/graphs/tinkergraph

you will quickly find that Rexster will not respond to requests. In most cases, after checking firewall settings that the appropriate ports are open, the solution is to simply check rexster.xml and ensure that the <base-uri> property is set properly. Given the above example, that would mean setting the value as follows:

<rexster>
  ...
  <base-uri>http://8.8.8.8</base-uri>
  ...
</rexster>

When setting up a non-local Rexster environment, it is a good idea to read through the Rexster Configuration section very carefully to ensure that all settings are as needed for your environment.

Dog House not showing configured graphs?

If you access the Dog House and find no graphs visible to select, there is a good chance that either the <base-uri> property of rexster.xml is not set appropriately or firewall ports are preventing access to the port configured in <rexster-server-port>. A simple way to test connectivity is to point your browser at the configured <base-uri> and <rexster-server-port> to see if some valid JSON is returned.

Want to see more logging from Rexster?

By default, Rexster is configured to hide Jersey-level logging. Sometimes, this information includes very valuable information when trying to isolate a problem or issue. To have this log information displayed in the console, simply supply to the -d or --debug option as follows:

rexster.sh -s -d

Gremlin Extension “Null Key” Error

It’s important to ensure that the Gremlin Extension returns data that can be converted to valid JSON. A common case where this does not happen is when a Gremlin script returns a null value as a map key (null values as map values are OK). JSON does not support a null value in the key and therefore the Gremlin Extension will return a “Null key” error.

The following is an example script that presents such a situation:

http://localhost:8182/graphs/tinkergraph/tp/gremlin?script=m=[:];g.V.age.groupCount(m).iterate();m;

Since age is not an available property of all vertices (V), the script will produce a map that has a null key.

One way to work around this would be to filter out nulls as in:

http://localhost:8182/graphs/tinkergraph/tp/gremlin?script=m=[:];g.V.age.filter{it!=null}.groupCount(m).iterate();m;

Another way to work around this would be to convert null key into a string “null” key as in:

http://localhost:8182/graphs/tinkergraph/tp/gremlin?script=m=[:];g.V.age.groupCount(m).iterate();m['null']=m[null];m.remove(null);m;
Clone this wiki locally