FastDFS下的storage服務啓動卡住

環境:ubuntu 16.04

STORAGE SERVER的狀態通常有七種:

# FDFS_STORAGE_STATUS:INIT      :初始化,尚未得到同步已有數據的源服務器

# FDFS_STORAGE_STATUS:WAIT_SYNC :等待同步,已得到同步已有數據的源服務器

# FDFS_STORAGE_STATUS:SYNCING   :同步中

# FDFS_STORAGE_STATUS:DELETED   :已刪除,該服務器從本組中摘除

# FDFS_STORAGE_STATUS:OFFLINE   :離線

# FDFS_STORAGE_STATUS:ONLINE    :在線,尚不能提供服務

# FDFS_STORAGE_STATUS:ACTIVE    :在線,可以提供服務

端口23000沒有開啓。23000端口是storage服務的端口,在storage.conf裏配置。我已經打開了。
在這裏插入圖片描述

上傳文件是會報錯:

root@jnydjky:/optlim# /usr/bin/fdfs_upload_file /etc/fdfs/client.conf /home/qq.png
[2020-02-23 15:58:14] ERROR - file: connection_pool.c, line: 110, connect to 120.220.207.153:22122 fail, errno: 110, error info: Connection timed ou

在這裏插入圖片描述
報錯信息

root@jnydjky:/usr/lib# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf stop
pid file: /data/fastdfs/storage/data/fdfs_storaged.pid not exist!
root@jnydjky:/usr/lib# /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart

在這裏插入圖片描述
原因:

解決辦法:
查看端口,查看進程storage
1、檢查網絡沒有問題,防火牆也關閉了;
2、storage的配置文件的storage路徑檢查看後也沒有問題;
3、通過killall fdfs_storaged 停止storage服務後,使用fdfs_storaged /etc/fdfs/storage.conf restart 重啓storage服務後,使用ps aux |grep storage查看進程,進程是正常運行的;
在這裏插入圖片描述
通過 lsof -i:23000 ,查看端口,發現出現問題的storage沒有開啓此端口(說明storage只啓動了線程,沒有開啓端口);
在這裏插入圖片描述

解決問題

使用FastDFS自帶的stop.sh腳本停止服務,如:停止tracker服務,然後重啓:

root@jnydjky:/home# /usr/local/bin/stop.sh /usr/local/bin/fdfs_trackerd 
stopping fdfs_trackerd ...
.

在這裏插入圖片描述
最後查看lsof -i:23000
在這裏插入圖片描述

參考鏈接 :
關於FDFS的storage服務器bug問題說明 :https://blog.csdn.net/ever_siyan/article/details/88865776

fastDFS中的storage服務端口啓動不起來 :https://blog.csdn.net/weixin_40308031/article/details/87865329

https://blog.csdn.net/weixin_40308031/article/details/87865329

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章