-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
2.4.1 causes strange HTTP failure in devmode #21282
Comments
This has nothing to do with
This seems to be due to the fact that Now I have no idea how this is meant to work, so this is one for @patriot1burke |
@geoand great! I thought I had duplicated it with the vertx-web dependency as well, but then disabled it and it was still happening and had traced it to kogito-quarkus. Glad you were able to track down the real issue. |
In the meantime, is there anyway to 'unconfigure' that port? |
@geoand So, you cannot mix amazon-lambda plugin with quarkus-vertx-web. The Amazon Lambda dev service starts a MockEventServer under port 8080 so that you can invoke on your lambdas using http. See the docs for more info. You shouldn't be starting a web server within a lambda endpoint anyways!!! Not sure what's going on with the kotlin-quarkus plugin. It may be trying to start its own web server? |
If you want to use HTTP libraries like resteasy, vertx-web, or servlet with lambda, you need the amazon-lambda-http or amazon-lambda-rest extensions. See docs |
Thanks for the info @patriot1burke . The quarkus-kotlin extension shouldn't be starting anything, but likely the kogito extension depends on Vertx |
@patriot1burke well that would have been good to know. We've been writing our own endpoints and directing them at the lambda handler itself. Where is this documented? What is the exact endpoint to hit? just @geoand so where should this get directed to? |
oh, I see it's in the guide. I thought those were all just tutorials, not that they would contain detailed info like that... |
https://quarkus.io/guides/amazon-lambda#live-coding-and-unitintegration-testing Data format is whatever you want to POST. This is new stuff BTW introduced in 2.4.0. |
@patriot1burke ah, that explains it. I thought we had tried it last year and it didn't work. Ok, thanks! |
it looks like a it is a transitive dependency for quarkus-undertow, which is being addressed at https://github.com/kiegroup/kogito-runtimes/pull/1669
I think you can exclude |
@patriot1burke Creating an app on quarkus.io with just the |
@patriot1burke it also appears that kogito depends on using vertx regardless, so I'm not sure how I'm supposed to remove the dependency here. Following Edoardo's suggestion just results in more and more errors, the more dependencies I exclude. A config option to disable or change this port would probably resolve the problem until it can get figured out a different way. |
turns out you can do so with quarkus.lambda.mock-event-server.dev-port=8082
quarkus.lambda.mock-event-server.test-port=8083 |
@patriot1burke maybe we should have a proper message error when Vert.x/RESTEasy is around and using the same port? The other option would be to document the error message and how to solve it. |
@gsmet The problem is that people are using extensions that start up an HTTP server within a vanilla AWS Lambda. Some of these extensions like Kogito require an HTTP server (at least I think it requires HTTP) and should not be used within a vanilla AWS Lambda. Other extensions like quarkus-oidc-client are incorrectly pulling in the vertx-http-deployment dependency and thus starting an HTTP server. I can have Vert.x HTTP publish either an "vertx-http" feature or a marker build item. Check within lambda processor for this and give a warning or abort with message. |
@patriot1burke so how are you 'supposed' to be using kogito then? It's built to run on AWS lambda is it not? And I'm glad to see that I wasn't crazy when I was seeing the same issues with OIDC. Is this all a consequence of the devmode http handler so that you can hit lambdas locally? |
Kogito was requiring undertow to serve static resources, this should be no longer the case for 1.15.0. We also automatically generate rest endpoints, which may conflict with AWS. You should be able to opt-out from automated rest generation setting to your properties:
then you should be able to try the new experimental public API https://blog.kie.org/2021/11/the-road-towards-a-kogito-public-api.html I would also advise to check with Kogito 1.16, which should be release together with Quarkus 2.7.0, for all latest improvements. |
@evacchi Yeah, Kogito was pulling in quarkus-vertx-http and thus starting an HTTP endpoint. |
@snowe2010 Its more that this devmode change uncovered the fact that there are a few extensions that SHOULD NOT be booting up an http server and that were implemented incorrectly. |
so I think this has been addressed with https://github.com/kiegroup/kogito-runtimes/pull/1757 |
@evacchi I don't know... grep for 'quarkus-vertx-http' or |
currently this is all I am finding:
which should be safe |
👍🏼 Let's close the issue. If it's still a problem when Quarkus 2.7 and the corresponding Kogito 1.16 releases are out, we can reopem |
Describe the bug
When starting this example project, I receive repeating error messages, over and over again (without doing anything, literally just starting it up). The project was generated with quarkus.io, with the only modifications made to remove/add dependencies to duplicate the error.
It appears to happen as soon as I enable the kogito-quarkus dependency.
Expected behavior
Dev mode should start without errors
Actual behavior
dev mode starts and throws a continuous stream of the above error.
How to Reproduce?
demo1.zip
mvn clean quarkus:dev
kogito-quarkus
dependencyOutput of
uname -a
orver
Darwin SR-MB-300245 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
Output of
java -version
java version is specified using asdf in the .tool-versions file:
java graalvm-21.0.0+java11
GraalVM version (if different from Java)
same as above. specified using asdf
java graalvm-21.0.0+java11
Quarkus version or git rev
2.4.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)also specified using asdf.
maven 3.6.3
Additional information
logs-1636390731605.txt
The text was updated successfully, but these errors were encountered: