MongoosIM 無法從 postgres 資料庫進行身份驗證

MongoosIM 無法從 postgres 資料庫進行身份驗證

我已經在虛擬機器中安裝了 MongooseIM 進行測試。我正在嘗試從外部 postgres 資料庫進行使用者身份驗證。當我使用註冊新用戶時

mongooseimctl register user host password 

它在我的資料庫的用戶表中新增了一個新行。但是,當我嘗試使用 xmpp 客戶端連線時,出現錯誤:

{message,<<"column \"pass_details\" does not     exist">>}

我已經從下載了架構https://raw.githubusercontent.com/processone/ejabberd/master/sql/pg.sql並且它的用戶表中沒有「pass_details」列。我嘗試尋找專門針對 MongooseIm 的模式,但沒有找到。 MongoosIM 是否有不同的架構?或者我可以透過新增 pass_details 列來修復它嗎?那麼該列的值應該是多少?或者有其他方法可以解決這個問題嗎?

2015-02-25 15:21:07.684 [debug] <0.1802.0>@ejabberd_commands:execute_command2:339 Executing command     ejabberd_admin:register with Args=[<<"bob">>,<<"localhost">>,<<"PASSWORD">>]
2015-02-25 15:21:07.685 [debug] <0.1627.0>@ejabberd_odbc:sql_query_internal:574 Postres, Send query
[<<"select password, pass_details from users where username='">>,<<"bob">>,<<"';">>]
2015-02-25 15:21:07.695 [error] <0.1802.0>@ejabberd_auth:is_user_exists:346 The authentication     module ejabberd_auth_odbc returned an error
when checking user <<"bob">> in server <<"localhost">>
Error message: [{severity,'ERROR'},{code,<<"42703">>},{message,<<"column \"pass_details\" does not     exist">>},{position,18},{file,<<"parse_relation.c">>},{line,2655},{routine,<<"errorMissingColumn">>}]
2015-02-25 15:21:07.696 [debug] <0.1624.0>@ejabberd_odbc:sql_query_internal:574 Postres, Send query
[<<"insert into users(username, password) values ('">>,<<"bob">>,<<"', '">>,<<"PASSWORD">>,<<"');">>]

答案1

您下載的架構適用於最新版本的 ejabberd。我建議您確保使用 ejabberd 最新版本以及您下載的架構。

相關內容