From a5dff67bfd658fa00cacda3ab7d127a61b3bf9bd Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Tue, 5 Mar 2024 11:48:24 +0700 Subject: [PATCH 1/2] delete server user on start up to re-initialize --- mq/mq.go | 1 + 1 file changed, 1 insertion(+) diff --git a/mq/mq.go b/mq/mq.go index bcd1070a1..28359b6fc 100644 --- a/mq/mq.go +++ b/mq/mq.go @@ -60,6 +60,7 @@ func SetupMQTT() { log.Fatal(err) } } else { + emqx.DeleteEmqxUser(servercfg.GetMqUserName()) if err := emqx.CreateEmqxUserforServer(); err != nil { log.Fatal(err) } From 96f649393c41de7272795a26dfcbc5026312e620 Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Tue, 5 Mar 2024 12:02:02 +0700 Subject: [PATCH 2/2] increase verbosity on mq log --- migrate/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate/migrate.go b/migrate/migrate.go index 0dd8ba5cb..da2161974 100644 --- a/migrate/migrate.go +++ b/migrate/migrate.go @@ -307,7 +307,7 @@ func MigrateEmqx() { slog.Info("proceeding to kicking out clients from emqx") err = mq.KickOutClients() if err != nil { - logger.Log(0, "failed to migrate emqx: ", "kickout-error", err.Error()) + logger.Log(2, "failed to migrate emqx: ", "kickout-error", err.Error()) } }