Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SurgicalDebugFilter class cast issue for zuul.debug.vip/host #333

Open
mind-kdas opened this issue May 26, 2017 · 1 comment
Open

SurgicalDebugFilter class cast issue for zuul.debug.vip/host #333

mind-kdas opened this issue May 26, 2017 · 1 comment
Labels

Comments

@mind-kdas
Copy link

Getting ClassCast exception in SurgicalDebugFilter. I tried to set zuul.debug.host to some IP (XX.XX.XX.XX), IP & port (XX.XX.XX.XX:YYYY) and http://XX.XX.XX.XX:YYYY but still getting type cast error.

Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'http://localhost:9010' with class 'java.lang.String' to class 'java.net.URL'
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:405) ~[groovy-2.4.10.jar!/:2.4.10]
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:319) ~[groovy-2.4.10.jar!/:2.4.10]

zuul config:

zuul:
  debug:
    vip: http://localhost:9010
    host: http://localhost:9010

As per the code of SurgicalDebugFilter(https://github.com/Netflix/zuul/blob/v1.3.0/zuul-core/src/main/groovy/com/netflix/zuul/filters/SurgicalDebugFilter.groovy):

RequestContext.currentContext.routeHost = routeHost.get();
RequestContext.currentContext.routeVIP = routeVip.get();

This would result in error anyway since RequestContext.currentContext.routeHost is URL type but routeHost.get() would return string. So, the class cast exception seems fine. Let me know if I am using it wrongly or my understanding is incorrect.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant