Cannot get the example-xds to work
See original GitHub issueI’m trying to get examples/example-xds
to work.
I’m using Istio as XDS management server:
- ./bin/istioctl install --set profile=minimal (and Minikube for k8s)
This is my PoC app (copied the example’s code)
public void startServer(@Observes StartupEvent evt) throws Exception {
try (InputStream stream = getClass().getClassLoader().getResourceAsStream("bootstrap.json")) {
byte[] xdsConfig = stream.readAllBytes();
System.setProperty("io.grpc.xds.bootstrapConfig", new String(xdsConfig));
}
ServerCredentials credentials = InsecureServerCredentials.create();
// Since the main server may be using TLS, we start a second server just for plaintext health
// checks
new Thread(() -> {
try {
server = XdsServerBuilder.forPort(port, credentials)
.addService(new HelloService())
.addService(ProtoReflectionService.newInstance()) // convenient for command line tools
.build()
.start();
log.info("Listening on port " + port);
server.awaitTermination();
} catch (Exception e) {
log.error("Error: ", e);
Quarkus.asyncExit();
}
}, "xDS Server").start();
}
I then build a Docker image out of this PoC app
And deploy it into the same namespace as Istio
kubectl apply -f k8s/qcl-app-deployment.yaml -n istio-system
- https://github.com/alesj/quarkus_cl130/tree/xds/k8s
My app then gets stuck on this log msg
2022-10-20 08:37:38,430 WARNING [io.grp.xds.XdsServerBuilder$DefaultListener] (grpc-timer-0) [port:30051] UNAVAILABLE: Listener grpc/server=xds.resource.listening_address=0.0.0.0:30051 unavailable
- https://gist.githubusercontent.com/alesj/dfc58b42c1727f8fe19bb5226de6132f/raw/cc6244eab86a6e2478e500d093b197ffde2b4cec/gistfile1.txt
The ‘gRPC server’ started (in the log) is another Quarkus gRPC server instance, which shouldn’t be an issue. (I’m using Quarkus’s gRPC support to simplify some of the stuff)
Afaics my xDS server can reach Istio, but not the other way around, right? Or what is that WARNING trying to tell me?
My node
in bootstrap.json
looks like this:
"node": {
"id": "router~0.0.0.0~myid~xyz",
"cluster": "foobar"
},
as I had to work around the error of not having 4 part, etc …
Could this be an issue?
Issue Analytics
- State:
- Created a year ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Cannot get playwright example to work on macOS BigSur ...
I receive this error when running the sync example code: ImportError: cannot import name 'sync_playwright' from 'playwright.sync_api'.
Read more >Cannot get basic React with JSX example to work
If I remove this type attribute on the script tag, then (of course) I get an error for "unexpected token <" because the...
Read more >Cannot get widget example to work, fails silently - Questions
Hi. I am an okta n00b ( but I have been a full-stack dev for 10 years ) trying to get the sign-in...
Read more >Can't get simple light path nod examples to work
I can't get this to work! Starting with a default scene, using cycles render engine, I place a plane under the cube then...
Read more >How To Handle a Lack of Support at Work (And Why It's ...
Being encouraged through work challenges Examples of hardships include making a mistake on one of your tasks and participating in a project ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And this is how it looks when Quarkus does all the magic behind the scene 😃
Instead of plain gRPC server Quarkus creates XDS based wrapper / server. And all the stubs get XDS channel.
Finally got it working on both ends – the client side then was easy, just had to code it and properly direct it to the target / server.
The code is here (as mentioned in the initial description)
It has some Quarkus magic: DI, Docker image build (via JIB), etc
Main code - single class 😃
My k8s resources: