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

rpk does not look at redpanda.admin for admin addresses #2752

Closed
jcsp opened this issue Oct 22, 2021 · 6 comments · Fixed by #6955
Closed

rpk does not look at redpanda.admin for admin addresses #2752

jcsp opened this issue Oct 22, 2021 · 6 comments · Fixed by #6955
Assignees
Labels
area/rpk kind/bug Something isn't working

Comments

@jcsp
Copy link
Contributor

jcsp commented Oct 22, 2021

When running on a non-default port or address and passing the redpanda config to rpk with --config, one gets an error like:

* unable to fetch metrics from the admin API: Get "http://127.0.0.1:9644/metrics": dial tcp 127.0.0.1:9644: connect: connection refused

It should take the admin endpoint info from the config file.

(This is unrelated to #2751 -- for this issue I had a config file that was in the format rpk understood)

Non default ports will probably be somewhat rare in the wild, but a non-default address could be quite common any time someone wants to make the admin api accessible remotely.

@jcsp jcsp added area/rpk kind/bug Something isn't working labels Oct 22, 2021
jcsp added a commit to jcsp/redpanda that referenced this issue Oct 25, 2021
- rpk only understands the list form of one_or_many options
- rpk hardcodes 127.0.0.1:9644 as the admin endpoint

Related: redpanda-data#2752
Related: redpanda-data#2751

Signed-off-by: John Spray <jcs@vectorized.io>
jcsp added a commit to jcsp/redpanda that referenced this issue Oct 25, 2021
- rpk only understands the list form of one_or_many options
- rpk hardcodes 127.0.0.1:9644 as the admin endpoint

Related: redpanda-data#2752
Related: redpanda-data#2751

Signed-off-by: John Spray <jcs@vectorized.io>
jcsp added a commit to jcsp/redpanda that referenced this issue Oct 26, 2021
- rpk only understands the list form of one_or_many options
- rpk hardcodes 127.0.0.1:9644 as the admin endpoint

Related: redpanda-data#2752
Related: redpanda-data#2751

Signed-off-by: John Spray <jcs@vectorized.io>
@r-vasquez
Copy link
Contributor

Hello @jcsp can you share your config file please?

I just tested with:

config_file: /etc/redpanda/redpanda.yaml
node_uuid: RkTQpb9sY1QT4ZYAv8V2Jo7XgXQqB2m9mS9rjVTsXniCYvvqw
pandaproxy: {}
redpanda:
  admin:
  - address: 0.0.0.0
    port: 9644
  data_directory: /var/lib/redpanda/data
  developer_mode: true
  kafka_api:
  - address: 0.0.0.0
    name: default
    port: 9092
  node_id: 1
  rpc_server:
    address: 0.0.0.0
    port: 33145
  seed_servers: []
rpk:
  admin_api:
    addresses:
      - 127.44.44.12:1232

and got

* unable to fetch metrics from the admin API: Get "http://127.44.44.12:1232/metrics": dial tcp 127.44.44.12:1232: connect: connection refused

rpk debug bundle assumes 127.0.0.1:9644 when rpk.address.addresses is not set.

@r-vasquez
Copy link
Contributor

Perhaps similar/related with: #4000

@twmb twmb changed the title rpk debug bundle assumes admin API is at 127.0.0.1:9644 rpk does not look at redpanda.admin for admin addresses May 16, 2022
@twmb
Copy link
Contributor

twmb commented May 16, 2022

Updated the title to reflect this issue's relation to #4000. We can revisit this after a proposed redpanda.yaml redux (#4535)

@jcsp
Copy link
Contributor Author

jcsp commented May 16, 2022

My config would not have had a hand-populated rpk.admin_api section (is that documented anywhere?)

@r-vasquez
Copy link
Contributor

I saw that here: https://docs.redpanda.com/docs/reference/node-configuration-sample/ not sure if other docs document this part.

rpk:
...
 # The Admin API configuration
  admin_api:
    # A list of the nodes' admin API addresses that rpk will use.
    addresses:
    - 192.168.72.34:9644
    - 192.168.72.35:9644

@rkruze
Copy link
Contributor

rkruze commented Oct 26, 2022

This is a higher priority issue since the admin endpoint is now needed to set cluster configs, which is something I and users of the platform have been hung up on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants