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

pulsar manager login interface returned 404 #532

Open
jihwong opened this issue Jul 25, 2023 · 5 comments
Open

pulsar manager login interface returned 404 #532

jihwong opened this issue Jul 25, 2023 · 5 comments

Comments

@jihwong
Copy link

jihwong commented Jul 25, 2023

image: apachepulsar/pulsar-manager:v0.4.0

Start log

Starting PostGreSQL Server
Adding group `pulsar' (GID 1000) ...
Done.
Adding user `pulsar' ...
Adding new user `pulsar' (1000) with group `pulsar' ...
Creating home directory `/home/pulsar' ...
Copying files from `/etc/skel' ...
Changing the user information for pulsar
Enter the new value, or press ENTER for the default
Use of uninitialized value $answer in chop at /usr/sbin/adduser line 582.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 583.
pg_ctl: directory "/data/postgresql" does not exist
	Full Name []: 	Room Number []: 	Work Phone []: 	Home Phone []: 	Other []: Is the information correct? [Y/n] The files belonging to this database system will be owned by user "pulsar".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /data/postgresql ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

    /usr/lib/postgresql/13/bin/pg_ctl -D /data/postgresql -l logfile start

waiting for server to start....2023-07-25 02:51:24.143 UTC [64] LOG:  starting PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-07-25 02:51:24.145 UTC [64] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-07-25 02:51:24.145 UTC [64] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2023-07-25 02:51:24.145 UTC [64] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2023-07-25 02:51:24.147 UTC [64] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-07-25 02:51:24.151 UTC [65] LOG:  database system was shut down at 2023-07-25 02:51:23 UTC
2023-07-25 02:51:24.157 UTC [64] LOG:  database system is ready to accept connections
 done
server started
ALTER ROLE
CREATE DATABASE
GRANT
You are now connected to database "pulsar_manager" as user "pulsar".
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
CREATE TABLE
Starting Pulsar Manager Front end
Starting Pulsar Manager Back end
Start servie no enable JWT.
2023-07-25 02:51:25,061 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-07-25 02:51:25,065 INFO supervisord started with pid 96
2023-07-25 02:51:26,068 INFO spawned: 'pulsar-manager-backend' with pid 97
2023-07-25 02:51:27,284 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-07-25 02:51:27,284 INFO exited: pulsar-manager-backend (exit status 1; not expected)
2023-07-25 02:51:28,288 INFO spawned: 'pulsar-manager-backend' with pid 117

image: apachepulsar/pulsar-manager:v0.3.0

Start log

Starting PostGreSQL Server
Adding group `pulsar' (GID 1000) ...
Done.
Adding user `pulsar' ...
Adding new user `pulsar' (1000) with group `pulsar' ...
Creating home directory `/home/pulsar' ...
Copying files from `/etc/skel' ...
Changing the user information for pulsar
Enter the new value, or press ENTER for the default
Use of uninitialized value $answer in chop at /usr/sbin/adduser line 582.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 583.
/pulsar-manager/startup.sh: 21: initdb: not found
/pulsar-manager/startup.sh: 22: pg_ctl: not found
createdb: error: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
	Full Name []: 	Room Number []: 	Work Phone []: 	Home Phone []: 	Other []: Is the information correct? [Y/n] Starting Pulsar Manager Front end
Starting Pulsar Manager Back end
Start servie no enable JWT.
2023-07-25 03:00:56,531 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-07-25 03:00:56,535 INFO supervisord started with pid 64
2023-07-25 03:00:57,541 INFO spawned: 'pulsar-manager-backend' with pid 65
2023-07-25 03:00:58,654 INFO success: pulsar-manager-backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

@JooHyukKim
Copy link

@jihwong Could you provide more context? Like executed command line, what parameters did you specify?

@jihwong
Copy link
Author

jihwong commented Jul 26, 2023

@jihwong Could you provide more context? Like executed command line, what parameters did you specify?

I use helm to install it

apiVersion: v1
data:
  DRIVER_CLASS_NAME: org.postgresql.Driver
  LOG_LEVEL: DEBUG
  REDIRECT_HOST: http://127.0.0.1
  REDIRECT_PORT: "9527"
  URL: jdbc:postgresql://127.0.0.1:5432/pulsar_manager
kind: ConfigMap

---
# kind: Deployment
      containers:
      - env:
        - name: PULSAR_CLUSTER
          value: pulsar
        - name: PULSAR_MANAGER_OPTS
          value: $(PULSAR_MANAGER_OPTS) -Dlog4j2.formatMsgNoLookups=true
        envFrom:
        - configMapRef:
            name: pulsar-pulsar-manager
        image: apachepulsar/pulsar-manager:v0.3.0

@jihwong
Copy link
Author

jihwong commented Aug 8, 2023

It may be because postgreSQL is enabled but it is not running properly or for other reasons.
I can login using the default configuration in image:0.4.0

@unreal91
Copy link

@jihwong remove the default postgres configurations as there is no internal postgres which will run inside the pod, only add

REDIRECT_HOST: your_ingress_url
REDIRECT_PORT: '80'
SECRET_KEY: my_secret_key
SPRING_CONFIGURATION_FILE: /pulsar-manager/pulsar-manager/application.properties

in configuration should start manager with internal DB. If you want to use external DB use below configuration:

SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties"
REDIRECT_HOST: XXXXXXX
REDIRECT_PORT: "80"
SPRING_DATASOURCE_URL: XXXXXXXX
SPRING_DATASOURCE_DRIVERCLASSNAME: org.postgresql.Driver
URL: XXXXXXXXX
SPRING_DATASOURCE_USERNAME: XXXXXXX
SPRING_DATASOURCE_PASSWORD: XXXXXXX
SPRING_DATASOURCE_SCHEMA: classpath:/META-INF/sql/postgresql-schema.sql
SPRING_DATASOURCE_INITIALIZATIONMODE: never

@ThuWangzw
Copy link

set PULSAR_MANAGER_OPTS to empty string in your configmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants