-
Notifications
You must be signed in to change notification settings - Fork 31
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
Quick Start request example doesn't work for me #97
Comments
Hi @breun , Thanks |
I was able to reproduce exaclty what you are seeing. You are correct, the docs are out of date. We try our best to keep them live and in sync but... (me raising hand). SummarySo here is whats going on... The quick start docs suggests adding the "spring-web" dependency. Without the above requirements, the end result is the server starts with no server factory and therefore no services. Note We need to improve this on the framework WorkaroundsLet's talk workarounds... If you want to use the "Servlet Server" please add the
Note The If you don't want to use the "Servlet Server" please remove the After either of the above actions the NextIn the meantime, we will get the docs updated and also work on making the "web" configuration a bit easier to consume. Thank you for the detailed report. Please let us know if you have any issues w/ the workarounds above. |
Updates the fix-getting-started.adoc section of the reference guide to remove the requirement of the "web" and "graalvm" dependencies as the former requires other information besides dependencies to work properly and the latter is just complication that is not needed for a simple quick start. See spring-projects-experimental#97
Updates the fix-getting-started.adoc section of the reference guide to remove the requirement of the "web" and "graalvm" dependencies as the former requires other information besides dependencies to work properly and the latter is just complication that is not needed for a simple quick start. See spring-projects-experimental#97
Updates the fix-getting-started.adoc section of the reference guide to remove the requirement of the "web" and "graalvm" dependencies as the former requires other information besides dependencies to work properly and the latter is just complication that is not needed for a simple quick start. See spring-projects-experimental#97
While there are other improvements to be made, the specific instance of the docs being out of sync are fixed with #98. |
Updates the fix-getting-started.adoc section of the reference guide to remove the requirement of the "web" and "graalvm" dependencies as the former requires other information besides dependencies to work properly and the latter is just complication that is not needed for a simple quick start. See #97
Thanks, adding Another remark: maybe this is already on your radar, but it would be nice to document why a user might want to use the servlet server or not. The same goes for using shaded Netty or not. Let me know if you'd like me to create separate issues for these things. (But I don't have the answers.) |
I also get an error when trying the quick start streaming RPC call (which maybe should also be part of the quick start example?):
Is this expected? |
Apparently it's a Tomcat issue/feature (https://stackoverflow.com/questions/61413934/http2-err-connection-closed-too-much-overhead). I'll see if I can shed any more light and find a configuration to fix it. UPDATE: it's actually @Test
@DirtiesContext
void streamResponds() {
Iterator<HelloReply> response = stub.streamHello(HelloRequest.newBuilder().setName("Alien").build());
assertEquals("Hello(0) ==> Alien", response.next().getMessage());
while (response.hasNext()) {
log.info(response.next().getMessage());
}
} It seems like |
You can configure Tomcat to ignore those (turns out it's not the pings, it's the WINDOW_UPDATE frames that grpcurl sends): @Bean
public TomcatConnectorCustomizer customizer() {
return (connector) -> {
for (UpgradeProtocol protocol : connector.findUpgradeProtocols()) {
if (protocol instanceof Http2Protocol http2Protocol) {
http2Protocol.setOverheadWindowUpdateThreshold(0);
}
}
};
} |
Speaking of which, if you don't remove the |
The tomcat sample works with |
I'm currently trying to help create the You can for This is most likely due to the fact that this solution does not work in tests, as I said. In my third party test project I have similar test code, however without Basically, in the same project as I just checked, the same problem I described above is reproduced with |
Funny thing is, I fixed this problem now by adding webEnvironment to However, the problem with |
If you're running in a servlet container the local port is the normal Spring MVC one ( |
I know Spring gRPC is still experimental at this point, but I was interested in trying it out, so I created a new Spring Boot 3.4.1 project with Web and gRPC dependencies on https://start.spring.io. I followed the instructions on https://docs.spring.io/spring-grpc/reference/getting-started.html to add the
hello.proto
file, generate the sources, and then added theGrpcServerService
. I built and ran the service, and then executed tried to see it in action, but I got this:So, apparently something is wrong with either my service, or my request to the service. Should this documentation be up-to-date?
The startup messages of the application don't show anything starting on port 9090. I also tried the Tomcat port (8080), but got no result there either.
Is there anything else I need to get the server started, or should I query the service in a different way?
The text was updated successfully, but these errors were encountered: