tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.36k stars 652 forks source link

Unable to load AKHQ UI with port-forward on kubernetes pod #531

Closed SrikanthNiketh closed 3 years ago

SrikanthNiketh commented 3 years ago

We have installed AKHQ using helm on Kubernetes.

Did port-forward on the pod at kubectl -n <namespace> port-forward <pod> 8080:8080 . But AKHQ UI isn't loading http://localhost:8080. Seeing below warnings in the logs when hitting the UI.

Relates to: #481

2020-12-03 20:30:55,695 WARN  r-thread-1 org.akhq.log.access        [Date: 2020-12-03T20:30:55.68983Z] [Duration: 24 ms] [Url: GET /] [Status: 500] [Ip: /127.0.0.1] [User: -]
2020-12-03 20:30:59,510 WARN  r-thread-1 org.akhq.log.access        [Date: 2020-12-03T20:30:59.509079Z] [Duration: 1 ms] [Url: GET /] [Status: 500] [Ip: /127.0.0.1] [User: -]
2020-12-03 20:31:01,906 WARN  r-thread-1 org.akhq.log.access        [Date: 2020-12-03T20:31:01.905852Z] [Duration: 0 ms] [Url: GET /] [Status: 500] [Ip: /127.0.0.1] [User: -]

values.yaml

replicaCount: 1

image:
  repository: nginx
  tag: stable
  pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

service:
  type: ClusterIP
  port: 80

kafka-akhq:
  image:
    tag: dev
  configuration: |
    akhq:
      micronaut:
        jmx:
          add-to-factory: false
          register-endpoints: false
        metrics:
          enabled: false
ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: []

  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}
tchiotludo commented 3 years ago

I really don't understand your configuration files ?

There is no kafka cluster configuration in your paste configuration

SrikanthNiketh commented 3 years ago

We are passing Kafka cluster configuration through separate file during deployment which is part of our pipeline in circleci

tchiotludo commented 3 years ago

really hard ... I don't have a stacktrace, not a configuration files.

I don't see how I can help you ... Maybe look at /env endpoint

But with more information, I couldn't help !

SrikanthNiketh commented 3 years ago

here's the kafka configuration we are passing and the output of application.yml and application-secrets.yml configuration on the container.

akhq:
  connections:
    app-messaging:
      properties:
        bootstrap.servers:
        security.protocol: SSL
        ssl.truststore.location: /usr/local/openjdk-11/lib/security/cacerts
        ssl.truststore.password: changeit
      schema-registry:
        url: <schema-registry-url>
      connect:
        - name: app1-connector
          url: "<app1-connector-url>"
        - name: app2-connector
          url: "<app2-connector-url>"

  security:
    basic-auth:
      user: admin
      password:
      groups:
        - admin
    groups:
      admin:
        roles:
          - topic/read
          - topic/insert
          - topic/delete
          - topic/config/update
          - node/read
          - node/config/update
          - topic/data/read
          - topic/data/insert
          - topic/data/delete
          - group/read
          - group/delete
          - group/offsets/update
          - registry/read
          - registry/insert
          - registry/update
          - registry/delete
          - registry/version/delete
          - acls/read
          - connect/read
          - connect/insert
          - connect/update
          - connect/delete
          - connect/state/update

application.yml

$ cat application.yml
akhq:
  micronaut:
    jmx:
      add-to-factory: false
      register-endpoints: false
    metrics:
      enabled: false
$ 

application-secrets.yml


$ cat application-secrets.yml
akhq:
  connections:
    app-messaging:
      properties:
        bootstrap.servers: "<boot-strap-servers>"
        security.protocol: SSL
        ssl.truststore.location: /usr/local/openjdk-11/lib/security/cacerts
        ssl.truststore.password: changeit
      schema-registry:
        url: "<schema-registry-url>"
      connect:
        - name: app1-connector
          url: "<app1-connector-url>"
        - name: app2-connector
          url: "<app2-connector-url>"

  security:
    basic-auth:
      user: admin
      password:
      groups:
        - admin
    groups:
      admin:
        roles:
          - topic/read
          - topic/insert
          - topic/delete
          - topic/config/update
          - node/read
          - node/config/update
          - topic/data/read
          - topic/data/insert
          - topic/data/delete
          - group/read
          - group/delete
          - group/offsets/update
          - registry/read
          - registry/insert
          - registry/update
          - registry/delete
          - registry/version/delete
          - acls/read
          - connect/read
          - connect/insert
          - connect/update
          - connect/delete
          - connect/state/update$ 
$ 
tchiotludo commented 3 years ago

Just some point quickly :

Also, Have a deep look at application.example.yml and compare with yours.

SrikanthNiketh commented 3 years ago

@tchiotludo understood. Made configuration changes and we are up and running now. Thank you 🙌