You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by David Lotts <dl...@gmail.com> on 2017/09/06 15:42:34 UTC
Error: MongoDBRdfConfiguration.setMongoClient(NULL)
Adina,
I have seen this error. From your email:
> java.lang.NullPointerException: null
> at com.google.common.base.Preconditions.checkNotNull(
Preconditions.java:191)
> at org.apache.rya.mongodb.MongoDBRdfConfiguration.setMongoClient(
MongoDBRdfConfiguration.java:267)
MongoDB did not start for some reason. I know of two reasons.
1. MongoDB can't be run on a VM in a drive shared with Windows. Look for
an "fsync" error.
MongoDB cannot have its files on a shared drive that does not support
“fsync”.
See https://github.com/mvertes/docker-alpine-mongo/issues/1
2. This log output accompanied other tests that failed for "out of memory",
so we think that is the root cause:
2017-08-31 14:24:48,466 INFO [Thread-3] mongodb.MockMongoFactory
(Slf4jLevel.java:log(42)) -
[initandlisten] terminate() called. An exception is active; attempting to
gather more information[mongod output]
[initandlisten] std::exception::what(): Resource temporarily
unavailable[mongod output]
Actual exception type: std::system_error[mongod output]
For some reason it gets logged as [INFO] so you need to turn that on to see
what Mongo is reporting.
Put this in your test file: org.apache.rya.mongodb.
MongoDBQueryEngineTest
Put this at the top of the @Before junit method:
org.apache.log4j.BasicConfigurator.configure();
Now all logging will go to stdout.
Look for output from mongodb.MockMongoFactory *and*[mongod output]
and send it here if you want more eyes on it.
I'm going to write a Jira ticket to request that we make this more obvious.
david.
Re: Error: MongoDBRdfConfiguration.setMongoClient(NULL)
Posted by David Lotts <dl...@gmail.com>.
>
> Those who use Rya with Accumulo probably don't need
> MongoDB, but they would still have to have MongoDB installed and running to
> get past these tests and be able to build with a simple mvn clean install.
>
Good point, perhaps a profile to skip-mongodb-tests.
david.
Re: Error: MongoDBRdfConfiguration.setMongoClient(NULL)
Posted by Adina Crainiceanu <ad...@usna.edu>.
Thank you, I'll try the fix. I would suggest that something needs to change
in the tests so the error is not produced if the user is not interested in
the Mongo back-end. Those who use Rya with Accumulo probably don't need
MongoDB, but they would still have to have MongoDB installed and running to
get past these tests and be able to build with a simple mvn clean install.
Thank you,
Adina
On Wed, Sep 6, 2017 at 11:42 AM, David Lotts <dl...@gmail.com> wrote:
> Adina,
> I have seen this error. From your email:
>
> > java.lang.NullPointerException: null
> > at com.google.common.base.Preconditions.checkNotNull(
> Preconditions.java:191)
> > at org.apache.rya.mongodb.MongoDBRdfConfiguration.setMongoClient(
> MongoDBRdfConfiguration.java:267)
>
> MongoDB did not start for some reason. I know of two reasons.
>
> 1. MongoDB can't be run on a VM in a drive shared with Windows. Look for
> an "fsync" error.
>
> MongoDB cannot have its files on a shared drive that does not support
> “fsync”.
>
> See https://github.com/mvertes/docker-alpine-mongo/issues/1
>
> 2. This log output accompanied other tests that failed for "out of memory",
> so we think that is the root cause:
>
>
> 2017-08-31 14:24:48,466 INFO [Thread-3] mongodb.MockMongoFactory
> (Slf4jLevel.java:log(42)) -
>
> [initandlisten] terminate() called. An exception is active; attempting to
> gather more information[mongod output]
>
> [initandlisten] std::exception::what(): Resource temporarily
> unavailable[mongod output]
>
> Actual exception type: std::system_error[mongod output]
>
>
> For some reason it gets logged as [INFO] so you need to turn that on to see
> what Mongo is reporting.
> Put this in your test file: org.apache.rya.mongodb.
> MongoDBQueryEngineTest
> Put this at the top of the @Before junit method:
>
>
>
> org.apache.log4j.BasicConfigurator.configure();
>
>
> Now all logging will go to stdout.
> Look for output from mongodb.MockMongoFactory *and*[mongod output]
> and send it here if you want more eyes on it.
>
> I'm going to write a Jira ticket to request that we make this more obvious.
> david.
>
--
Dr. Adina Crainiceanu
Associate Professor, Computer Science Department
United States Naval Academy
410-293-6822
adina@usna.edu
http://www.usna.edu/Users/cs/adina/