Open dekarrin opened 5 years ago
Hi dekarrin, I can confirm this issue (so, thanks), but also see that along another path this issue was solved in https://github.com/JanusGraph/janusgraph/commit/2b603b8e72d1c1f27d49a4302cb44a34a5b7d7f0 Best wishes, Marc
Thanks for investigating, @vtslab. We can leave this issue still open as we can fix the issue also for the 0.3 release branch.
In version 0.3.1, there is a potential bug in JanusGraphAbstractAuthenticator.
There is a check for the keys
CONFIG_DEFAULT_USER
andCONFIG_DEFAULT_PASSWORD
in the configuration dictionary passed to thesetup()
method; if either key is missing, a warning is issued (link to source).However, later in the same method, the value of
config.get(CONFIG_DEFAULT_USER)
is used;toString()
is called on it. Theconfig
object is aMap<String, Object>
, and therefore ifCONFIG_DEFAULT_USER
is not present in it, that config lookup will returnnull
. This causes thetoString()
call to throw a NullPointerException. A similar situation also occurs directly after that withCONFIG_DEFAULT_PASSWORD
. (link to source)This causes a rather uninformative message to be displayed during gremlin server startup:
Reproduction:
To reproduce this issue, add the following configuration in the gremlin-server.yaml, and launch janusgraph:
(where
conf/gremlin-server/janusgraph-credentials-server.properties
points to a valid config for credentials storage)Recommendations
Should the community agree that this is an issue that should be addressed, my naive thoughts going into this is to suggest that one of the following should be done to fix this:
error
orcritical
. This would indicate to the user that the program will encounter issues and cannot continue execution.