You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "ton3r (via GitHub)" <gi...@apache.org> on 2023/12/05 13:43:41 UTC

[I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

ton3r opened a new issue, #411:
URL: https://github.com/apache/pulsar-helm-chart/issues/411

   **Describe the bug**
   
   If you have the problem that one will have a 404 Error in the WebConsole during Login on pulsar manager. I have installed it from 
   
   https://pulsar.apache.org/docs/3.1.x/helm-deploy/
   
   During my debug, I found out that this is ok. Because the Backend didn't start.
   
   After connecting to the shell of `ird-pulsar-pulsar-manager` I've seen in the `tail -f pulsar_manager.log` of the spring instance that it can't connect to postgres on 127.0.0.1. There wasn't any available.
   
   Installing `apt-get update && apt-get -y install procps lsof vim` and I was possible to figure out that there was nothing listening on port 7750 or 5432
   
   So I've created my own postgres instance somewhere, create the schema with [this link](https://github.com/apache/pulsar-manager/blob/master/src/main/resources/META-INF/sql/postgresql-schema.sql) and startet the helm install like 
   
   ```shell
   helm install \
       --values pulsar-ird/values.yaml \
       --set initialize=true \
       --set proxy.ports.http=8080 \
       --set proxy.securityContext.runAsUser=0 \
       --set proxy.securityContext.runAsGroup=0 \
       --set proxy.service.loadBalancerIP=192.168.77.101 \
       --set pulsar_manager.admin.user=postgres \
       --set pulsar_manager.admin.password=POSTGRES_PASSWORD \
       --set pulsar_manager.configData.URL=jdbc:postgresql://192.168.77.10:5432/pulsar_manager \
       --set pulsar_manager.service.loadBalancerIP=192.168.77.100 \
       --namespace pulsar \
       ird-pulsar apache/pulsar
   ```
   
   I've to switch the proxy to 8080 because bind to 80 wasn't possible. Also the possible "solutions" setting the `runAs*` parameter to root didn't help. So I take port 8080.
   
   After the helm command is finished, I connect to the shell again and `tail -f pulsar_manager.log` again. Look out for `Hikari` Logs. That went well.
   
   After the spring service started up and was listening on 7750 I was possible to create an admin user! 
   Yes! One need this. It's not directly documented by the how tos!! Just during my investigations at least here in the issue board.
   
   ```shell
   CSRF_TOKEN=$(kubectl get secret --namespace pulsar ird-pulsar-token-admin -o jsonpath="{.data.TOKEN}" | base64 -d)
   curl \
       -H "X-XSRF-TOKEN: $CSRF_TOKEN" \
       -H "Cookie: XSRF-TOKEN=$CSRF_TOKEN;" \
       -H 'Content-Type: application/json' \
       -X PUT http://THE_MANAGER_IP:9527/pulsar-manager/users/superuser \
       -d '{"name": "admin", "password": "BirnenBurner123_", "description": "test", "email": "username@test.org"}'
   ```
   
   Then you should be able to login with `admin:BirnenBurner123_`
   
   And fun-fact : `pulsar_manager.admin.user` and `pulsar_manager.admin.password` are the db access credits (may be also some credits for other things..)
   
   **Bug Report 1** : In the end I am still struggling to set my desired internal IPs. They got ignored and always got new ip's on re-deploys.
   
   
   
   **Bug Report 2** : What is the definition of "production ready" ? And why uses the pulsar_manager by default on internal postgres instance (which is not starting up) in a non-stateful-set? 
   
   **Bug Report 3**: The helm chart is not compatible kubernetes api v1.27. It's using deprecated (beta) apis and webhooks from within prometheus
   
   
   ![image](https://github.com/apache/pulsar-helm-chart/assets/10545359/18457712-5e98-4025-8645-a23b372bbc27)
   
   
   **To Reproduce**
   As written up.
   
   **Expected behavior**
   - That a database is spawned up,
   - that it's statefull and 
   - that I can set ip-addresses
   - would be easier to find the spring logs from pulsar manager
   
   **Additional context**
   Deployed in a GKE 1.27 Cluster.
   
   
   ![image](https://github.com/apache/pulsar-helm-chart/assets/10545359/9468e5e1-3859-4886-b125-d9c2b9b72e90)
   
   ![image](https://github.com/apache/pulsar-helm-chart/assets/10545359/c12e68cc-8924-4b25-bd4f-671db3c7332b)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari closed issue #411: pulsar manager didn't start postgres. So it didn't start to work with
URL: https://github.com/apache/pulsar-helm-chart/issues/411


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

Posted by "mindesclabs (via GitHub)" <gi...@apache.org>.
mindesclabs commented on issue #411:
URL: https://github.com/apache/pulsar-helm-chart/issues/411#issuecomment-1890909498

   I'm having the same issue with DB start...local postgresql DB inside manager pod is not running. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

Posted by "mindesclabs (via GitHub)" <gi...@apache.org>.
mindesclabs commented on issue #411:
URL: https://github.com/apache/pulsar-helm-chart/issues/411#issuecomment-1893463211

   Yeah..I'll have to go with external DB. I've managed to get running internal postgres DB by using newer manager image (helm is using 0.3 which does not load DB). But I can see your point. If no Volume is provisioned for the manager pod it is useless for production so only choice is to use external DB


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #411:
URL: https://github.com/apache/pulsar-helm-chart/issues/411#issuecomment-1944369945

   Fixed by #457 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] pulsar manager didn't start postgres. So it didn't start to work with [pulsar-helm-chart]

Posted by "ton3r (via GitHub)" <gi...@apache.org>.
ton3r commented on issue #411:
URL: https://github.com/apache/pulsar-helm-chart/issues/411#issuecomment-1891424894

   Try to configure as describe an external Database. I've switched to installations on VM's. There is also the default an internal postgres (which really starts..) but on restart of the manager you loose your configured UI. But you can also configure an external database.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org