You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/10 11:03:28 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #17524: Error logs were printed to STDERR when exception occurred in event subscriber

TeslaCN opened a new issue, #17524:
URL: https://github.com/apache/shardingsphere/issues/17524

   ## Feature Request
   
   ### Is your feature request related to a problem?
   
   If the exception was catched by `com.google.common.eventbus.EventBus$LoggingHandler`, the error log will be printed to STDERR, while the ShardingSphere-Proxy using logback as logging implementation. The error logs printed to STDERR will not appear in log file create by FileAppender.
   
   ```
   May 10, 2022 6:50:30 PM com.google.common.eventbus.EventBus$LoggingHandler handleException
   SEVERE: Exception thrown by subscriber method start(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.cache.event.StartScalingEvent) on subscriber org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJobWorker@1d3d76b4 when dispatching event: StartScalingEvent(databaseName=bmsql_sharding, activeVersion=0, newVersion=1)
   java.lang.IllegalArgumentException: Invalid binding table configuration in ShardingRuleConfiguration.
   	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
   	at org.apache.shardingsphere.sharding.rule.ShardingRule.<init>(ShardingRule.java:120)
   	at org.apache.shardingsphere.sharding.schedule.ShardingRuleAlteredDetector.findRuleAlteredLogicTables(ShardingRuleAlteredDetector.java:80)
   	at org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJobWorker.createJobConfig(RuleAlteredJobWorker.java:193)
   	at org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJobWorker.start(RuleAlteredJobWorker.java:172)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
   	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
   	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
   	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
   	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108)
   	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule.RuleDefinitionBackendHandler.persistRuleConfigurationChange(RuleDefinitionBackendHandler.java:161)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule.RuleDefinitionBackendHandler.prepareScaling(RuleDefinitionBackendHandler.java:150)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule.RuleDefinitionBackendHandler.execute(RuleDefinitionBackendHandler.java:83)
   	at org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule.RuleDefinitionBackendHandler.execute(RuleDefinitionBackendHandler.java:58)
   	at org.apache.shardingsphere.proxy.backend.text.DatabaseRequiredBackendHandler.execute(DatabaseRequiredBackendHandler.java:51)
   	at org.apache.shardingsphere.proxy.frontend.opengauss.command.query.simple.OpenGaussComQueryExecutor.execute(OpenGaussComQueryExecutor.java:76)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:107)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   
   ![image](https://user-images.githubusercontent.com/20503072/167613783-cbf4bea4-957f-4f0b-9aa1-9328b411b4ad.png)
   
   ### Describe the feature you would like.
   
   Print uncaught exception by our logging API.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] totalo closed issue #17524: Error logs were printed to STDERR when exception occurred in event subscriber

Posted by GitBox <gi...@apache.org>.
totalo closed issue #17524: Error logs were printed to STDERR when exception occurred in event subscriber
URL: https://github.com/apache/shardingsphere/issues/17524


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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