apache / pulsar-manager

Apache Pulsar Manager
https://pulsar.apache.org/
Apache License 2.0
517 stars 245 forks source link

Docs for 0.2.0 are broken since #456 was merged two days ago #472

Open bithavoc opened 2 years ago

bithavoc commented 2 years ago

Docs are broken for 0.2.0 since https://github.com/apache/pulsar-manager/pull/456 was merged

Docs for 0.2.0 reference master branch sql script which creates the tables roles and role_binding, the documentation says:

Initialize database and table structures using the file.

But that script no longer creates such tables, so users of 0.2.0 will get the following error:

{"timestamp":"2022-07-15T19:11:52.227+0000","status":500,"error":"Internal Server Error","message":"\n### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation \"roles\" does not exist\n  Position: 220\n### The error may exist in org/apache/pulsar/manager/mapper/RolesMapper.java (best guess)\n### The error may involve org.apache.pulsar.manager.mapper.RolesMapper.findByRoleFlag-Inline\n### The error occurred while setting parameters\n### SQL: SELECT role_id AS roleId, role_name AS roleName, description, resource_type AS resourceType,resource_name AS resourceName, resource_verbs AS resourceVerbs, resource_id as resourceId,role_source AS roleSource, flag FROM roles WHERE flag=? limit 1\n### Cause: org.postgresql.util.PSQLException: ERROR: relation \"roles\" does not exist\n  Position: 220\n; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation \"roles\" does not exist\n  Position: 220","path":"/pulsar-manager/users/superuser"}

\cc @tuteng @urfreespace

bithavoc commented 2 years ago

It's more than just those two tables:

; ]; ERROR: null value in column "bookie" of relation "environments" violates not-null constraint
  Detail: Failing row contains (local, http://broker:8080, null).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "bookie" of relation "environments" violates not-null constraint
  Detail: Failing row contains (local, http://broker:8080, null).] with root cause

org.postgresql.util.PSQLException: ERROR: null value in column "bookie" of relation "environments" violates not-null constraint
  Detail: Failing row contains (local, http://broker:8080, null).
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143) ~[postgresql-42.2.5.jar:42.2.5]
        at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132) ~[postgresql-42.2.5.jar:42.2.5]
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar:na]
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-2.7.9.jar:na]
        at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
        at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.4.jar:3.5.4]
        at com.sun.proxy.$Proxy197.execute(Unknown Source) ~[na:na]