The truth is rarely pure and never simple

Apache Drill and MongoDB: IllegalStateException

If you are using Apache Drill as frontend for access to a MongoDB instance, you may get this error after more than 24 hours of uptime.

ERROR [HY000] [MapR][Drill] (1040) 
Drill failed to execute the query: 
select * from INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE '%' ESCAPE '\' AND SCHEMA_NAME <> 'sys' AND SCHEMA_NAME <> 'INFORMATION_SCHEMA'
[30027]Query execution error. Details:[ 
SYSTEM ERROR: IllegalStateException: state should be: open
[Error Id: 57a02508-1920-4360-a111-c2a55a7af15c on HOSTNAME:31010]
]

Apparently, this is related to a connection cache that expires at some point and is not reset. In this case, restarting the drillbit solves the problem. Once the patch from 21/07/15 is part of the build, this should not happen any more.

Leave a comment

Your email address will not be published.