Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upHystrix filter throw exception with post request #593
Comments
spring-issuemaster
added
the
waiting-for-triage
label
Oct 10, 2018
ryanjbaxter
closed this
Oct 10, 2018
ryanjbaxter
removed
the
waiting-for-triage
label
Oct 10, 2018
ryanjbaxter
reopened this
Oct 10, 2018
ryanjbaxter
added
the
waiting-for-triage
label
Oct 10, 2018
This comment has been minimized.
This comment has been minimized.
@ryanjbaxter have any ideas? |
This comment has been minimized.
This comment has been minimized.
Nope will need to look into it, please be patient. |
This comment has been minimized.
This comment has been minimized.
ok, thx. |
This comment has been minimized.
This comment has been minimized.
I was not able to reproduce this, maybe you can provide a sample? |
ryanjbaxter
added
waiting for feedback
and removed
waiting-for-triage
labels
Nov 7, 2018
This comment has been minimized.
This comment has been minimized.
https://github.com/keets2012/microservice-integration/blob/master/gateway-enhanced A module named gateway-enhanced. You can run the app and post request for A global hystrix filter. You can see as follows: spring:
redis:
host: localhost
password: pwd
port: 6378
cloud:
gateway:
locator:
enabled: true
default-filters:
- name: RequestRateLimiter
args:
key-resolver: "#{@remoteAddrKeyResolver}"
rate-limiter: "#{@customRateLimiter}" # token
- name: Hystrix
args:
name: fallbackcmd
fallbackUri: forward:/fallbackcontroller |
spring-issuemaster
added
feedback-provided
and removed
waiting for feedback
labels
Nov 12, 2018
This comment has been minimized.
This comment has been minimized.
Is there are service called auth registered in consul?
|
spencergibb
added
waiting for feedback
and removed
feedback-provided
labels
Nov 12, 2018
This comment has been minimized.
This comment has been minimized.
no. Am I misunderstood hystrixFilter? I post for |
spring-issuemaster
added
feedback-provided
and removed
waiting for feedback
labels
Nov 12, 2018
This comment has been minimized.
This comment has been minimized.
seraphain
commented
Dec 7, 2018
In line 810 of hystrix AbstractCommand, I found an exception fe. It's the cause of the fallback error. 2018-12-07 22:13:29.440 DEBUG 112408 --- [reactor-http-nio-2:HiQvSD5ruZ] AbstractCommand$22.call[821] : HystrixCommand execution COMMAND_EXCEPTION and fallback failed. java.lang.IllegalArgumentException: Actual request host must not be null |
This comment has been minimized.
This comment has been minimized.
thx, I will check it. |
This comment has been minimized.
This comment has been minimized.
seraphain
commented
Dec 10, 2018
•
Hi, it seems that some browser extensions for rest api testing make this happens. ~ $ curl http://localhost:18087/test/product/1 ~ $ curl http://localhost:18087/test/product/1 -H 'origin:test' ~ $ curl http://localhost:18087/test/product/post -d 'name=test' ~ $ curl http://localhost:18087/test/product/post -d 'name=test' -H 'origin:test' |
This comment has been minimized.
This comment has been minimized.
@seraphain If I understand well, the issue is caused by your REST clients and not related to Hystrix or Gateway, so I'm closing it. If there's anything else that you think is failing due to Spring Cloud tools, please write a comment - we will reopen it then. |
OlgaMaciaszek
closed this
Dec 10, 2018
OlgaMaciaszek
removed
the
feedback-provided
label
Dec 10, 2018
This comment has been minimized.
This comment has been minimized.
It might that you misunderstood. @OlgaMaciaszek please read what I wrote. Not the same error with |
This comment has been minimized.
This comment has been minimized.
seraphain
commented
Dec 11, 2018
Hi, in my case, there is still an issue in gateway: when the request contains an 'origin' head and the backend service is down, the cors check will be executed, which will make the hystrix fallback failed. I think it's not an expected result. |
This comment has been minimized.
This comment has been minimized.
What does that mean? |
This comment has been minimized.
This comment has been minimized.
seraphain
commented
Dec 11, 2018
In my case, when backend service is ok, the gateway works fine with 'origin' headers. java.lang.IllegalArgumentException: Actual request host must not be null |
This comment has been minimized.
This comment has been minimized.
yes, it's right. When I add corsConfigurations, it works well. |
keets2012 commentedOct 10, 2018
•
edited
spring-boot-starter-parent: 2.0.3.RELEASE
spring-cloud-gateway: 2.0.0.RELEASE
config with Hystrix filter as follows:
it works well with GET request, but errors with POST, the log stack as follows:
org.springframework.cloud.gateway.filter.factory.HystrixGatewayFilterFactory.lambda$null$0(HystrixGatewayFilterFactory.java:99)