Closed omidontop closed 1 year ago
Could you show me the problematic header value?
Could you show me the problematic header value?
.2
it seems...
resteasy/reactive/resteasy-reactive/3.0.2.Final/resteasy-reactive-3.0.2.Final.jar!/org/jboss/resteasy/reactive/server/core/request/ServerDrivenNegotiation.class
Can I get the entire header value please?
Can I get the entire header value please?
Sure,
So, the value appears to be Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Note that according to the stack trace this appears to be happening in reaction to a 404. Lemme try to reproduce it.
Well, I'm not sure exactly why I fail to reproduce it, but the code implies that .2
is an invalid value, and the specification agrees this is not valid: https://www.rfc-editor.org/rfc/rfc7231#section-5.3.1 it should be 0.2
. Can I ask what HTTP client you're using?
I also see your 404 is related to /_renarde/security
, so, perhaps that's a clue. It would help if you could provide a reproducer.
I created a new VM and tried to start from scratch in order to create a project that would help you reproduce it. In doing so, I found the problem! It seems both Quarkus and the lambda extension try to listen to HTTP port 8080:
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2023-05-11 11:35:05,681 INFO [io.qua.ama.lam.run.AbstractLambdaPollLoop] (Lambda Thread (DEVELOPMENT)) Listening on: http://localhost:8080/_lambda_/2018-06-01/runtime/invocation/next
2023-05-11 11:35:05,685 INFO [io.quarkus] (Quarkus Main Thread) mgmt-lambda 1.0-SNAPSHOT on JVM (powered by Quarkus 3.0.2.Final) started in 1.329s. Listening on: http://localhost:8080
2023-05-11 11:35:05,685 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-05-11 11:35:05,686 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [amazon-lambda, cdi, hibernate-validator, narayana-jta, qute, reactive-routes, renarde, resteasy-reactive, resteasy-reactive-qute, security, smallrye-context-propagation, smallrye-jwt, vertx]
This is the reason for the clash. I have no idea why it doesn't fail when two processes try to listen to the same port on MacOS while on the Linux VM I created, it simply fails with an error.
One can either use a different port for Quarkus:
quarkus.http.port=8081
Or use a different one for Lambda:
quarkus.lambda.mock-event-server.dev-port=8082
quarkus.lambda.mock-event-server.test-port=8083
Now doing that and navigating to Quarkus's HTTP server, I get:
But I have no idea who is asking for /_renarde/security
and why it's missing. So I guess if you want to reproduce it, you've got to use the same ports for both Lambda and Quarkus and run quarkus dev
.
Ah well. This is too weird, let's not try to reproduce this. But I'll file an issue on Quarkus to detect the conflict in ports: https://github.com/quarkusio/quarkus/issues/33312
Meanwhile I'll close this issue.
Thanks for reporting and your help figuring it out :)
Ah well. This is too weird, let's not try to reproduce this. But I'll file an issue on Quarkus to detect the conflict in ports: quarkusio/quarkus#33312
Meanwhile I'll close this issue.
Thanks for reporting and your help figuring it out :)
I agree, thanks a lot for your help!
I just compiled the project from the main branch on c0894e5cff4dd31f4a0d0f92d7b680d8ad8b8ca7 and tried the same process as the one below:
And simply added Renarde like this:
Originally posted by @omidontop in https://github.com/quarkiverse/quarkus-renarde/issues/116#issuecomment-1539969134
This time I get: