You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/11/18 17:19:10 UTC

[GitHub] [druid] sh-vs opened a new issue #11948: Web Console throwing error when requireTimeCondition is enabled

sh-vs opened a new issue #11948:
URL: https://github.com/apache/druid/issues/11948


   When the Broker setting `druid.sql.planner.requireTimeCondition` is set to `true` the Web Console displays a red pop-up box with the error, "It appears that the service serving this console is not responding. The console will not function at the moment."
   
   ### Affected Version
   
   0.22.0
   
   ### Description
   
   Here is a screenshot of the error. You can see from the Services view that this is a small cluster, one we use for testing new Druid versions and features.
   ![image](https://user-images.githubusercontent.com/80288903/142452506-3bc8e573-e94c-4a68-9ac6-b9070cd7e159.png)
   
   We can close the red error box and the console seems to function normally. We can navigate between sections in the console without seeing the error again, and use any features of the console without an error. The pop-up is only displayed when any console page is loaded for the first time. 
   
   When we use Chrome Dev Tools and reload any console page we see the following error being reported when the red error box pops up.
   ```
   error: "Unknown exception"
   errorClass: "org.apache.druid.sql.calcite.rel.CannotBuildQueryException"
   errorMessage: "requireTimeCondition is enabled, all queries must include a filter condition on the __time column"
   host: null
   ```
   
   We see this error in the Broker logs when the red error box is displayed.
   ```json
   {"timeMillis":1637254254118,"thread":"sql[64bdbc45-8c21-4e2f-8317-9ad8790940c7]","level":"INFO","loggerName":"org.apache.druid.server.log.LoggingRequestLogger","message":"2021-11-18T16:50:54.114Z\t10.43.203.243\t\t{\"sqlQuery/time\":3,\"sqlQuery/bytes\":-1,\"success\":false,\"context\":{\"timeout\":2000,\"sqlQueryId\":\"64bdbc45-8c21-4e2f-8317-9ad8790940c7\",\"nativeQueryIds\":\"[]\"},\"identity\":\"me\",\"exception\":\"org.apache.druid.sql.calcite.rel.CannotBuildQueryException: requireTimeCondition is enabled, all queries must include a filter condition on the __time column\"}\t{\"query\":\"SELECT 1337\",\"context\":{\"timeout\":2000,\"sqlQueryId\":\"64bdbc45-8c21-4e2f-8317-9ad8790940c7\",\"nativeQueryIds\":\"[]\"}}","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":148,"threadPriority":5}
   ```
   
   Additionally, step 6 of 9 ("Verify that SQL works") in the Druid Doctor fails with the same time filter error.
   <img src="https://user-images.githubusercontent.com/80288903/142450115-6465e302-54b9-4d05-8783-9e3984325366.png" width=50% height=50%>
   
   This is the error we see in the Broker logs when the Druid Doctor fails. 
   ```json
   {"timeMillis":1637251887411,"thread":"sql[33b439af-7af0-4e80-be01-4cbbcb45adc5]","level":"INFO","loggerName":"org.apache.druid.server.log.LoggingRequestLogger","message":"2021-11-18T16:11:27.406Z\t10.43.203.243\t\t{\"sqlQuery/time\":5,\"sqlQuery/bytes\":-1,\"success\":false,\"context\":{\"sqlQueryId\":\"33b439af-7af0-4e80-be01-4cbbcb45adc5\",\"nativeQueryIds\":\"[]\"},\"identity\":\"me\",\"exception\":\"org.apache.druid.sql.calcite.rel.CannotBuildQueryException: requireTimeCondition is enabled, all queries must include a filter condition on the __time column\"}\t{\"query\":\"SELECT 1 + 1 AS \\\"two\\\"\",\"context\":{\"sqlQueryId\":\"33b439af-7af0-4e80-be01-4cbbcb45adc5\",\"nativeQueryIds\":\"[]\"}}","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":164,"threadPriority":5}
   ```
   
   As a test we changed the `druid.sql.planner.requireTimeCondition` setting to `false`, and redeployed the Broker node. The red error box no longer displayed, and the Druid Doctor checks all passed.
   
   We enabled this option when we upgraded to Druid 0.21.1, and are not experiencing this issue with it. We do not see the red error box in the console, and all Druid Doctor checks pass. We see the same `SELECT 1 + 1 AS "two"` query in our 0.21.1 Broker logs, but it is not resulting in the time filter error. We do see other requireTimeCondition failures in our 0.21.1 logs because we have users who do unbound queries, which is why we need this option enabled.
   
   ```json
   {"timeMillis":1637252216642,"thread":"qtp1015552283-152","level":"INFO","loggerName":"org.apache.druid.server.log.LoggingRequestLogger","message":"2021-11-18T16:16:56.638Z\t10.43.203.146\t\t{\"sqlQuery/time\":4,\"sqlQuery/bytes\":12,\"success\":true,\"context\":{\"sqlQueryId\":\"69423d0e-e348-4b91-9672-818ff5acec27\",\"nativeQueryIds\":\"[]\"},\"identity\":\"me\"}\t{\"query\":\"SELECT 1 + 1 AS \\\"two\\\"\",\"context\":{\"sqlQueryId\":\"69423d0e-e348-4b91-9672-818ff5acec27\",\"nativeQueryIds\":\"[]\"}}","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":152,"threadPriority":5}
   ```
   
   I can manually run that query in the Druid 0.21.1 console without getting the time filter error.
   <img src="https://user-images.githubusercontent.com/80288903/142459396-a201cf83-b832-43f7-aade-a9c5a70dd187.png" width=50% height=50%>
   
   The same query fails in the Druid 0.22.0 console.
   <img src="https://user-images.githubusercontent.com/80288903/142459497-52cc9d0e-6e7b-42de-88b4-468776f5b51a.png" width=50% height=50%>
   
   From this troubleshooting it appears that in 0.21.1 the requireTimeCondition setting only applied to queries against a Datasource, while in 0.22.0 it now applies to all queries.
   
   If requested I can provide additional configuration, and information about the cluster.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] kfaraz commented on issue #11948: Web Console throwing error when requireTimeCondition is enabled

Posted by GitBox <gi...@apache.org>.
kfaraz commented on issue #11948:
URL: https://github.com/apache/druid/issues/11948#issuecomment-976955056


   @sh-vs , thanks for reporting this issue.
   I have created PR #11982 to address this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] abhishekagarwal87 closed issue #11948: Web Console throwing error when requireTimeCondition is enabled

Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 closed issue #11948:
URL: https://github.com/apache/druid/issues/11948


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org