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

Can't make a pure client #281

Closed
NKame opened this issue Aug 23, 2021 · 15 comments
Closed

Can't make a pure client #281

NKame opened this issue Aug 23, 2021 · 15 comments

Comments

@NKame
Copy link

NKame commented Aug 23, 2021

Context: building a command line batch in Quarkus, using quarkus-cxf for the SOAP client part.

Expectation: the batch is not a server, so it should not listen to any socket, and even less run a HTTP server.

Problem: the HTTP server is launched, setting quarkus.http.host-enabled=false fails with java.lang.IllegalArgumentException: Must configure at least one of http, https or unix domain socket

Root cause: quarkus-cxf has a mandatory dependency towards quarkus-vertx-http

@dufoli
Copy link
Contributor

dufoli commented Aug 23, 2021

hmmm if we need to support both, we need to split server and client module . And of course common module.
@shumonsharif @famod @Dufgui

@famod
Copy link
Contributor

famod commented Aug 23, 2021

A split would certainly be the clearest but also the most elaborate approach.
This might be an alternative, but I'm not sure it would mean less work because the groundwork is still a TODO: quarkusio/quarkus#14927 (comment)

@shumonsharif
Copy link
Contributor

@NKame 's issue of disabling the HTTP server looks like it may possibly be related to a Quarkus regression:  quarkusio/quarkus#19370

@NKame
Copy link
Author

NKame commented Aug 23, 2021

Well, it seems to come and go, the basis is that as soon as there is some mandatory dependency towars quarkus-vertx-http, by whatever module, the bootstrapping of HTTP server will kick in. And depending on the version, asking to disable HTTP either is almost correct (still the sequence is 90% done) or fails badly.

@shumonsharif
Copy link
Contributor

Well, it seems to come and go, the basis is that as soon as there is some mandatory dependency towars quarkus-vertx-http, by whatever module, the bootstrapping of HTTP server will kick in. And depending on the version, asking to disable HTTP either is almost correct (still the sequence is 90% done) or fails badly.

The quarkus.http.host-enabled property I believe is there to disable the bootstrapping of the HTTP server. I only see a single issue in the Quarkus repo that is related to quarkus.http.host-enabled not working properly, so not sure I followed your statements ... can you please elaborate some more, when you say 90% done, are you referring to the HTTP server bootstrapping process?

Also, the effort involved in splitting into server and client modules may be relatively involved ... so, have you by any chance tried excluding quarkus-vertx-http, something like the below (I didn't test it) ...

        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-vertx-http</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

@NKame
Copy link
Author

NKame commented Aug 30, 2021

As I explained it's quite simple: depending on the versions, it's working or not, I suppose most of the users don't try to use it because of this reliability problem and put quarkus.http.port=0 to not be bothered with it. As for excluding the dependency I've done several tests: most of the times it breaks during bootstrapping.

@shumonsharif
Copy link
Contributor

Thanks @NKame, I was hoping there may be some less complex workaround to address the issue. I did some digging, and it seems the quarkus.http.host-enabled doesn't play nice with quarkus-vertx-http in the classpath. Short of splitting server and client modules as per @dufoli , or possibly the alternative mentioned in quarkusio/quarkus#14927 (comment) by @famod, I'm not sure there's much else we can do.

@NKame
Copy link
Author

NKame commented Aug 30, 2021

Well, it's a very low priority issue. I submitted it just in case some other people were wondering wether this has to be expected or not.

@famod
Copy link
Contributor

famod commented Sep 13, 2021

I created quarkusio/quarkus#20119 to fix quarkus.http.host-enabled w.r.t. Must configure at least one of http, https or unix domain socket. Let's see how it goes.

@famod
Copy link
Contributor

famod commented Sep 17, 2021

quarkusio/quarkus#20119 was merged and will be part of Quarkus 2.3.0 and possibly also 2.2.4.

@famod
Copy link
Contributor

famod commented Oct 11, 2021

FWIW, with Quarkus 2.3.0.Final quarkus.http.host-enabled=false is working just fine in QuarkusTests that are using this extensions only with @CXFClient.

@shumonsharif
Copy link
Contributor

Quarkus-CXF 0.10.0 is out, and uses Quarkus 2.3.0.Final.

@NKame Based on @famod's fix, setting quarkus.http.host-enabled=false should address this issue, so I'm closing it for now, but please feel free to reopen it if you'd like to.

@famod
Copy link
Contributor

famod commented Oct 16, 2021

I think we should add a note to the docs.

@shumonsharif
Copy link
Contributor

Good point @famod , reopening this issue, will close once the docs have been updated. Thanks for the fix!

@shumonsharif shumonsharif reopened this Oct 16, 2021
@shumonsharif
Copy link
Contributor

The quarkus.http.host-enabled=false property is now documented at https://quarkiverse.github.io/quarkiverse-docs/quarkus-cxf/dev/client.html#pure-client; closing this issue for now!

@ppalaga ppalaga added this to the no fix/won't fix milestone Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants