com.netflix.zuul.exception.ZuulException: Forwarding error - netflix-zuul

I want to run a multiple number of concurrent requests through the Zuul gateway using Eureka servers.
When doing this, I faced this Error Internal server error 500. Any solution or suggestion to solve this are welcome.
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: YYYYY could not acquire a semaphore for execution and no fallback available.
Caused by: java.lang.RuntimeException: could not acquire a semaphore for execution

try to increase the executionIsolationSemaphoreMaxConcurrentRequests from your hystrix configuration, like this:
public HystrixCommandInstance() {
super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("SomeGroupName"))
.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
.withExecutionIsolationSemaphoreMaxConcurrentRequests(200)));}

Related

KeyCloak: Connection has been refused by the server. Connection timed out

Occasionally I receive a connection timeout when calling the /userinfo endpoint of my KeyCloak-Server.
So far, I have no indication what's wrong and what causes the timeouts. There are no errors in the server.log I configured. Also, I cannot reproduce the issue, I just see the errors in the logs of the application trying to authenticate with keycloak.
Is there some sort of connection limit that my keycloak might use?
List item
What additional logs can I activate to narrow down the problem?
I am currently on version 17.0.1
Try running keycloak in debug mode kc.sh start --log-level=debug If the /userinfo call reached the keycloak then there will be a debug log for that, you can match the time when error occurred to the keycloak log.
Do you have any other components in between your application and keycloak such as proxy, a DNS server etc ? You would need to check their logs as well.
Also check out this document regarding rest api in keycloak -> https://github.com/keycloak/keycloak-community/blob/main/design/rest-api-guideline.md#rate-lmiting

Mule SocketException: Connection reset

I have a mule application which exposes a rest webservice.
<inbound-endpoint exchange-pattern="request-response" address="${webservice.url}" doc:name="Generic"></inbound-endpoint>
I am using jersey resources for rest component.
The code works fine in QA but in UAT it throws the following error.
ERROR org.mule.exception.DefaultSystemExceptionStrategy - Caught exception in Exception Strategy: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209) ~[?:1.8.0_111]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_111]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[?:1.8.0_111]
at java.io.BufferedInputStream.read(BufferedInputStream.java:265) ~[?:1.8.0_111]
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) ~[commons-httpclient-3.1.jar:?]
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) ~[commons-httpclient-3.1.jar:?]
at org.mule.transport.http.HttpServerConnection.readLine(HttpServerConnection.java:245) ~[mule-transport-http-3.8.1.jar:3.8.1]
at org.mule.transport.http.HttpServerConnection.getRequestLine(HttpServerConnection.java:557) ~[mule-transport-http-3.8.1.jar:3.8.1]
at org.mule.transport.http.HttpRequestDispatcherWork.run(HttpRequestDispatcherWork.java:67) ~[mule-transport-http-3.8.1.jar:3.8.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Telnet to the port is working. cron jobs are working fine in the server except the rest methods.
Connection request means that the other side closed the connection. Given that the application works in one environment I assume that the problem is the environment. You have to find out what is different between the environments to cause that problem. Is there anything between the client and the Mule application? A load balancer, proxy, etc? Difference in timeouts? Performing a network traffic capture from both sides could be helpful to isolate the problem.

WSO2 MI Infinite loop on invalid request line

I run a very simple micro integrator service that only has 1 proxy service and a single sequence. In this sequence the incoming XML message is transferred to amazon SQS service.
If I run this in the Integration Studio on the instance that comes built in I have no problems. However, when I package the file into a CAR and feed it to the docker instance it will boot up and instantly gets bombarded with requests? That is to say, the following logs take over and the container can no longer be manually stopped:
[2020-04-15 12:45:44,585] INFO
{org.apache.synapse.transport.passthru.SourceHandler} - Writer null
when calling informWriterError ^[[?62;c^[[?62;c[2020-04-15
12:45:46,589] ERROR
{org.apache.synapse.transport.passthru.SourceHandler} - HttpException
occurred org.apache.http.ProtocolException: Invalid request line:
ÇÃ^ú§ß¡ðO©%åË*29xÙVÀ$À(=À&À*kjÀ at
org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:208)
at
org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection$LoggingNHttpMessageParser.parse(LoggingNHttpServerConnection.java:407)
at
org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection$LoggingNHttpMessageParser.parse(LoggingNHttpServerConnection.java:381)
at
org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:265)
at
org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection.consumeInput(LoggingNHttpServerConnection.java:114)
at
org.apache.synapse.transport.passthru.ServerIODispatch.onInputReady(ServerIODispatch.java:82)
at
org.apache.synapse.transport.passthru.ServerIODispatch.onInputReady(ServerIODispatch.java:39)
at
org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:113)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
at
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
at java.lang.Thread.run(Thread.java:748) Caused by:
org.apache.http.ParseException: Invalid request line:
ÇÃ^þvHÅFmÉ
(#ë¸'º¯æ¦V
I made sure there were no outside connections possible and I also found the older threads of someone describing this problem, but their solution (changing something in the keystore) did not work.
Also, I made sure to include the SQS certificate in the container as well.
I have no connections setup to connect to the container so that will be out of the equation as well.
What am I missing here?
I have no idea why, but I have identified the culprit to be none other than Portainer. When I shutdown Portainer the stream of requests stops.
According to Wireshark, the requests are all made towards
GET
http://172.17.0.1:9000/api/endpoints/< containerID >/docker/< someId >/logs
It seems that because the WSO2 container I'm trying to run is an ESB that uses endpoints and returns 400 status codes on non-existing endpoints portainer will retry until it succeeds. This is just my observation, so I could be wrong.
I have confirmed my findings by uploading my container to AWS where the problem did not exist.

Caused by: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /null/swagger-resources/configuration/ui

Getting the below exception while starting the spring boot application.
Exception:
Caused by: org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /null/swagger-resources/configuration/ui
Swagger gradle dependencies versions are as below
compile('io.springfox:springfox-swagger2:2.7.0')
compile('io.springfox:springfox-swagger-ui:2.7.0')
you need close like this browser tab.
my spring boot application port is 8888, when i close this tab and restart my spring boot application, the error is gone.
Hopefully it is the issue with IntelliJ editor. I'm running multiple microservices on different ports and shutting them down once the work is done, but IJ editor might have cached the port(which it already shut down) and causing this confusion and error. I have restarted the service with a different port, and the error is gone.
Note: In general, we will get BIND ERROR : Address already in use, if any other service is running on the same port.

Spring Cloud Dataflow ticktock example fails in CloudFoundry

I'm trying to get most basic example for Spring Cloud Dataflow running on CloudFoundry.
I've followed the steps here: http://docs.spring.io/spring-cloud-dataflow-admin-cloudfoundry/docs/current-SNAPSHOT/reference/htmlsingle/#getting-started to make the admin app available in my org/space.
Then I tried to create the most basic example from http://cloud.spring.io/spring-cloud-dataflow/, namely to create the "ticktock" stream:
dataflow:>stream create ticktock --definition "time | log" --deploy
I can see that both apps ticktock-time and ticktock-log are created in the space, the needed service "redis" is bound to these apps and they try to start. Unfortunately they don't start completely, because they have problem to access "redis" service. In the log we find:
Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.context.ApplicationContextException: Failed to
start bean 'outputBindingLifecycle'; nested exception is
org.springframework.context.ApplicationContextException: Failed to
start bean 'inputBindingLifecycle'; nested exception is
org.springframework.data.redis.RedisConnectionFailureException: Cannot
get Jedis connection; nested exception is
redis.clients.jedis.exceptions.JedisConnectionException: Could not get
a resource from the pool
which eventually is caused by
Caused by: redis.clients.jedis.exceptions.JedisConnectionException:
java.net.ConnectException: Connection refused
Am I missing some configuration step in between?
Alexander
There seems to be an issue with our deployer using the master branch of the Java buildpack. Try these settings for the Dataflow Server:
cf set-env s-c-dataflow-server CLOUDFOUNDRY_BUILDPACK https://github.com/cloudfoundry/java-buildpack.git#v3.6
cf restage s-c-dataflow-server
Also, be aware that we currently launch apps using "streamname-module" as part of the URL so unless you use unique stream names you might collide with other users and get a "400 Bad Request" error.

Resources