Code Monkey home page Code Monkey logo

Comments (10)

lhotari avatar lhotari commented on June 30, 2024 1

workaround:
Configure proxyRoles: 'proxy-admin' under the broker.configData key as follows:

broker:
  configData:
    proxyRoles: 'proxy-admin'

Alternatively append --set broker.configData.proxyRoles=proxy-admin to the helm install/upgrade command line.

from pulsar-helm-chart.

bhavyaravilla avatar bhavyaravilla commented on June 30, 2024

Found this error in broker as well


2024-01-15T13:43:36,638+0000 [pulsar-io-4-1] WARN  org.apache.pulsar.broker.authorization.AuthorizationService - [/10.4.38.117:54580] Illegal combination of role [broker-admin] and originalPrincipal [admin]: cannot specify originalPrincipal when connecting without valid proxy role.
2024-01-15T13:43:36,641+0000 [pulsar-io-4-1] INFO  org.apache.pulsar.broker.service.ServerCnx - Closed connection from /10.4.38.117:54580

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

@bhavyaravilla this is a security improvement made in apache/pulsar#19455 . @michaeljmarshall Do you have a chance to check how this could be supported in Apache Pulsar Helm chart?

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

Attempt to fix this gap with PR #430 .

from pulsar-helm-chart.

Loahrs avatar Loahrs commented on June 30, 2024

I am also currently encountering this issue with a "fresh" pulsar deployment from the helm chart. My error message contains a different role, but it's probably the same issue:

2024-01-16T10:18:00,153+0000 [pulsar-io-4-2] WARN org.apache.pulsar.broker.authorization.AuthorizationService - [/10.224.1.10:45766] Illegal combination of role [proxy-admin] and originalPrincipal [admin]: cannot specify originalPrincipal when connecting without valid proxy role.

My client tries to connect via "pulsar+ssl" and uses the "admin"-Token for authentication. The client shows following error:

2024-01-16 12:14:34.600 INFO  [23564] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:190 | [<none> -> pulsar+ssl://<proxy-url>:6651] Create ClientConnection, timeout=10000
2024-01-16 12:14:34.602 INFO  [23564] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ConnectionPool:114 | Created connection for pulsar+ssl://<proxy-url>:6651-0
2024-01-16 12:14:34.617 INFO  [31320] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:404 | [192.168.178.20:61304 -> <proxy-url>:6651] Connected to broker
2024-01-16 12:14:34.682 ERROR [31320] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:1572 | [192.168.178.20:61304 -> <proxy-url>:6651] Failed partition-metadata lookup req_id: 1 error: Retryable msg: org.apache.pulsar.client.api.PulsarClientException: Connection already closed
2024-01-16 12:14:34.682 INFO  [31320] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:1325 | [192.168.178.20:61304 -> <proxy-url>:6651] Connection disconnected (refCnt: 2)
2024-01-16 12:14:34.682 INFO  [31320] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ConnectionPool:129 | Remove connection for pulsar+ssl://<proxy-url>:6651-0
2024-01-16 12:14:34.682 INFO  [31320] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\RetryableOperation:114 | Reschedule get-partition-metadata-persistent://<my-tenant>/<namespace>/task-submitted for 100 ms, remaining time: 29900 ms

If I understand correctly, this will be solved by adding:

broker.configData:
    proxyRoles: 'proxy-admin'

to the .yaml file, run a helm upgrade pulsar apache/pulsar -f pulsar.yaml and probably restarting the pods?

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

If I understand correctly, this will be solved by adding:\n\nbroker.configData:\n proxyRoles: 'proxy-admin'\nto the .yaml file, run a helm upgrade pulsar apache/pulsar -f pulsar.yaml and probably restarting the pods?

@Loahrs Exactly

from pulsar-helm-chart.

Loahrs avatar Loahrs commented on June 30, 2024

If I understand correctly, this will be solved by adding:\n\nbroker.configData:\n proxyRoles: 'proxy-admin'\nto the .yaml file, run a helm upgrade pulsar apache/pulsar -f pulsar.yaml and probably restarting the pods?

@Loahrs Exactly

Thank you so much!

After setting the entry for broker.configData in my .yaml and running the helm upgrade I deleted the broker-pods (so that kubernetes recreates them with the newest settings).

Now I see a different kind of error in my proxy-logs:

2024-01-16T12:13:55,394+0000 [pulsar-proxy-io-2-4] INFO org.apache.pulsar.proxy.server.ProxyConnection - [/10.224.1.30:10697] New connection opened
2024-01-16T12:13:55,476+0000 [pulsar-proxy-io-2-4] INFO org.apache.pulsar.proxy.server.ProxyConnection - [/10.224.1.30:10697] complete connection, init proxy handler. authenticated with token role admin, hasProxyToBrokerUrl: false
2024-01-16T12:13:55,511+0000 [pulsar-proxy-io-2-3] INFO org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x73eeed53, L:/10.224.1.10:60466 - R:pulsar-broker.pulsar.svc.cluster.local/10.224.1.2:6651]] Connected to server
2024-01-16T12:13:55,531+0000 [pulsar-proxy-io-2-3] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0x73eeed53, L:/10.224.1.10:60466 - R:pulsar-broker.pulsar.svc.cluster.local/10.224.1.2:6651] Received error from server: Invalid roles.
2024-01-16T12:13:55,531+0000 [pulsar-proxy-io-2-3] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0x73eeed53, L:/10.224.1.10:60466 - R:pulsar-broker.pulsar.svc.cluster.local/10.224.1.2:6651] Received unknown request id from server: -1
2024-01-16T12:13:55,531+0000 [pulsar-proxy-io-2-3] INFO org.apache.pulsar.client.impl.ClientCnx - [id: 0x73eeed53, L:/10.224.1.10:60466 ! R:pulsar-broker.pulsar.svc.cluster.local/10.224.1.2:6651] Disconnected
2024-01-16T12:13:55,531+0000 [pulsar-proxy-io-2-3] WARN org.apache.pulsar.client.impl.ConnectionPool - [[id: 0x73eeed53, L:/10.224.1.10:60466 ! R:pulsar-broker.pulsar.svc.cluster.local/10.224.1.2:6651]] Connection handshake failed: org.apache.pulsar.client.api.PulsarClientException: Connection already closed

It's showing a succesful authentication attempt (thanks to the new config-entry). But then the server responds with a Received error from server: Invalid roles.

Sorry to further bother you with that, but do you have any ideas about that? Are there other configs to add to fix this issue?

I could provide my yaml if that helps, but I mostly just followed the official instructions for the helm chart and made no other changes.

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

After setting the entry for broker.configData in my .yaml and running the helm upgrade I deleted the broker-pods (so that kubernetes recreates them with the newest settings).

I replied to #431 (comment)
The syntax needs to be valid yaml.

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

If I understand correctly, this will be solved by adding:

broker.configData:
    proxyRoles: 'proxy-admin'

Sorry @Loahrs , this was not the correct syntax. It's explained in #431 (comment)

from pulsar-helm-chart.

lhotari avatar lhotari commented on June 30, 2024

I updated the workaround instructions to reduce confusion, #427 (comment).

from pulsar-helm-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.