StackStrom載入組件失敗原因

來源:互聯網
上載者:User

當筆者在手工安裝完所有組件,利用命令sudo  st2ctl reload時候,報如下錯誤:

Connecting to database "st2" @ "127.0.0.1:27017" as user "None" 


看到這個資訊筆者首先想到是不是在mongodb沒有配置使用者。

stackstorm的mongodb資訊配置是在 /etc/st2/st2.conf檔案裡面

[database]host = <MongoDB host>port = <MongoDB server port>db_name = <User define database name, usually st2>username = <username for db login>password = <password for db login>

這個資訊就是配置mongodb資訊,使用者名稱和密碼是可選的。

1、先用無鑒權的

利用ps -aux|grep mongod會發現設定檔在 /etc/mongod.conf 

security:authorization: enabled

把上面行注釋掉然後重啟mongodb

然後重新執行sudo st2ctl reload


在上圖中你看到所有的關鍵進程都起來了(chatops我們還沒有配置)

2、使用鑒權登陸

串連mongodb後   執行如下指令碼

    use st2;    db.createUser({        user: "stackstorm",        pwd: "StackStorm",        roles: [            { role: "readWrite", db: "st2" }        ]    });

在/etc/st2/st2.conf配置mongodb的登陸資訊

最後在mongod.conf中開啟許可權驗證。

security:authorization: enabled
即可 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.