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
9.06k stars 1.99k forks source link

when upload file comes recvStorageInfo pkgLen 70 invaild #703

Closed FunkyYang closed 7 months ago

FunkyYang commented 7 months ago

server version: fdfs_trackerd V6.12.1 fdfs_storaged V6.12.1

use fast dfs for go client,and receive recvStorageInfo pkgLen 70 invaild what happend?

happyfish100 commented 7 months ago

the length of IP address changed from 16 to 46 for IPv6 since FDFS V6.11

FunkyYang commented 7 months ago

I use IPV4 for test,this error is still exists

FunkyYang commented 7 months ago

it seems the reply from server not compatible

happyfish100 commented 7 months ago

you should change the length of IP address from 16 to 46 in FastDFS protocol

FunkyYang commented 7 months ago

other questions

receive from server response,the protocol format may be error,

    if _, err := tcpConn.Read(buf); err != nil {
        return err
    }
    // 通信协议详情地址: https://mp.weixin.qq.com/s/lpWEv3NCLkfKmtzKJ5lGzQ
    // 响应body:
    //@group_name:16字节字符串,组名
    //@ip_addr:15字节字符串, storage server IP地址
    //@port:8字节整数,storage server端口号
    //@store_path_index:1字节整数,基于0的存储路径顺序号
    log.Printf("buff:%s", string(buf))
buff:group1          192.168.1.89                                       Y� 

I don't see port param in reponse ?why?

happyfish100 commented 7 months ago

the port is binary format (not readable digit).

Yancy0220 commented 7 months ago

请问怎么解决的?