Closed mhuster23 closed 1 year ago
Unable to connect to 'http://0.0.0.0:28101/get/branch_courses_master' to get key branch_courses_masterel-server:quarkusDev
That looks suspicious. Is that quarkusDev there an artifact of multiple threads mixing up on the terminal or is that reliable?
How did you start the quarkus application?
I tried running quarkus in a separate terminal application. Same result, so it should be reliable.
I started it via ./gradlew rest-api-model-server:quarkusDev
as documented in the README.
Alright, and the exception is the same including the quarkusDev
string mixed up after URL?
So what seems to happen here is that the model client in the Quarkus application cannot access the http server opened by the model-server. Can you try to curl the URL from the exception and see if something is actually listening on that port?
No, the URL is fine now. When I curl the URL http://0.0.0.0:28101/get/branch_courses_master
I get the response jcHxH*X3ykCpzxeko_GjzYUF4psg4TIztl7TFRy9FzIk
.
Strange. Just for the sake of testing that: can you reconfigure Quarkus to explicitly use 127.0.0.1 instead of 0.0.0.0 as the IP address to connect to? Might be that you are ending up in IPv6 but the model-server is listening on IPv4 only or something like that. Specifying -Dmodelix.client.serverUri=http://127.0.0.1:28101
should do the trick.
Launching with that argument gave me a ConfigurationValidationException. I changed the default value here instead and that made it work. Thanks!
It could be good to change this permanently, @mhuster23 can you PR this change please?
I missed the name mapping strategy that Quarkus applies. Does the command line flag work with -Dmodelix.client.server-uri=http://127.0.0.1:28101
? The default mapping strategy is to make kebap-case from CamelCase names in confoguration objects.
The command line flag works as well. Should I still create a PR for changing the default value?
The command line flag works as well. Should I still create a PR for changing the default value?
Probably yes. Even if we configure the model server to also listen on IPv6, being explicit is probably safer here.
I am trying to start UC 1b on a MacBook Pro and I get this exception. UC 1a works just fine. I am on dfc03355e0608c5e1c9392c31fbf6119479d568c