Having issue to remove all users permision

Hello ,

We are facing to remove all users permission from a particular database (Using Postgres!
Please guide as as soon as possible , this is production issue and we need to restrict every new user to have access of our prod db. Getting below error

{:message "ERROR: current transaction is aborted, commands ignored until end of transaction block",
:type org.postgresql.util.PSQLException,
:stacktrace
("org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)"
"org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)"
"org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)"
"com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)"
"clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1072)"
"clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1066)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1088)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1075)"
"clojure.java.jdbc$query.invokeStatic(jdbc.clj:1164)"
"clojure.java.jdbc$query.invoke(jdbc.clj:1126)"
"toucan.db$query.invokeStatic(db.clj:285)"
"toucan.db$query.doInvoke(db.clj:281)"
"clojure.lang.RestFn.invoke(RestFn.java:410)"
"toucan.db$simple_select.invokeStatic(db.clj:391)"
"toucan.db$simple_select.invoke(db.clj:380)"
"toucan.db$select.invokeStatic(db.clj:659)"
"toucan.db$select.doInvoke(db.clj:653)"
"clojure.lang.RestFn.applyTo(RestFn.java:139)"
"clojure.core$apply.invokeStatic(core.clj:667)"
"clojure.core$apply.invoke(core.clj:660)"
"toucan.db$select_field.invokeStatic(db.clj:682)"
"toucan.db$select_field.doInvoke(db.clj:674)"
"clojure.lang.RestFn.invoke(RestFn.java:442)"
"--> models.permissions$fn__30323$delete_related_permissions_BANG___30328$fn__30329.invoke(permissions.clj:434)"
"models.permissions$fn__30323$delete_related_permissions_BANG___30328.doInvoke(permissions.clj:405)"
"models.permissions$revoke_db_schema_permissions_BANG_.invokeStatic(permissions.clj:483)"
"models.permissions$revoke_db_schema_permissions_BANG_.invoke(permissions.clj:478)"
"models.permissions$fn__30511$update_db_permissions_BANG___30516$fn__30517.invoke(permissions.clj:609)"
"models.permissions$fn__30511$update_db_permissions_BANG___30516.invoke(permissions.clj:601)"
"models.permissions$fn__30543$update_group_permissions_BANG___30548$fn__30549.invoke(permissions.clj:616)"
"models.permissions$fn__30543$update_group_permissions_BANG___30548.invoke(permissions.clj:613)"
"models.permissions$fn__30588$update_graph_BANG___30597$fn__30598$fn__30602.invoke(permissions.clj:667)"
"models.permissions$fn__30588$update_graph_BANG___30597$fn__30598.invoke(permissions.clj:665)"
"models.permissions$fn__30588$update_graph_BANG___30597.invoke(permissions.clj:652)"
"api.permissions$fn__63242.invokeStatic(permissions.clj:44)"
"api.permissions$fn__63242.invoke(permissions.clj:32)"
"middleware.auth$enforce_authentication$fn__66128.invoke(auth.clj:14)"
"routes$fn__67481$fn__67482.doInvoke(routes.clj:56)"
"middleware.exceptions$catch_uncaught_exceptions$fn__66227.invoke(exceptions.clj:104)"
"middleware.exceptions$catch_api_exceptions$fn__66224.invoke(exceptions.clj:92)"
"middleware.log$log_api_call$fn__67857$fn__67858.invoke(log.clj:178)"
"middleware.log$log_api_call$fn__67857.invoke(log.clj:172)"
"middleware.security$add_security_headers$fn__66190.invoke(security.clj:121)"
"middleware.json$wrap_json_body$fn__67562.invoke(json.clj:64)"
"middleware.json$wrap_streamed_json_response$fn__67580.invoke(json.clj:100)"
"middleware.session$bind_current_user$fn__62721$fn__62722.invoke(session.clj:209)"
"middleware.session$do_with_current_user.invokeStatic(session.clj:184)"
"middleware.session$do_with_current_user.invoke(session.clj:177)"
"middleware.session$bind_current_user$fn__62721.invoke(session.clj:208)"
"middleware.session$wrap_current_user_id$fn__62706.invoke(session.clj:161)"
"middleware.session$wrap_session_id$fn__62650.invoke(session.clj:125)"
"middleware.auth$wrap_api_key$fn__66136.invoke(auth.clj:27)"
"middleware.misc$maybe_set_site_url$fn__67884.invoke(misc.clj:56)"
"middleware.misc$bind_user_locale$fn__67887.invoke(misc.clj:72)"
"middleware.misc$add_content_type$fn__67872.invoke(misc.clj:28)"
"middleware.misc$disable_streaming_buffering$fn__67895.invoke(misc.clj:87)"),
:sql-exception-chain ["PSQLException:" "Message: ERROR: current transaction is aborted, commands ignored until end of transaction block" "SQLState: 25P02" "Error Code: 0"]}

Hi @akshay13jain
Which version of Postgres?
And which version of Metabase? Post “Diagnostic Info” from Admin > Troubleshooting.

Thanks for reply Flamber ,
Currently I am using postgres 11 and MetaBase : 0.34.2

Regards,
Akshay

@akshay13jain I haven’t seen that error for several years, so not sure what’s going on:
https://github.com/metabase/metabase/issues/4000
A lot has changed with how connections are made in 0.35 in regard to transactions, so I would recommend that you backup and then try upgrading to 0.35.2

Thanks Flamber for the quick response.
yeah, this is a bit surprising for us also, when we try to remove permission with another database it is working fine, only with a specific database (in my case compass_prod_db) I am getting an issue .
Attaching a screen shoot for further reference.

@akshay13jain
Please post “Diagnostic Info” from Admin > Troubleshooting.
Are you seeing any other errors before/after the one you posted, which could give us a hint at why it’s failing?
Do you see more details in the Postgres log?

This is the log i m getting before and after trying to update .
In postgresl logs there is no such info

[8a4d9098-83f9-4569-88aa-6b368c899bb3] 2020-04-13T21:22:39+05:30 INFO metabase.api.card Question's average execution duration is 16579 ms; using 'magic' TTL of 249 seconds 💾
[8a4d9098-83f9-4569-88aa-6b368c899bb3] 2020-04-13T21:23:00+05:30 INFO metabase.query-processor.middleware.cache Query took 20483 ms to run; miminum for cache eligibility is 30000 ms
[8a4d9098-83f9-4569-88aa-6b368c899bb3] 2020-04-13T21:23:00+05:30 DEBUG metabase.middleware.log POST /api/card/5979/query 200 [ASYNC: completed] 20.5 s (15 DB calls) Jetty threads: 2/50 (7 idle, 0 queued) (161 total active threads) Queries in flight: 2
[8a4d9098-83f9-4569-88aa-6b368c899bb3] 2020-04-13T21:29:05+05:30 ERROR metabase.models.permissions Failed to grant permissions
[8a4d9098-83f9-4569-88aa-6b368c899bb3] 2020-04-13T21:29:05+05:30 ERROR metabase.middleware.log PUT /api/permissions/graph 500 20.7 ms (9 DB calls)
{:message "ERROR: current transaction is aborted, commands ignored until end of transaction block",
:type org.postgresql.util.PSQLException,
:stacktrace
("org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)"
"org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)"
"org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)"
"com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)"
"clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1072)"
"clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1066)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1088)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1075)"
"clojure.java.jdbc$query.invokeStatic(jdbc.clj:1164)"
"clojure.java.jdbc$query.invoke(jdbc.clj:1126)"
"toucan.db$query.invokeStatic(db.clj:285)"
"toucan.db$query.doInvoke(db.clj:281)"
"clojure.lang.RestFn.invoke(RestFn.java:410)"
"toucan.db$simple_select.invokeStatic(db.clj:391)"
"toucan.db$simple_select.invoke(db.clj:380)"
"toucan.db$select.invokeStatic(db.clj:659)"
"toucan.db$select.doInvoke(db.clj:653)"
"clojure.lang.RestFn.applyTo(RestFn.java:139)"
"clojure.core$apply.invokeStatic(core.clj:667)"
"clojure.core$apply.invoke(core.clj:660)"
"toucan.db$select_field.invokeStatic(db.clj:682)"
"toucan.db$select_field.doInvoke(db.clj:674)"
"clojure.lang.RestFn.invoke(RestFn.java:442)"
"--> models.permissions$fn__30323$delete_related_permissions_BANG___30328$fn__30329.invoke(permissions.clj:434)"
"models.permissions$fn__30323$delete_related_permissions_BANG___30328.doInvoke(permissions.clj:405)"
"models.permissions$revoke_db_schema_permissions_BANG_.invokeStatic(permissions.clj:483)"
"models.permissions$revoke_db_schema_permissions_BANG_.invoke(permissions.clj:478)"
"models.permissions$fn__30511$update_db_permissions_BANG___30516$fn__30517.invoke(permissions.clj:609)"
"models.permissions$fn__30511$update_db_permissions_BANG___30516.invoke(permissions.clj:601)"
"models.permissions$fn__30543$update_group_permissions_BANG___30548$fn__30549.invoke(permissions.clj:616)"
"models.permissions$fn__30543$update_group_permissions_BANG___30548.invoke(permissions.clj:613)"
"models.permissions$fn__30588$update_graph_BANG___30597$fn__30598$fn__30602.invoke(permissions.clj:667)"
"models.permissions$fn__30588$update_graph_BANG___30597$fn__30598.invoke(permissions.clj:665)"
"models.permissions$fn__30588$update_graph_BANG___30597.invoke(permissions.clj:652)"
"api.permissions$fn__63242.invokeStatic(permissions.clj:44)"
"api.permissions$fn__63242.invoke(permissions.clj:32)"
"middleware.auth$enforce_authentication$fn__66128.invoke(auth.clj:14)"
"routes$fn__67481$fn__67482.doInvoke(routes.clj:56)"
"middleware.exceptions$catch_uncaught_exceptions$fn__66227.invoke(exceptions.clj:104)"
"middleware.exceptions$catch_api_exceptions$fn__66224.invoke(exceptions.clj:92)"
"middleware.log$log_api_call$fn__67857$fn__67858.invoke(log.clj:178)"
"middleware.log$log_api_call$fn__67857.invoke(log.clj:172)"
"middleware.security$add_security_headers$fn__66190.invoke(security.clj:121)"
"middleware.json$wrap_json_body$fn__67562.invoke(json.clj:64)"
"middleware.json$wrap_streamed_json_response$fn__67580.invoke(json.clj:100)"
"middleware.session$bind_current_user$fn__62721$fn__62722.invoke(session.clj:209)"
"middleware.session$do_with_current_user.invokeStatic(session.clj:184)"
"middleware.session$do_with_current_user.invoke(session.clj:177)"
"middleware.session$bind_current_user$fn__62721.invoke(session.clj:208)"
"middleware.session$wrap_current_user_id$fn__62706.invoke(session.clj:161)"
"middleware.session$wrap_session_id$fn__62650.invoke(session.clj:125)"
"middleware.auth$wrap_api_key$fn__66136.invoke(auth.clj:27)"
"middleware.misc$maybe_set_site_url$fn__67884.invoke(misc.clj:56)"
"middleware.misc$bind_user_locale$fn__67887.invoke(misc.clj:72)"
"middleware.misc$add_content_type$fn__67872.invoke(misc.clj:28)"
"middleware.misc$disable_streaming_buffering$fn__67895.invoke(misc.clj:87)"),
:sql-exception-chain ["PSQLException:" "Message: ERROR: current transaction is aborted, commands ignored until end of transaction block" "SQLState: 25P02" "Error Code: 0"]}

also attaching
Diagnostic Info
Please have a look if you can help us here

{
  "browser-info": {
    "language": "en-GB",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.5+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.5",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.5+10",
    "os.name": "Linux",
    "os.version": "4.15.0-1058-aws",
    "user.language": "en",
    "user.timezone": "Asia/Calcutta"
  },
  "metabase-info": {
    "databases": [
      "postgres",
      "presto"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "run-mode": "prod",
    "version": {
      "date": "2020-01-13",
      "tag": "v0.34.1",
      "branch": "release-0.34.x",
      "hash": "265695c"
    },
    "settings": {
      "report-timezone": "Asia/Calcutta"
    }
  }
}

@akshay13jain Did you try to make a backup and then upgrade to 0.35.2?

Hi Flamber ,
We upgraded to 0.35.2 and still having the same issue .

[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:15+05:30 DEBUG metabase.middleware.log POST /api/dataset 202 [ASYNC: completed] 20.3 ms (6 DB calls) App DB connections: 1/15 Jetty threads: 2/50 (9 idle, 0 queued) (76 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:22+05:30 DEBUG metabase.middleware.log GET /api/permissions/graph 200 19.8 ms (3 DB calls) App DB connections: 1/15 Jetty threads: 4/50 (9 idle, 0 queued) (76 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:22+05:30 DEBUG metabase.middleware.log GET /api/database 200 79.7 ms (4 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (9 idle, 0 queued) (76 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:28+05:30 ERROR metabase.models.permissions Failed to grant permissions
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:28+05:30 ERROR metabase.middleware.log PUT /api/permissions/graph 500 68.6 ms (10 DB calls)
{:message "ERROR: current transaction is aborted, commands ignored until end of transaction block",
:type org.postgresql.util.PSQLException,
:stacktrace
["org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)"
"org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)"
"org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)"
"com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)"
"clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1072)"
"clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1066)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1088)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1075)"
"clojure.java.jdbc$query.invokeStatic(jdbc.clj:1164)"
"clojure.java.jdbc$query.invoke(jdbc.clj:1126)"
"toucan.db$query.invokeStatic(db.clj:288)"
"toucan.db$query.doInvoke(db.clj:284)"
"clojure.lang.RestFn.invoke(RestFn.java:410)"
"toucan.db$simple_select.invokeStatic(db.clj:394)"
"toucan.db$simple_select.invoke(db.clj:383)"
"toucan.db$select.invokeStatic(db.clj:662)"
"toucan.db$select.doInvoke(db.clj:656)"
"clojure.lang.RestFn.applyTo(RestFn.java:139)"
"clojure.core$apply.invokeStatic(core.clj:667)"
"clojure.core$apply.invoke(core.clj:660)"
"toucan.db$select_field.invokeStatic(db.clj:685)"
"toucan.db$select_field.doInvoke(db.clj:677)"
"clojure.lang.RestFn.invoke(RestFn.java:442)"
"--> models.permissions$fn__30941$delete_related_permissions_BANG___30946$fn__30947.invoke(permissions.clj:434)"
"models.permissions$fn__30941$delete_related_permissions_BANG___30946.doInvoke(permissions.clj:405)"
"models.permissions$revoke_db_schema_permissions_BANG_.invokeStatic(permissions.clj:483)"
"models.permissions$revoke_db_schema_permissions_BANG_.invoke(permissions.clj:478)"
"models.permissions$fn__31129$update_db_permissions_BANG___31134$fn__31135.invoke(permissions.clj:609)"
"models.permissions$fn__31129$update_db_permissions_BANG___31134.invoke(permissions.clj:601)"
"models.permissions$fn__31161$update_group_permissions_BANG___31166$fn__31167.invoke(permissions.clj:616)"
"models.permissions$fn__31161$update_group_permissions_BANG___31166.invoke(permissions.clj:613)"
"models.permissions$fn__31206$update_graph_BANG___31215$fn__31216$fn__31220.invoke(permissions.clj:667)"
"models.permissions$fn__31206$update_graph_BANG___31215$fn__31216.invoke(permissions.clj:665)"
"models.permissions$fn__31206$update_graph_BANG___31215.invoke(permissions.clj:652)"
"api.permissions$fn__63943.invokeStatic(permissions.clj:44)"
"api.permissions$fn__63943.invoke(permissions.clj:32)"
"middleware.auth$enforce_authentication$fn__66831.invoke(auth.clj:14)"
"routes$fn__68355$fn__68356.doInvoke(routes.clj:56)"
"middleware.exceptions$catch_uncaught_exceptions$fn__66930.invoke(exceptions.clj:97)"
"middleware.exceptions$catch_api_exceptions$fn__66927.invoke(exceptions.clj:85)"
"middleware.log$log_api_call$fn__68733$fn__68734.invoke(log.clj:197)"
"middleware.log$log_api_call$fn__68733.invoke(log.clj:191)"
"middleware.security$add_security_headers$fn__66893.invoke(security.clj:121)"
"middleware.json$wrap_json_body$fn__68436.invoke(json.clj:64)"
"middleware.json$wrap_streamed_json_response$fn__68454.invoke(json.clj:100)"
"middleware.misc$maybe_set_site_url$fn__68763.invoke(misc.clj:59)"
"middleware.session$bind_current_user$fn__63420$fn__63421.invoke(session.clj:209)"
"middleware.session$do_with_current_user.invokeStatic(session.clj:184)"
"middleware.session$do_with_current_user.invoke(session.clj:177)"
"middleware.session$bind_current_user$fn__63420.invoke(session.clj:208)"
"middleware.session$wrap_current_user_id$fn__63405.invoke(session.clj:161)"
"middleware.session$wrap_session_id$fn__63349.invoke(session.clj:125)"
"middleware.auth$wrap_api_key$fn__66839.invoke(auth.clj:27)"
"middleware.misc$bind_user_locale$fn__68768.invoke(misc.clj:78)"
"middleware.misc$add_content_type$fn__68749.invoke(misc.clj:29)"
"middleware.misc$disable_streaming_buffering$fn__68777.invoke(misc.clj:94)"
"server$async_proxy_handler$fn__68511.invoke(server.clj:70)"
"server.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)"],
:sql-exception-chain ["PSQLException:" "Message: ERROR: current transaction is aborted, commands ignored until end of transaction block" "SQLState: 25P02" "Error Code: 0"]}

[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:44+05:30 DEBUG metabase.middleware.log GET /api/util/bug_report_details 200 4.8 ms (1 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (8 idle, 0 queued) (75 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:45+05:30 DEBUG metabase.middleware.log GET /api/table/77/fks 200 12.6 ms (5 DB calls) App DB connections: 0/15 Jetty threads: 4/50 (8 idle, 0 queued) (75 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:45+05:30 DEBUG metabase.middleware.log GET /api/table/77/query_metadata 200 14.4 ms (9 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (8 idle, 0 queued) (75 total active threads) Queries in flight: 1 (0 queued)
[db67b3fc-8d03-42d3-ada5-2ebeb8ea6534] 2020-04-14T21:24:47+05:30 DEBUG metabase.middleware.log GET /api/task/info 200 4.7 ms (0 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (8 idle, 0 queued) (75 total active threads) Queries in flight: 1 (0 queued)

Which table the connection and permission details saved inside metabase ?

Flamber any hope ??

@akshay13jain
If you enable debug logging on Postgres, then you should be able to see why the transaction is failing.
I’ve never seen that error before, so I’m not sure what’s going on - and the error message doesn’t provide enough information.
Metabase stores databases in metabase_database and permissions in permissions

Hi Flamber ,

Below is my postgres logs for metabase . Please have a look and guide me if you get any thread

----------------------- END OF LOG ----------------------

2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:ERROR: duplicate key value violates unique constraint "permissions_group_id_object_key"
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:DETAIL: Key (group_id, object)=(1, /db/2/schema/) already exists.
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:STATEMENT: INSERT INTO "permissions" ("group_id", "object") VALUES (1, $1)
RETURNING *
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:ERROR: current transaction is aborted, commands ignored until end of transaction block
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:STATEMENT:
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:ERROR: current transaction is aborted, commands ignored until end of transaction block
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:STATEMENT: SELECT "permissions"."object" FROM "permissions" WHERE ("group_id" = 1 AND (($1 like concat("object", '%')) OR ("object" like $2)) AND "object" <> $3)
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:ERROR: current transaction is aborted, commands ignored until end of transaction block
2020-04-15 13:29:38 UTC:215.1.31.150.dy.iij4u.or.jp(57478):root@metabase:[10298]:STATEMENT:

@akshay13jain
Well, that looks exactly like the issue I already referred to: https://github.com/metabase/metabase/issues/4000
But I don’t understand how you’ve suddenly seeing this.
Try making a backup of your application database and truncate the permissions table, and then start Metabase again and set the permissions as you need.

Thanks a ton Flamber issue got resolved .
We deleted alluser entries from permission table and it got resolved .

Regards,
Akshay

@akshay13jain Excellent. And thanks for the confirmation. I’m not sure how this inconsistency got into your permissions table, but glad it solved your problem.

1 Like