I'm using Eureka as a registry server where Zuul is being registered registered additionally to my application module cmpnyhbaseserialser.
However, when I make a POST request I get the following error:
Forwarding error
com.netflix.zuul.exception.ZuulException: Forwarding error
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:164) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:139) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:84) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:118) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116) ~[zuul-core-1.3.0.jar:1.3.0]
at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81) ~[zuul-core-1.3.0.jar:1.3.0]
at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:157) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:44) [spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) [spring-boot-actuator-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:107) [spring-boot-actuator-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) [tomcat-embed-core-8.5.4.jar:8.5.4]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.4.jar:8.5.4]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.4.jar:8.5.4]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
Caused by: com.netflix.client.ClientException: null
at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:123) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:81) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
at org.springframework.cloud.netflix.zuul.filters.route.support.AbstractRibbonCommand.run(AbstractRibbonCommand.java:96) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.support.AbstractRibbonCommand.run(AbstractRibbonCommand.java:42) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:301) ~[hystrix-core-1.5.6.jar:1.5.6]
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:297) ~[hystrix-core-1.5.6.jar:1.5.6]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.subscribe(Observable.java:10307) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.subscribe(Observable.java:10274) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.BlockingOperatorToFuture.toFuture(BlockingOperatorToFuture.java:51) ~[rxjava-1.1.10.jar:1.1.10]
at rx.observables.BlockingObservable.toFuture(BlockingObservable.java:412) ~[rxjava-1.1.10.jar:1.1.10]
at com.netflix.hystrix.HystrixCommand.queue(HystrixCommand.java:377) ~[hystrix-core-1.5.6.jar:1.5.6]
at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:343) ~[hystrix-core-1.5.6.jar:1.5.6]
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:133) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
... 67 common frames omitted
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
at rx.exceptions.Exceptions.propagate(Exceptions.java:58) ~[rxjava-1.1.10.jar:1.1.10]
at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:465) ~[rxjava-1.1.10.jar:1.1.10]
at rx.observables.BlockingObservable.single(BlockingObservable.java:342) ~[rxjava-1.1.10.jar:1.1.10]
at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:102) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
... 130 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.7.0_17]
at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.7.0_17]
at java.net.SocketInputStream.read(SocketInputStream.java:121) ~[na:1.7.0_17]
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) ~[httpcore-4.4.5.jar:4.4.5]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) ~[httpclient-4.5.2.jar:4.5.2]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.2.jar:4.5.2]
at org.springframework.cloud.netflix.ribbon.apache.RibbonLoadBalancingHttpClient.execute(RibbonLoadBalancingHttpClient.java:101) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at org.springframework.cloud.netflix.ribbon.apache.RibbonLoadBalancingHttpClient.execute(RibbonLoadBalancingHttpClient.java:41) ~[spring-cloud-netflix-core-1.2.2.RELEASE.jar:1.2.2.RELEASE]
at com.netflix.client.AbstractLoadBalancerAwareClient$1.call(AbstractLoadBalancerAwareClient.java:109) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:303) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:287) ~[ribbon-loadbalancer-2.2.0.jar:2.2.0]
at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:231) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:228) ~[rxjava-1.1.10.jar:1.1.10]
at rx.Observable.unsafeSubscribe(Observable.java:10211) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain(OnSubscribeConcatMap.java:286) ~[rxjava-1.1.10.jar:1.1.10]
at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext(OnSubscribeConcatMap.java:144) ~[rxjava-1.1.10.jar:1.1.10]
Beware that ribbon is not the default http client for Zuul anymore. So you have to add ribbon.restclient.enabled=true to make ribbon config work.
The default HTTP client used by zuul is now backed by the Apache HTTP Client instead of the deprecated Ribbon RestClient. To use RestClient or to use the okhttp3.OkHttpClient set ribbon.restclient.enabled=true or ribbon.okhttp.enabled=true respectively.
It could be the hystrix timeout as Nikhil Pareek suggests or the ribbon timeouts or both. Best try:
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
ribbon:
ConnectTimeout: 10000
ReadTimeout: 10000
I'd suggest both as the stacktrace matches com.netflix.zuul.exception.ZuulException: Forwarding error while calling microservice and in that case the hystrix timeout was already set.
Just increase hystrix timeout
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
Related
I have seen this question here but there not working for me.
I currently have taken apart a psm1 file with 200 functions and separated them into individual files.
Functions are separated into public and private functions
\\nasShare\dbasupport\Powershell\Modules\SQLdbatools\SQLdbatools\public
\\nasShare\dbasupport\Powershell\Modules\SQLdbatools\SQLdbatools\private
This is what my new SQLdbatools.psm1 file looks like
#Get public and private function definition files.
$Public = #( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue )
$Private = #( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue )
#Dot source the files
Foreach($import in #($Public + $Private))
{
Try
{
. $import.fullname
}
Catch
{
Write-Error -Message "Failed to import function $($import.fullname): $_"
}
}
Export-ModuleMember -Function $Public.Basename
But the Export-ModuleMember gives me an error that command cant be run from psm1 file
Contents of SQLdbatools.ps1xml file
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<View>
<Name>Default</Name>
<ViewSelectedBy>
<TypeName>SQLdbatools.Question</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>48</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>12</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>5</Width>
</TableColumnHeader>
<TableColumnHeader>
<Label>Owner</Label>
<Width>15</Width>
</TableColumnHeader>
<TableColumnHeader>
<Label>Tags</Label>
<Width>20</Width>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap />
<TableColumnItems>
<TableColumnItem>
<PropertyName>Title</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Answer_Count</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Score</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>$_.Owner.display_name</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>($_.Tags | Sort-Object) -Join ', '</ScriptBlock>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Default</Name>
<ViewSelectedBy>
<TypeName>SQLdbatools.Answer</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>50</Width>
</TableColumnHeader>
<TableColumnHeader>
<Label>Owner</Label>
<Width>20</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>5</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>11</Width>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap />
<TableColumnItems>
<TableColumnItem>
<PropertyName>Share_Link</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>$_.Owner.display_name</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Score</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Is_Accepted</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
contents of my SQLdbatools.psd1 file
#{
# Script module or binary module file associated with this manifest.
RootModule = 'SQLdbatools.psm1'
# Version number of this module.
ModuleVersion = '1.0.0'
# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = 'SQLdbatools.Format.ps1xml'
# Functions to export from this module
FunctionsToExport = '*'
# Cmdlets to export from this module
CmdletsToExport = '*'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module
AliasesToExport = '*'
}
I have ran the SQLdbatools.psm1 without
Export-ModuleMember -Function $Public.Basename
it will not fail but the ps1 files don't load. Is there something wrong in the code or am I not setting this Module up correctly.
Error when trying to import module
Import-Module SQLdbatools
Import-Module : The specified module 'SQLdbatools' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module SQLdbatools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (SQLdbatools:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
This is my baby:
$path = "C:\Users\Dell\Downloads\FNB 1 Trans\File Creation\DDINP"
$list = Get-ChildItem $path -Recurse -Include "*.xml"
$initialvar= '000625514690'
$newvar = $null
foreach($item in $list)
{
(Get-Content -Raw $item) -replace '(?<=/)000(?=\d)',(Get-Random -Minimum 111 -Maximum 999) |Set-Content -NoNewLine $item
}
This code works 100%, but I have a requirement that needs to change the 000625514690 to an incremental value so I'd like it to look like this 000625514690 --> 000000000001, 000000000002 etc.
The scenario is that there is a file that has 50 0000 of this transaction I'd, and the in the Folder there is another file etc.
Please may I ask for help. I have tried my own flavor of code but it doesnt work and looks horrendous...
$path = "C:\Users\Dell\Downloads\FNB 1 Trans\File Creation\DDINP"
$list = Get-ChildItem $path -Recurse -Include "*.xml"
$initialvar= '000625514690'
$newvar = $null
$arr = #()
1..999999999 | ForEach-Object { $arr += $_.ToString("000000000")}
foreach($item in $list)
{
(Get-Content -Raw $item) -replace '(?<=/)000625514690(?=\d)',('arr') |Set-Content -NoNewLine $item
}
This is an example of the XML with one
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.003.001.03">
<FIToFICstmrDrctDbt>
<GrpHdr>
<MsgId>021/DDINP/00210001/20210419/100001</MsgId>
<CreDtTm>2021-04-19T04:14:04</CreDtTm>
<Authstn>
<Prtry>A7A8E0D499CD8055382AA924</Prtry>
</Authstn>
<NbOfTxs>1</NbOfTxs>
<CtrlSum>404685763</CtrlSum>
<TtlIntrBkSttlmAmt Ccy="ZAR">750.00</TtlIntrBkSttlmAmt>
<IntrBkSttlmDt>2021-04-20</IntrBkSttlmDt>
<SttlmInf>
<SttlmMtd>CLRG</SttlmMtd>
<ClrSys>
<Prtry>AC</Prtry>
</ClrSys>
</SttlmInf>
<InstgAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>210001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>210000</MmbId>
</ClrSysMmbId>
</FinInstnId>
</InstdAgt>
</GrpHdr>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-19/000265498</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-19</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210419100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>404610763</Id>
</Othr>
</Id>
<Tp>
<Prtry>CACC</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>632005</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</FIToFICstmrDrctDbt>
</Document>
and here is one that has 5
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.003.001.03">
<FIToFICstmrDrctDbt>
<GrpHdr>
<MsgId>021/DDINP/00210001/20210416/100001</MsgId>
<CreDtTm>2021-04-16T10:01:54</CreDtTm>
<Authstn>
<Prtry>A7A8E0D499CD8055382AA924</Prtry>
</Authstn>
<NbOfTxs>5</NbOfTxs>
<CtrlSum>305586841770</CtrlSum>
<TtlIntrBkSttlmAmt Ccy="ZAR">3750.00</TtlIntrBkSttlmAmt>
<IntrBkSttlmDt>2021-04-17</IntrBkSttlmDt>
<SttlmInf>
<SttlmMtd>CLRG</SttlmMtd>
<ClrSys>
<Prtry>AC</Prtry>
</ClrSys>
</SttlmInf>
<InstgAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>210001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>210000</MmbId>
</ClrSysMmbId>
</FinInstnId>
</InstdAgt>
</GrpHdr>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-16/000728670</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-16</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210416100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>61117293354</Id>
</Othr>
</Id>
<Tp>
<Prtry>SVGS</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>410600</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-16/000876801</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-16</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210416100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>61117293354</Id>
</Othr>
</Id>
<Tp>
<Prtry>SVGS</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>410600</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-16/000606745</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-16</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210416100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>61117293354</Id>
</Othr>
</Id>
<Tp>
<Prtry>SVGS</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>410600</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-16/000951332</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-16</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210416100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>61117293354</Id>
</Othr>
</Id>
<Tp>
<Prtry>SVGS</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>410600</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>CE1CE1ad3cac</EndToEndId>
<TxId>0001/2021-04-16/000629765</TxId>
</PmtId>
<PmtTpInf>
<LclInstrm>
<Prtry>03</Prtry>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
<CtgyPurp>
<Prtry>0046</Prtry>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="ZAR">750.00</IntrBkSttlmAmt>
<ChrgBr>SLEV</ChrgBr>
<ReqdColltnDt>2021-04-16</ReqdColltnDt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>0021000120210416100001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Cdtr>
<Nm>CASHMAN HYPHEN GROUP</Nm>
<CtctDtls>
<PhneNb>+27-(0)722282282</PhneNb>
</CtctDtls>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>21452954</Id>
</Othr>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>051001</MmbId>
</ClrSysMmbId>
</FinInstnId>
</CdtrAgt>
<Dbtr>
<Nm>Warren Bates</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>61117293354</Id>
</Othr>
</Id>
<Tp>
<Prtry>SVGS</Prtry>
</Tp>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<ClrSysMmbId>
<MmbId>410600</MmbId>
</ClrSysMmbId>
</FinInstnId>
</DbtrAgt>
<RmtInf>
<Ustrd>OBIZCERFLACOLC337-4926961711177595059802</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</FIToFICstmrDrctDbt>
</Document>
If possible how would I say the one txid is 1, and then in the next file (the 100) one say, 2,3,4,5,6? - them being in 2 different files but in the same folder...
I am trying to deploy a zip file to nexus using deploy:deploy-file but maven still not happy about this and is complaining about a missing project/pom file. Below is the code snippet and debug log
$params =
#(
"deploy:deploy-file",
"-X",
"-e",
"-DartifactId=${env:ZIP_PREFIX}",
"-Dmaven.wagon.provider.http=httpclient",
"-Durl=http://abc-nexus.repo.net:9081/repository/releases-prod-dist",
"-DrepositoryId=releases-prod-dist",
"-DgroupId=$nexusPath",
"-Dversion=$fullVersion",
"-Dpackaging=zip",
"-Dfile=$reviewArea\$zipName"
)
Start-Process "java" -ArgumentList #("-version") -Wait -NoNewWindow
Start-Process "mvn" -ArgumentList #("-version") -Wait -NoNewWindow
Write-Output "Start-Process mvn -NoNewWindow -Wait -ArgumentList ${params}"
Start-Process mvn -NoNewWindow -PassThru -Wait -ArgumentList $params
2020-09-11T06:17:27.7943241Z [INFO] Scanning for projects...
2020-09-11T06:17:27.9140863Z [DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
2020-09-11T06:17:27.9466573Z [DEBUG] Looking up lifecycle mappings for
packaging pom from ClassRealm[plexus.core, parent: null]
2020-09-11T06:17:27.9641628Z [INFO] ------------------------------------------------------------------------
2020-09-11T06:17:27.9643764Z [INFO] BUILD FAILURE
2020-09-11T06:17:27.9645595Z [INFO] ------------------------------------------------------------------------
2020-09-11T06:17:27.9684029Z [INFO] Total time: 0.250 s
2020-09-11T06:17:27.9689684Z [INFO] Finished at: 2020-09-10T23:17:27-07:00
2020-09-11T06:17:28.0604956Z [INFO] Final Memory: 6M/245M
2020-09-11T06:17:28.0608153Z [INFO] ------------------------------------------------------------------------
2020-09-11T06:17:28.0695335Z [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\AzureRemoteAgent\_work\r16\a). Please verify you invoked Maven from the correct directory. -> [Help 1]
2020-09-11T06:17:28.0700315Z org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (C:\AzureRemoteAgent\_work\r16\a). Please verify you invoked Maven from the correct directory.
2020-09-11T06:17:28.0703641Z at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:85)
2020-09-11T06:17:28.0708399Z at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
2020-09-11T06:17:28.0710747Z at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
2020-09-11T06:17:28.0712639Z at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
2020-09-11T06:17:28.0714330Z at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
2020-09-11T06:17:28.0716002Z at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
2020-09-11T06:17:28.0717718Z at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
2020-09-11T06:17:28.0719285Z at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
2020-09-11T06:17:28.0721040Z at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
2020-09-11T06:17:28.0723365Z at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
2020-09-11T06:17:28.0725220Z at java.lang.reflect.Method.invoke (Method.java:498)
2020-09-11T06:17:28.0727008Z at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
2020-09-11T06:17:28.0729074Z at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
2020-09-11T06:17:28.0731080Z at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
2020-09-11T06:17:28.0733229Z at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Atleast in Powershell, every argument needs to be enclosed in double quotes. I ended up doing single quotes around arguments that don't have variables and backticks around the ones that do. This preserves the double quotes in arguments and variables are expanded.
$params =
#(
'"deploy:deploy-file"',
'"-X"',
'"-e"',
"`"-DartifactId=${env:ZIP_PREFIX}`"",
'"-Dmaven.wagon.provider.http=httpclient"',
'"-Durl=http://abc-nexus.repo.net:9081/repository/releases-prod-dist"',
'"-DrepositoryId=releases-prod-dist"',
"`"-DgroupId=$nexusPath`"",
"`"-Dversion=$fullVersion`"",
'"-Dpackaging=zip"',
"`"-Dfile=$parentDir\$zipName`""
)
how do i remake this program to enter value of percent from power shell prompt?
how do i modify this code to enter percent value from powershell prompt
$inputpercent = Read-Host -Prompt 'percent:'
$outputFile = 'MIK_Neva.xml'
$utf8WithoutBom = New-Object System.Text.UTF8Encoding($false)
$sw = New-Object System.IO.StreamWriter($outputFile, $false, $utf8WithoutBom)
[xml](Get-Content "$outputFile") | ForEach-Object {$_.SelectNodes('//FieldCostOptions/IncreaseCost') | ForEach-Object {$_.SetAttribute("Percent", $inputpercent)};# $_.Save('Output.xml')}
$xml.Save( $sw )
$sw.Close()
}
and got an error
PS C: \ program> $ inputpercent = Read-Host -Prompt 'percent:'
$ outputFile = 'MIK_Neva.xml'
$ utf8WithoutBom = New-Object System.Text.UTF8Encoding ($ false)
$ sw = New-Object System.IO.StreamWriter ($ outputFile, $ false, $ utf8WithoutBom)
[xml] (Get-Content "$ outputFile") | ForEach-Object {$ _. SelectNodes ('// FieldCostOptions / IncreaseCost') | ForEach-Object {$ _. SetAttribute ("Percent", $ inputpercent)}; # $ _. Save ('Output.xml')}
$ xml.Save ($ sw)
$ sw.Close ()
}
percent :: 8
Cannot call a method for an expression with a NULL value.
line: 5 character: 52
+ ... ach-Object {$ _. SelectNodes ('// FieldCostOptions / IncreaseCost') | ForE ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ ~~~~~~~~
+ CategoryInfo: InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId: InvokeMethodOnNull
file MIK_Neva.xml
<?xml version="1.0" encoding="utf-8"?>
<PriceConfiguration Name="MIK_Neva" Version="1"><Description></Description><AuthorID>s0011373519</AuthorID><LastEditedBy>s0011373519</LastEditedBy><LastUpdate>14.11.2019 12:56:45</LastUpdate><File Type="XLS" Engine="0"><FilesMask>E:\FTP\PRICE_FORCEAUTO_MIK\NevaAvtocom.xlsx</FilesMask><IncludeFiles></IncludeFiles><ExcludeFiles></ExcludeFiles><Macro OnStart=""/><XLSoptions><Password></Password><MergeXLSsheets>1</MergeXLSsheets></XLSoptions><CSVoptions><RowsSeparator>13-10</RowsSeparator><ColumnsSeparator>59</ColumnsSeparator><AddHeaderRow>0</AddHeaderRow><UseBrackets>0</UseBrackets><Encoding>windows-1251</Encoding></CSVoptions><ReplaceTable Name="Price Codes" IsEmpty="False"><Replacement Find="{#КодПрайса}" ReplaceWith=""/><Replacement Find="{#ИмяФайлаДляПрайса}" ReplaceWith=""/></ReplaceTable></File><Sheets><SheetConfiguration index="1"><Name>Обработчик листа</Name><Description></Description><SheetSelectMode>1</SheetSelectMode><SheetName>остатки Микадо</SheetName><SheetIndex>1</SheetIndex><ReplaceTable Name="Price Sheet Codes" IsEmpty="False"><Replacement Find="{#КодЛиста}" ReplaceWith=""/><Replacement Find="{#ИмяФайлаДляЛиста}" ReplaceWith=""/></ReplaceTable><PriceFields><Field index="1" Enable="1"><Name>Артикул</Name><SheetColumn>1</SheetColumn><UseCellText>1</UseCellText><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/><ReplaceTableName>Артикул (EMEX_Neva)</ReplaceTableName></Field><Field index="2" Enable="1"><Name>Наименование</Name><SheetColumn>2</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/><ReplaceTableName>Наименование (FA)</ReplaceTableName></Field><Field index="3" Enable="1"><Name>Производитель</Name><SheetColumn>5</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="4" Enable="1"><Name>Наличие</Name><SheetColumn>3</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="5" Enable="1"><Name>Цена</Name><SheetColumn>4</SheetColumn><Required>1</Required><ValueMode>0</ValueMode><KeepValue>1</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="1" Version="1"><Function CodeName="CompareNumbers" Enabled="1" param1="3000" param2="1000000"/></FieldFunctions><FieldConditions Enable="1" Version="1"/><FieldCostOptions Enabled="1" Version="1"><IncreaseCost Enabled="1" Percent="-5"/></FieldCostOptions></Field><Field index="6" Enable="1"><Name>ЦенаЗакупа</Name><SheetColumn>4</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="7" Enable="1"><Name>ПР</Name><SheetColumn>1</SheetColumn><ValueMode>1</ValueMode><Formula>NevaAvtocom</Formula><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="8"><Name>Срок_ZZAP</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="9"><Name>КодСтраны</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="10"><Name>Страна</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="11"><Name>ГТД</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="12"><Name>ИНН_Поставщика</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="13"><Name>КПП_Поставщика</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="14"><Name>НомерН</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="15"><Name>ДатаН</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="16"><Name>НомерСчета</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="17"><Name>ДатаСчета</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="18"><Name>НамерСФ</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field><Field index="19"><Name>ДатаСФ</Name><SheetColumn>1</SheetColumn><ValueMode>0</ValueMode><KeepValue>0</KeepValue><KeepLevel>0</KeepLevel><FieldFunctions Enabled="0" Version="1"/><FieldConditions Enable="0" Version="1"/></Field></PriceFields><FirstRow>2</FirstRow><LastRowColumn>1</LastRowColumn></SheetConfiguration></Sheets></PriceConfiguration>
In your code, using ".Percent" - Object's that returned from SelectSingleNode is not parsed to some class with field Percent. It's only XmlNodes that has methods to work wot atributes
You should use
x.SelectSingleNode ('// FieldCostOptions / IncreaseCost').SetAttribute("Percent", -5)
Please, or you can use this example to execute all in one line:
[xml](Get-Content "input.xml") | ForEach-Object {$_.SelectNodes('// FieldCostOptions/IncreaseCost') | ForEach-Object {$_.SetAttribute("Percent", -5)}; $_.Save('Output.xml')}
If you want to write a script, is it something you want?
$inputFile = Read-Host -Prompt 'Input file name to process'
$outputFile = Read-Host -Prompt 'Output file name'
$xml = New-Object -TypeName XML
$xml.Load($inputFile)
$utf8WithoutBom = New-Object System.Text.UTF8Encoding($false)
$sw = New-Object System.IO.StreamWriter($outputFile, $false, $utf8WithoutBom)
$xml.Save( $sw )
$sw.Close()
I have 5 node Kafka cluster with Zookeeper running on 3 nodes. My consumer is not draining the messages from topic. My consumer app throws the below error
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] TS=2018-05-23 02:00:56,thread=[kafka-coordinator-heartbeat-thread | dcm-onhands],level=ERROR,appName=${cf:application_name},space=${cf:space_name},class=AbstractCoordinator$HeartbeatThread:51,msg=Uncaught exception in thread 'kafka-coordinator-heartbeat-thread | dcm-onhands':
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:528) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] java.lang.OutOfMemoryError: Direct buffer memory
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at java.nio.Bits.reserveMemory(Bits.java:694) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at sun.nio.ch.IOUtil.read(IOUtil.java:195) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:1.8.0_152]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.PlaintextTransportLayer.read(PlaintextTransportLayer.java:109) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:145) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:93) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:231) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:192) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:469) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.common.network.Selector.poll(Selector.java:398) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:460) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:238) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.pollNoWakeup(ConsumerNetworkClient.java:275) ~[kafka-clients-1.0.0.jar!/:?]
2018-05-22T22:00:56.354-04:00 [APP/PROC/WEB/2] [OUT] at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$HeartbeatThread.run(AbstractCoordinator.java:934) ~[kafka-clients-1.0.0.jar!/:?]
My consumer configs are given below
maxpollrecordsconfig = 25000
sessiontimeoutms = 30000
Server Config
KAFKA_HEAP_OPTS="-Xmx2G -Xms2G"
I am facing this issue with other consumers also
Direct memory (which Kafka uses a lot for performance) is allocated off heap (so not controlled by the usual -Xmx parameter) and the maximum is configured using:
-XX:MaxDirectMemorySize
This article explains more details if you're interested:
https://dzone.com/articles/default-hotspot-maximum-direct-memory-size