This message was deleted.
# general
s
This message was deleted.
a
Hi @Moty, to better understand, do you want to create a new admin user using the REST API or do you want to make the change directly in the database of pulsar-manager?
m
Currently i’m in a situation that I can’t login to pulsar-manager with: pulsar:pulsar creds
To start with, I just would like to be able to login.. I already tried running this:
CSRF_TOKEN=$(curl <http://localhost:7750/pulsar-manager/csrf-token>)
curl \
-H 'X-XSRF-TOKEN: $CSRF_TOKEN' \
-H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \
-H "Content-Type: application/json" \
-X PUT <http://localhost:7750/pulsar-manager/users/superuser> \
-d '{"name": "admin", "password": "apachepulsar", "description": "test", "email": "<mailto:username@test.org|username@test.org>"}'
But since there’s no backend or it isn’t configured, this doesn’t work for me
a
Yeah unfortunately, pulsar-manager has a lot of issues and is not really stable. You should be able to run the curl command you posted above against
localhost:9527
m
it didn’t work for me
a
Is the pod up and running?
m
I got 404
yes
a
It’s possible that the version of pulsar-manager in the helm chart is not the latest one
m
it’s latest
0.4.0
I just upgraded
I changed the image tag to 0.4.0
a
Once the pod has started you might have to wait for 1-2mins until the backend is fully initialized in order to retrieve the CSRF token. You can check if it works by just running
curl <http://localhost:7750/pulsar-manager/csrf-token>
a few times
m
you mean to run it from within the pod (or port-forward)
a
Yes
m
curl: (7) Failed to connect to localhost port 7750: Connection refused
and when trying to run it with port 9527 i’m getting 404
a
Assuming you have k8s access, can you take a look at the containers in the pod? There should be 2, one for the UI and one for the backend. Maybe the backend one has an issue on startup for some reason
m
I have access
a
The user experience with pulsar-manager is very unfortunate, which is why we are working on an enterprise grade replacement at streamvisor.com
m
there’s only one pod
and in the chart there’s no mentioning of another pod which acts as a backend
a
No, it’s a single pod, but if I remember correctly there are 2 containers running inside. Or it could be that it was 1 container running with 2 processes, not sure anymore
m
I asked for an early access streamvisor.com 🙂
🙌 1
it has only one container
and these are the processes
root 1 0 0 07:12 ? 000000 /bin/bash /pulsar-manager/entrypoint.sh pulsar 64 1 0 07:12 ? 000000 /usr/lib/postgresql/13/bin/postgres -D /data/postgresql pulsar 66 64 0 07:12 ? 000000 postgres: checkpointer pulsar 67 64 0 07:12 ? 000000 postgres: background writer pulsar 68 64 0 07:12 ? 000000 postgres: walwriter pulsar 69 64 0 07:12 ? 000000 postgres: autovacuum launcher pulsar 70 64 0 07:12 ? 000000 postgres: stats collector pulsar 71 64 0 07:12 ? 000000 postgres: logical replication launcher root 85 1 0 07:12 ? 000000 nginx: master process nginx www-data 86 85 0 07:12 ? 000000 nginx: worker process www-data 88 85 0 07:12 ? 000000 nginx: worker process www-data 89 85 0 07:12 ? 000000 nginx: worker process www-data 90 85 0 07:12 ? 000000 nginx: worker process www-data 91 85 0 07:12 ? 000000 nginx: worker process www-data 93 85 0 07:12 ? 000000 nginx: worker process www-data 94 85 0 07:12 ? 000000 nginx: worker process www-data 95 85 0 07:12 ? 000000 nginx: worker process root 96 1 0 07:12 ? 000001 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf -n root 439 0 0 07:13 pts/0 000000 bash root 1357 0 0 08:39 pts/1 000000 bash root 1455 439 0 08:50 pts/0 000000 ps -ef
also netstat doesn’t show that it listens on 7750
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 85/nginx: master pr tcp 0 0 0.0.0.0:9527 0.0.0.0:* LISTEN 85/nginx: master pr tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN - tcp6 0 0 :::80 :::* LISTEN 85/nginx: master pr
a
Hm, looks like the backend did not start or failed. In the container (maybe under
/pulsar-manager/
) there should be a
pulsar-manager.log
showing the backend logs
Either there or in the supervisord logs there could be a hint to what’s wrong
m
2023-06-27 07:12:06,908 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2023-06-27 07:12:06,910 INFO supervisord started with pid 96
2023-06-27 07:12:07,913 INFO spawned: 'pulsar-manager-backend' with pid 97
2023-06-27 07:12:09,015 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:09,015 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:10,019 INFO spawned: 'pulsar-manager-backend' with pid 117
2023-06-27 07:12:10,150 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:11,153 INFO spawned: 'pulsar-manager-backend' with pid 137
2023-06-27 07:12:11,311 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:13,316 INFO spawned: 'pulsar-manager-backend' with pid 157
2023-06-27 07:12:13,464 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:16,471 INFO spawned: 'pulsar-manager-backend' with pid 177
2023-06-27 07:12:17,587 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:17,587 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:18,589 INFO spawned: 'pulsar-manager-backend' with pid 197
2023-06-27 07:12:19,775 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:19,775 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:20,778 INFO spawned: 'pulsar-manager-backend' with pid 217
2023-06-27 07:12:21,899 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:21,899 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:22,908 INFO spawned: 'pulsar-manager-backend' with pid 237
2023-06-27 07:12:23,045 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:24,048 INFO spawned: 'pulsar-manager-backend' with pid 257
2023-06-27 07:12:25,163 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:25,163 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:26,167 INFO spawned: 'pulsar-manager-backend' with pid 277
2023-06-27 07:12:26,300 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:27,302 INFO spawned: 'pulsar-manager-backend' with pid 297
2023-06-27 07:12:27,417 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:29,421 INFO spawned: 'pulsar-manager-backend' with pid 317
2023-06-27 07:12:29,524 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:32,529 INFO spawned: 'pulsar-manager-backend' with pid 337
2023-06-27 07:12:33,647 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-06-27 07:12:33,648 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:34,654 INFO spawned: 'pulsar-manager-backend' with pid 357
2023-06-27 07:12:34,771 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:35,774 INFO spawned: 'pulsar-manager-backend' with pid 377
2023-06-27 07:12:35,869 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:37,874 INFO spawned: 'pulsar-manager-backend' with pid 397
2023-06-27 07:12:37,977 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:40,982 INFO spawned: 'pulsar-manager-backend' with pid 417
2023-06-27 07:12:41,131 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-06-27 07:12:42,132 INFO gave up: pulsar-manager-backend entered FATAL state, too many start retries too quickly
this is the supervisord.log
a
Did you find a file with the backend log too?
m
found the issue
there’s a problem with the chart
https://github.com/apache/pulsar-helm-chart/blob/master/charts/pulsar/templates/pulsar-manager-deployment.yaml - name: PULSAR_MANAGER_OPTS value: “$(PULSAR_MANAGER_OPTS) -Dlog4j2.formatMsgNoLookups=true” This is how it looks in line 92-93 and the $(PULSAR_MANAGER_OPTS) causes an issue
👍 1
BTW: now that I had managed to access the pulsar-manager I see no data in it, but my pulsar cluster has many namespaces configured there