question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get the example-xds to work

See original GitHub issue

I’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

My app then gets stuck on this log msg

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:closed
  • Created a year ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alesjcommented, Nov 3, 2022

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.

# XDS
quarkus.grpc.server.xds.enabled=true
quarkus.grpc.server.port=30051

quarkus.grpc.clients.stub.name-resolver=xds
quarkus.grpc.clients.stub.host=qcl-app
quarkus.grpc.clients.stub.port=30051
1reaction
alesjcommented, Nov 2, 2022

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:

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found