[go: nahoru, domu]

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

plugins/grpc: default value for grpc port #7479

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jackstar12
Copy link
Contributor

The gRPC server will always start this way. Current port choice is arbitrary, open to suggestions.

closes: #7473

@jackstar12 jackstar12 requested a review from cdecker as a code owner July 21, 2024 20:48
Copy link
Collaborator
@niftynei niftynei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9127f94

plugins/grpc-plugin/src/main.rs Outdated Show resolved Hide resolved
@cdecker
Copy link
Member
cdecker commented Jul 31, 2024

The change in the behavior appears to cause the cln-grpc-plugin to terminate almost immediately which is causing the tests to also fail right away. Can you check what is causing the plugin to exit?

@jackstar12
Copy link
Contributor Author

Can you check what is causing the plugin to exit?

The test is starting two nodes and both are now trying to use the default port 9736 for the cln-grpc plugin which is causing one of them to crash

@jackstar12 jackstar12 force-pushed the grpc-default-port branch 2 times, most recently from ec5a53c to a2f3b0e Compare August 12, 2024 22:18
@ShahanaFarooqui ShahanaFarooqui force-pushed the grpc-default-port branch 4 times, most recently from 6285509 to 957a999 Compare August 13, 2024 03:03
@rustyrussell
Copy link
Contributor

So, when people upgrade they will have a new random port open to the internet?

I know @michael1011 wants this, but would it be sufficient to open a localhost-bound port by default in this case?

@ShahanaFarooqui ShahanaFarooqui force-pushed the grpc-default-port branch 3 times, most recently from 7a64585 to faa814e Compare August 13, 2024 03:41
@michael1011
Copy link
Contributor
michael1011 commented Aug 13, 2024

So, when people upgrade they will have a new random port open to the internet?

I know @michael1011 wants this, but would it be sufficient to open a localhost-bound port by default in this case?

@rustyrussell that's a very valid point. What about adding an option to configure the host on which the plugin will listen and defaulting that to 127.0.0.1?

Edit: I can't think of any other sensible option, so let's do that. The only concern is that it's a breaking change for all existing CLNs that have a gRPC port configured and expect the plugin to listen on 0.0.0.0.

Changelog-Changed: grpc now starts on port 9736 by default
A port should not be opened by default on 0.0.0.0, so change the default
to localhost

Changelog-Added: `grpc-host` option for grpc plugin
plugin seems to cause issues in combination with the test
`misc_notifications.py` plugin
@ShahanaFarooqui ShahanaFarooqui removed this from the v24.08 milestone Aug 19, 2024
@ShahanaFarooqui ShahanaFarooqui added this to the v24.11 milestone Aug 19, 2024
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

Successfully merging this pull request may close these issues.

Enable cln-grpc by default
7 participants