GoogleCloudPlatform/fluent-plugin-detect-exceptions

Can add one more rule which judging by user provided pattern

addozhang opened this issue · 3 comments

Provide a pattern parameter, such as time pattern.

If match, flush buffer and add current record to buffer. If not add current record to buffer only without flush.

Because it is not friendly if starts with message contains Exception|Error|Throwable|V8 errors stack trace

I'm not sure I understand what you're proposing here. Can you provide a specific example of an actual stack trace that isn't supported today?

@igorpeshansky As below, what I want is the stacktrace combined with previous one line as single line.

In curent detect exception implementation, the first line of java stacktrace starting with one of Exception|Error|Throwable|V8 errors stack trace. Traditionally, some developers hope the stacktrace

fluentd    | 2018-07-08 15:42:22 +0000 var.log.containers.xxx-gateway-1-w7lhf_xxx_xxx-gateway-3dcd8df0420bbf51629bc9fdbceb30499d55deb987b82465f85a3a732cd0404f.log: {"log":"2018-07-08 23:42:22.271 ERROR [bootstrap,,,] 1 --- [main] o.s.boot.SpringApplication               : Application startup failed\n","stream":"stdout","time":"2018-07-08T15:42:22.272864161Z"}
fluentd    | 2018-07-08 15:42:22 +0000 var.log.containers.xxx-gateway-1-w7lhf_xxx_xxx-gateway-3dcd8df0420bbf51629bc9fdbceb30499d55deb987b82465f85a3a732cd0404f.log: {"log":"\n","stream":"stdout","time":"2018-07-08T15:42:22.272899693Z"}
fluentd    | 2018-07-08 15:42:22 +0000 var.log.containers.xxx-gateway-1-w7lhf_xxx_xxx-gateway-3dcd8df0420bbf51629bc9fdbceb30499d55deb987b82465f85a3a732cd0404f.log: {"log":"org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Unsatisfied dependency expressed through field 'tokenStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenStore' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'jwtTokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenEnhancer' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ....
....

I made simple change to get this. Later I will commit the change. But I am not Ruby developer, so it is better for some others can implement it.

fluentd    | 2018-07-08 15:42:22 +0000 var.log.containers.xxx-gateway-1-w7lhf_xxx_xxx-gateway-3dcd8df0420bbf51629bc9fdbceb30499d55deb987b82465f85a3a732cd0404f.log: {"log":"2018-07-08 23:42:22.271 ERROR [bootstrap,,,] 1 --- [main] o.s.boot.SpringApplication               : Application startup failed\n\norg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Unsatisfied dependency expressed through field 'tokenStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenStore' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'jwtTokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenEnhancer' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat com.xxx.xxx.gateway.xxxGatewayApplication.main(xxxGatewayApplication.java:27) [classes!/:0.3.0-SNAPSHOT]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [xxx-gateway.jar:0.3.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [xxx-gateway.jar:0.3.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [xxx-gateway.jar:0.3.0-SNAPSHOT]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [xxx-gateway.jar:0.3.0-SNAPSHOT]\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenStore' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'jwtTokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenEnhancer' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1071) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 27 common frames omitted\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'jwtTokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenEnhancer' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 39 common frames omitted\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenEnhancer' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1071) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5.jwtTokenEnhancer(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.jwtTokenStore(ResourceServerTokenServicesConfiguration.java:268) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5.CGLIB$jwtTokenStore$0(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5$$FastClassBySpringCGLIB$$7388dd3e.invoke(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5.jwtTokenStore(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 40 common frames omitted\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtTokenEnhancer' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 62 common frames omitted\nCaused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for \"http://xxx-auth:3001/oauth/token_key\": No route to host (Host unreachable); nested exception is java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:674) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:539) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.getKeyFromServer(ResourceServerTokenServicesConfiguration.java:310) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.jwtTokenEnhancer(ResourceServerTokenServicesConfiguration.java:276) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5.CGLIB$jwtTokenEnhancer$1(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5$$FastClassBySpringCGLIB$$7388dd3e.invoke(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration$$EnhancerBySpringCGLIB$$a7606e5.jwtTokenEnhancer(<generated>) ~[spring-boot-autoconfigure-1.5.12.RELEASE.jar!/:1.5.12.RELEASE]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 63 common frames omitted\nCaused by: java.net.NoRouteToHostException: No route to host (Host unreachable)\n\tat java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_171]\n\tat java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_171]\n\tat java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_171]\n\tat java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_171]\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_171]\n\tat java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_171]\n\tat java.net.Socket.connect(Socket.java:538) ~[na:1.8.0_171]\n\tat sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:1.8.0_171]\n\tat sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_171]\n\tat sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_171]\n\tat sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[na:1.8.0_171]\n\tat sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[na:1.8.0_171]\n\tat sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[na:1.8.0_171]\n\tat sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220) ~[na:1.8.0_171]\n\tat sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) ~[na:1.8.0_171]\n\tat sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[na:1.8.0_171]\n\tat sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984) ~[na:1.8.0_171]\n\tat org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:78) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660) ~[spring-web-4.3.16.RELEASE.jar!/:4.3.16.RELEASE]\n\t... 77 common frames omitted\n\n","stream":"stdout","time":"2018-07-08T15:42:22.272864161Z"}

matcher configuration:

<match java.**>
  @type detect_exceptions
  remove_tag_prefix java
  message log
  languages time
  multiline_flush_interval 0.1
</match>