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

CapNProto gets initialised even though I'm using protobuf #8093

Open
wiardvanrij opened this issue Feb 7, 2025 · 2 comments
Open

CapNProto gets initialised even though I'm using protobuf #8093

wiardvanrij opened this issue Feb 7, 2025 · 2 comments

Comments

@wiardvanrij
Copy link
Member

I was testing something locally, got this error

level=error err="listen tcp 0.0.0.0:19391: bind: address already in use

That port is only for CapNProto, and I'm defaulting to protobuf. Which makes it a bit odd that it tries to bind on that port already.
I haven't looked further, but figured to create an issue already.

version: main

@fpetkovski
Copy link
Contributor

Would be nice to see all of the flags for the receiver, otherwise it's hard to tell what's going on. Note that we start both the grpc and capnp servers regardless of which one is used. This allows for a seamless transition between protocols.

@wiardvanrij
Copy link
Member Author

wiardvanrij commented Feb 7, 2025

Yea okay, I figured that was a bug as I'm not using the option to use capnp and therefore I'm assuming it would not utilise that port. In my case I'm locally dev'ing and well, then I have to configure it so it won't re-use the same port. Which is no problem.

I don't entirely get your point about the seamless transition as one has to setup the option in order to activate it? So then I would think it makes more sense it doesn't 'run' until one does? If anything, I kinda couldn't care less but in case it was a bug I just made the ticket. No opinion here :)

Flags as per request tho:

    ${THANOS_EXECUTABLE} receive \
        --debug.name receive${i} \
        --log.level debug \
        --tsdb.path "./data/remote-write-receive-${i}-data" \
        --grpc-address 0.0.0.0:2${i}907 \
        --grpc-grace-period 1s \
        --http-address 0.0.0.0:2${i}909 \
        --http-grace-period 1s \
        --receive.replication-factor 1 \
        --tsdb.min-block-duration 5m \
        --tsdb.max-block-duration 5m \
        --label "receive_replica=\"${i}\"" \
        --label 'receive="true"' \
        --receive.local-endpoint 127.0.0.1:2${i}907 \
        --remote-write.address 0.0.0.0:2${i}908 &

and

    ${THANOS_EXECUTABLE} receive \
        --debug.name receive-distributor-${i} \
        --log.level debug \
        --tsdb.path "./data/router-receive-${i}-data" \
        --grpc-address 0.0.0.0:1${i}907 \
        --grpc-grace-period 1s \
        --http-address 0.0.0.0:1${i}909 \
        --http-grace-period 1s \
        --receive.replication-factor 1 \
        --label "receive_replica=\"${i}\"" \
        --label 'receive="true"' \
        --receive.hashrings '[{"endpoints":["127.0.0.1:20907","127.0.0.1:21907","127.0.0.1:22907"]}]' \
        --remote-write.address 0.0.0.0:1${i}908 \
        --tsdb.out-of-order.time-window 30m \
        --tsdb.too-far-in-future.time-window 10m \
        --tsdb.allow-overlapping-blocks \
        --receive.hashrings-algorithm ketama \
        --receive.forward.async-workers 400 &

Now I just appended this:

--receive.capnproto-address 0.0.0.0:1939${i} \

which again is fine, but seems odd as I'm not using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants