您好,登錄后才能下訂單哦!
這篇文章主要講解了“radosgw的civetweb配置與排錯方法”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“radosgw的civetweb配置與排錯方法”吧!
在64bit debian8 下面使用的仍然是sysinit,運行ceph-deploy rgw create 新建rgw的時候,提示rgw服務無法啟動,排查如下:
檢查ceph auth配置
root@demo:/etc/ceph# ceph auth list ...... client.rgw.demo # 使用ceph-deploy rgw create的時候自動生成 key: AQB0NPlVEkpPExAAaOAkz+X6fB9sJaMdR+Bq4Q== caps: [mon] allow rw caps: [osd] allow rwx
ceph auth已經生成了一個client.rgw.demo的用戶,同時在/etc/ceph下面也生成了對于的keyring(沒有,請手工添加)
cat /etc/ceph/ceph.client.radosgw.demo.keyring [client.rgw.demo] key = AQB0NPlVEkpPExAAaOAkz+X6fB9sJaMdR+Bq4Q==
檢查ceph.conf配置
cat /etc/ceph/ceph.conf [client.rgw.demo] #重點是這個sections host = demo keyring = /etc/ceph/ceph.client.radosgw.demo.keyring rgw_frontends = civetweb port=80 rgw socket path = /var/run/ceph/ceph-client.rgw.demo.asok #這個socket文件關聯服務運行狀態 log file = /var/log/radosgw/client.radosgw.demo.log rgw print continue = false rgw enable ops log = false rgw ops log rados = false rgw ops log data bakclog = 4096
手工啟動服務成功 手工啟動命令,注意-n為ceph auth里面的用戶名
手工啟動 radosgw -n client.rgw.demo 檢查端口及進程 netstat -talnp|grep rados tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6601/radosgw tcp 0 0 10.0.2.15:58613 10.0.2.15:6789 ESTABLISHED 6601/radosgw tcp 0 0 10.0.2.15:55465 10.0.2.15:6800 ESTABLISHED 6601/radosgw tcp 0 0 10.0.2.15:51986 10.0.2.15:6804 ESTABLISHED 6601/radosgw tcp 0 0 10.0.2.15:51098 10.0.2.15:6808 ESTABLISHED 6601/radosgw ps aux|grep rados root 6601 0.5 1.5 2165088 15692 ? Ssl 11:11 0:00 radosgw -n client.rgw.demo
init腳本啟動與排錯
/etc/init.d/radosgw start /usr/bin/radosgw is not running.
啟動失敗,啟動debug模式再來
sh -x /etc/init.d/radosgw start + PATH=/sbin:/bin:/usr/bin + . /lib/lsb/init-functions + run-parts --lsbsysinit --list /lib/lsb/init-functions.d + [ -r /lib/lsb/init-functions.d/20-left-info-blocks ] + . /lib/lsb/init-functions.d/20-left-info-blocks + [ -r /lib/lsb/init-functions.d/40-systemd ] + . /lib/lsb/init-functions.d/40-systemd + _use_systemctl=0 + [ -d /run/systemd/system ] + [ 0 = 1 ] + FANCYTTY= + [ -e /etc/lsb-base-logging.sh ] + true + VERBOSE=0 + [ start = -v ] + [ start = --verbose ] + PREFIX=client.radosgw. + DEFAULT_USER=root + which radosgw + RADOSGW=/usr/bin/radosgw + [ ! -x /usr/bin/radosgw ] + ceph-conf --list-sections client.radosgw. + daemon_is_running /usr/bin/radosgw + daemon=/usr/bin/radosgw + pidof /usr/bin/radosgw + echo /usr/bin/radosgw is not running. /usr/bin/radosgw is not running. + exit 1
重點就是ceph-conf --list-sections client.radosgw.
,這里對ceph.conf配置文件的sections做了簡單的檢查,只認client.radosgw,而我們的ceph.conf里面寫的是client.rgw,手工運行命令確認一下我們的判斷
ceph-conf --list-sections client.radosgw. 無返回 ceph-conf --list-sections client.rgw. client.rgw.demo
解決問題
我這里用方法1
修改/etc/init.d/radosgw # prefix for radosgw instances in ceph.conf #PREFIX='client.radosgw.' PREFIX='client.rgw.' 測試 /etc/init.d/radosgw start Starting client.rgw.demo... /usr/bin/radosgw is running. ps -axu|grep radosgw root 7045 1.7 1.5 2165080 15696 ? Ssl 11:30 0:00 /usr/bin/radosgw -n client.rgw.demo netstat -tuanlp|grep rados tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7045/radosgw tcp 0 0 10.0.2.15:58617 10.0.2.15:6789 ESTABLISHED 7045/radosgw tcp 0 0 10.0.2.15:51990 10.0.2.15:6804 ESTABLISHED 7045/radosgw tcp 0 0 10.0.2.15:55469 10.0.2.15:6800 ESTABLISHED 7045/radosgw tcp 0 0 10.0.2.15:51102 10.0.2.15:6808 ESTABLISHED 7045/radosgw
方法1 修改啟動腳本
方法2 修改ceph.conf的sections為client.radosgw.xxxx,同時ceph auth里面的用戶也要改
感謝各位的閱讀,以上就是“radosgw的civetweb配置與排錯方法”的內容了,經過本文的學習后,相信大家對radosgw的civetweb配置與排錯方法這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。