Spring Cloud Gateway that integrations with eureka route error , 404 on Wildfly8.1.0
I do the demo from Spring Cloud Gateway Website , and I integration the project with eureka , then i run it on springboot embedded container (deployment on jar) , it can route ,However, I run it On Wildfly8.1.0,it error ,response status code is 404 .please give me some suggestions~
Please provide an minimal, complete, verifiable example that reproduces the issue.
Please provide an minimal, complete, verifiable example that reproduces the issue.
my Gateway Project? however this project runs on Wildfly8, so i also provider wildfly 8 zip ?
What is returning a 404, the request from the gateway to register with Eureka?
What is returning a 404, the request from the gateway to register with Eureka?
No , My Project Gateway successfully send hearbeat to Eureka Server and successfully register with Eureka Server . The Stituation whose response status code 404 is request from gateway routes to other eureka client(e.g. LogServer) ,the browser return status code 404 . my access to the address is http://gatewayIP:gatewayPort/log( log is other eureka client ),what's more , request from gateway accesss Gateway's Controller is also return 404 . The Project runs on Wildfly 8.1.0 as *.war
Then we need a sample to reproduce it
fine , My Demo Project'address is https://github.com/TenYearsIn/Demo.git 。please give me some suggestions , this sistuation obsesses me for a long time . log is my other eureka client.discovery integrations with eureka ,at the last , please run it on Wildfly 8.1.0
Did you follow the guide in https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging
The undertow dependencies need to be provided so they don't conflict with the app server.
@spencergibb Thanks ! Dear friends , Sorry , I don't see Your suggestion , The undertow dependencies need to be provided so they don't conflict with the app server.
@spencergibb hello ,Dear Sir, i have followed the Guide in (https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging),but this doesn't work ! any suggestions can give?
but it doesnt work
That is not useful, please more descriptive.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
@ryanjbaxter hello,Dear friend,First i introduce My project ,I use gateway integrations with eureka (Spring-cloud dependency version is Finchley.RELEASE,spring boot dependency version is 2.0.3.release )and I use undertow as container,JBoss 8.1.0.Final as application server 。at last ,I deploy my project as *.war and it can compile successfully,but it can not route to eureka client in browser ,the response code is 404 。Could U give me a hand?
but it can not route to eureka client in browser
Meaning you cannot get to the eureka dashboard?
Even though you gave us a project (which is not minimal), there are no instructions on how to reproduce your problem. We still don't know exactly what the problem is.
but it can not route to eureka client in browser
Meaning you cannot get to the eureka dashboard?
no no no ,In practice,My sample project has three modules and they are Log service (exposed port is 8082) ,discovery service(exposed port is 8080 ) and gateway service (exposed port is 8081 ) . I use undertow as container,JBoss 8.1.0.Final as application server . I deploy my project as *.war and it can compile successfully ,however I visit the url (http://localhost:8081/log/hello/mc ) on the browser ,the response code is 404 . I update My Demo Project , url : https://github.com/TenYearsIn/Demo.git by the way ,Is there any question in my configuration files and pom.xml in my gateway module?Thank U !
I visit the url (http://localhost:8081/log/hello/mc ) on the browser
I have not run the applications but this seems like nothing that should be due to Spring Cloud Gateway it is just a RestController. Can you try the same thing without using the Gateway dependency?
yes . I used zuul in the same case,I visit the url (http://localhost:8081/log/hello/mc ) on the browser .it can return my expectant result 。but i replace zuul with gateway and it return 404 。 I spend lots of time on it and I still can't find any reason。
What happens when you hit this endpoint? https://github.com/TenYearsIn/Demo/blob/master/spring-cloud-example/gateway/src/main/java/com/example/lophie/gateway/web/controller/SystemController.java#L19
it return plain text on the browser (I used Spring-web dependency,not spring-webflux denpendency),"Hello,mc!" it is just a "RestController",
I am really confused because in the readme you say you get a 404
I visit gateway's Controller(url:http://localhost:8081/hello/test),it return 404