happyfish100 / fastdfs

FastDFS is an open source high performance distributed file system (DFS). It's major functions include: file storing, file syncing and file accessing, and design for high capacity and load balance. Wechat/Weixin public account (Chinese Language): fastdfs
GNU General Public License v3.0
8.91k stars 1.97k forks source link

获取的storage节点的port=0 #700

Open YiXing-Zhou opened 4 months ago

YiXing-Zhou commented 4 months ago

Hi,我在SpringBoot里边整合FastDFS,DefaultFastFileStorageClient.getStorageNode(String groupName) ,获取到的 storage端口号是 "0" ; 我看您回答可能是版本问题,帮忙看一下我的版本是否有问题吧,多谢~ 相关配置: tracker 配置 port 22122、storage 配置 port=23000 FastDFS v6.12.1 spring boot 导入包版本:

com.github.tobato fastdfs-client 1.27.2
happyfish100 commented 4 months ago

fastdfs-client-java 版本太低了,需要使用最新的 v1.32

yourfa-3270 commented 3 months ago

maven仓库最新的才1.27.2
image

YiXing-Zhou commented 3 months ago

maven仓库最新的才1.27.2 image

Hi,这个问题确实和版本有关,最快的修复方案我可以提供一下给你; 如果你和我遇到同样的问题,可以先继承一下 DefaultTrackerClient 类,然后强制修改一下返回port值,这样就可以解决这个问题了; Example: image

yourfa-3270 commented 3 months ago

好的,谢谢

linpeng11111 commented 2 days ago

万分感谢