bft安装log(4)

1.因为运行replica时出现"unable to join group",进入replica,打印group等的信息

在函数Replica::join_mcast_group() 加入

1951     //change by york
1952     struct in_addr addr_test;
1953     addr_test.s_addr =req.imr_multiaddr.s_addr;
1954     printf("req.imr_multiaddr: %s\n", inet_ntoa(addr_test));
1955     printf("\nreq.imr_interface: %u\n",req.imr_interface.s_addr);                                                                              
1956     //change by york

 

make,运行"./server"

输出:

Unable to join group: Invalid argument
req.imr_multiaddr: 192.168.0.255
req.imr_interface: 0

应该是广播地址不对:

因为组播地址应该是在多播地址为224.0.0.0-239.255.255.255之间的...于是把地址改回234.5.6.8,成功运行

2.运行四个replica时,rh2,rh3出现segment fault.这是一类内存越界错误,我修改了他们的config_priv配置文件,就好了...

最终四个replica可以正常运行,client返回了正确的结果

你可能感兴趣的:(log)