台服dnf搭建过程中可能会出现一些大大小小的问题,这里就个人搭建经验单独做一下总结。
1、缺依赖:
./df_bridge_r: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
error while loading shared libraries: libnxencryption.so: cannot open shared object file: No such file or directory
yum install -y zlib-1.2.3-7.el5.i386
./df_game_r: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory
yum install -y GeoIP-1.4.5-1.el5.centos.x86_64
一般缺少依赖可以使用yum命令查询库文件所在依赖包,安装即可:
yum whatprovides */libGeoIP.so.1
2、拍卖行问题
*Fail to exec(select count(*) from auction_history). process exits.
这个错误是缺少当前月份的拍卖行数据表,想要修复,构造指定月份的表即可
taiwan_cain_auction_cera 及 taiwan_cain_auction_gold库中()
- auction_history_202204
- auction_history_buyer_202204
3、CONNECTION FAIL IP... 错误
ip a
这个错误有以下三种情况:
3.1.配置文件ip未修改正确
这种情况需要知道旧ip及当前服务器ip,全局替换即可;
旧ip可以执行一下命令获取:
cat /home/dxf/channel/cfg/channel.cfg|grep this_ip
当前服务器ip执行,inet后不是127.0.0.1的就是当前ip:
ip a|grep inet
发现不一致需要执行批量替换命令:
cd /home/dxf
sed -i "s/old_ip/new_id/g" `find . -type f -name "*.tbl"`
sed -i "s/old_ip/new_id/g" `find . -type f -name "*.cfg"`
以下错误略过即可:
3.2.数据库表字段未更新
进入数据库,可以直接覆盖设置即可,以下是检查命令:
mysql -ugame -p'uu5!^%jg'
use d_taiwan;
select distinct db_ip from db_connect;
select distinct db_ip from dblab_db_connect_130516;
直接覆盖:
use d_taiwan;
update db_connect set db_ip='new_server';
update dblab_db_connect_130516 set db_ip='new_server';
3.3.让子弹飞一会儿
这种情况其实没有大碍,仅仅由于多个线程间启动顺序问题,可能在第一个服务尚未启动时下一个服务就尝试连接,我们不妨让子弹飞一会儿
4、Make Dump Core file.
无解
可能一般会想到是内存撑爆了,但1G内存+4G交换其实够用,其实这里大概率是数据库的问题,检查一下数据库日志文件
正常情况: