question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.20.0-SNAPSHOT Fails on mongodb cluster query

See original GitHub issue

Describe the bug Drill is not able to query mongodb cluster, it throws a NPE

2021-10-28 16:21:52,535 [1e8531df-4e21-f062-707b-b9cbb72c619e:foreman] INFO  o.a.d.e.s.mongo.MongoStoragePlugin - Created srv protocol connection to [address=mongoclusterDNSisOK:27017, user=USERalsoOK].
2021-10-28 16:21:52,535 [1e8531df-4e21-f062-707b-b9cbb72c619e:foreman] INFO  o.a.d.e.s.mongo.MongoStoragePlugin - Number of open connections 1.
2021-10-28 16:21:53,165 [1e8531df-4e21-f062-707b-b9cbb72c619e:foreman] WARN  o.a.d.e.s.m.s.MongoSchemaFactory - Failure while getting collection names from 'config'. Command failed with error 13 (Unauthorized): 'not authorized on config to execute command ...
2021-10-28 16:21:53,208 [1e8531df-4e21-f062-707b-b9cbb72c619e:foreman] WARN  o.a.d.e.s.m.s.MongoSchemaFactory - Failure while getting collection names from 'local'. Command failed with error 13 (Unauthorized): 'not authorized on local to execute command ...
2021-10-28 16:21:58,711 [1e8531df-4e21-f062-707b-b9cbb72c619e:frag:1:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 1e8531df-4e21-f062-707b-b9cbb72c619e:1:0: State change requested AWAITING_ALLOCATION --> FINISHED
2021-10-28 16:21:58,711 [1e8531df-4e21-f062-707b-b9cbb72c619e:frag:1:0] INFO  o.a.d.e.w.f.FragmentStatusReporter - 1e8531df-4e21-f062-707b-b9cbb72c619e:1:0: State to report: FINISHED
2021-10-28 16:21:58,711 [drill-executor-6] ERROR o.a.d.exec.server.BootStrapContext - org.apache.drill.exec.work.WorkManager$WorkerBee$1.run() leaked an exception.
java.lang.NullPointerException: null
	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:347)
	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

The DBs unauthorized are cluster-private stuff, these warning lines are also as DEBUG at 1.18.0 logs but after the query is starting on the requested DB without problems.

To Reproduce Steps to reproduce the behavior:

  1. Create a mongodb cluster storage
  2. Try a query
  3. Check the logs

Expected behavior Running the query

Additional context [version] apache/drill:master-openjdk-14 [DIGEST] 55e6551a8523 (2021/10/28 5:23pm) [OS] docker

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
javier-nieto-nexplorecommented, Nov 3, 2021

Hi @cgivre fully agree NPE is not a great hint, it took me some time to find a trail

we can note down this as a known issue but for me that’s not an 100% acceptable solution, how high should you go with the slice_target to cover your needs i.e.:1M,10M?

also I’m a bit concerned about possible the side effects as we don’t know the root cause of the issue.

1reaction
javier-nieto-nexplorecommented, Nov 3, 2021

Hi @luocooong

logs are a bit dry 😦 but I realized that this is related to a config param (planner.slice_target), looks like it has to be greater than collection doc count, not tested in dist mode though

image

2021-11-03 14:27:40,553 [1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - Query text for query with id 1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1 issued by anonymous: select STREET from mongo_local.fake_data_test.frisco
2021-11-03 14:27:41,848 [1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1:frag:1:0] INFO  o.a.d.e.w.fragment.FragmentExecutor - 1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1:1:0: State change requested AWAITING_ALLOCATION --> FINISHED
2021-11-03 14:27:41,848 [1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1:frag:1:0] INFO  o.a.d.e.w.f.FragmentStatusReporter - 1e7d63a2-9c2f-c629-d5f1-50c47d2ff3b1:1:0: State to report: FINISHED
2021-11-03 14:27:41,848 [drill-executor-7] ERROR o.a.d.exec.server.BootStrapContext - org.apache.drill.exec.work.WorkManager$WorkerBee$1.run() leaked an exception.
java.lang.NullPointerException: null
	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:347)
	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Read more comments on GitHub >

github_iconTop Results From Across the Web

MongoDB cluster becomes unavailable after aggregation query
The past two days I've been having issues with my cluster giving me “An unexpected error occurred. Please try again in a few...
Read more >
Unable to connect to MongoDB Cluster - M001
I can connect to the class cluster used in Chapter 1. ... 2020-01-04T18:58:27.312+0500 E QUERY [js] Error: Authentication failed.
Read more >
Query errors when connecting to Atlas - MongoDB
I am using a Java Driver 3.12.0 to connect to Mongo Atlas Free Tier. I get an error “Query failed with error code...
Read more >
Troubleshoot Sharded Clusters — MongoDB Manual
Cursor Fails Because of Stale Config Data. A query returns the following warning when one or more of the mongos instances has not...
Read more >
Unable to load data into cluster - M001: MongoDB Basics
Hey! After setting the working directory to the folder where loadMovieDetailsDataset.js is located and connecting to my cluster via the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found