本文介绍在SequoiaDB 5.0.1 安装时,在创建编目节点组时报错 db.createCataRG("sdbserver1", 11800, "/opt/sequoiadb/database/cata/11800") (shell):1 uncaught exception: -15 Network error。需要将第一个参数改成本地的主机名domain才可以。
目录导航
现象
[sdbadmin@gbase_rh7_001 ~]$ sdb
Welcome to SequoiaDB shell!
help() for help, Ctrl+c or quit to exit
> var db = new Sdb("10.0.2.101",18800)
Takes 0.005774s.
> db.createCataRG("sdbserver1", 11800, "/opt/sequoiadb/database/cata/11800")
(shell):1 uncaught exception: -15
Network error
Takes 0.025069s.
>
分析
查看日志,发现如下内容
/opt/sequoiadb/database/coord/18800/diaglog/sdbdiag.log
发现是ossSocket连接报错:Failed to connect, rc = 101,查看 Linux操作系统错误码,是
OS error code 101: Network is unreachable
操作系统错误代码101:网络不可达
对照代码,发现sdbserver1并不是本机的主机名,也不是IP地址。
2021-01-13-01.08.36.452985 Level:ERROR
PID:25893 TID:25974
Function:connect Line:758
File:SequoiaDB/engine/oss/ossSocket.cpp
Message:
Failed to connect, rc = 101
2021-01-13-01.08.36.453072 Level:ERROR
PID:25893 TID:25974
Function:rtnRemoteExec Line:151
File:SequoiaDB/engine/rtn/rtnRemoteExec.cpp
Message:
Failed connect remote server[sdbserver1:11790], rc=-15
2021-01-13-01.08.36.453123 Level:ERROR
PID:25893 TID:25974
Function:execute Line:1062
File:SequoiaDB/engine/coord/coordCommandNode.cpp
Message:
Do remote execute on node[sdbserver1:11800] failed, rc: -15
2021-01-13-01.08.36.453160 Level:ERROR
PID:25893 TID:25974
Function:_onQueryReqMsg Line:2050
File:SequoiaDB/engine/pmd/pmdProcessor.cpp
Message:
Execute operator[create catalog group] failed, rc: -15
2021-01-13-01.08.36.453189 Level:ERROR
PID:25893 TID:25974
Function:processMsg Line:2189
File:SequoiaDB/engine/pmd/pmdProcessor.cpp
Message:
Error processing Agent request, rc=-15
2021-01-13-01.08.36.453297 Level:WARNING
PID:25893 TID:25974
Function:_onMsgEnd Line:335
File:SequoiaDB/engine/pmd/pmdSession.cpp
Message:
Session[10.0.2.101:35780] process msg[opCode=2004, len: 204, TID: 26824, requestID: 0] failed, rc: -15
^C
解决方案
将参数改成本地的主机名即可。
> db.createCataRG("gbase_rh7_001", 11800, "/opt/sequoiadb/database/cata/11800")
Takes 3.166702s.