Aerospike错误:(9)客户超时:超时=1000次迭代=1个失败的节点=0,conns =0。

时间:2021-12-19 08:46:24

Im new to Aerospike...!

我新喷管和钟……!

when im trying to insert an record into database it show an timeout error like...

当我试图在数据库中插入一个记录时,它会显示一个超时错误,比如……

aql> INSERT INTO test.student (pk, emp_id, name, age) VALUES ('k003', 'BP003', 'Sai', 25)
Error: (9) Client timeout: timeout=1000 iterations=1 failedNodes=0 failedConns=0

and one more thing....

还有一件事....

I turn off my wifi and then run the same command at that time it didn't show the error and the command is successfully runs.

我关闭了我的wifi,然后运行同样的命令,它没有显示错误,命令成功运行。

aql> INSERT INTO test.student (pk, emp_id, name, age) VALUES ('k003', 'BP003', 'Sai', 25)
OK, 1 record affected.

so what this means...?

所以这意味着什么……?

can anyone help me out of this.....!

谁能帮我摆脱这个困境…

2 个解决方案

#1


3  

It means you should increase timeout parameter. Depending how far you are from the database, 1 sec may be not enough.

这意味着您应该增加超时参数。取决于你离数据库有多远,1秒可能还不够。

#2


2  

Something was wrong with your network, and since you're not mentioning anything about where your client is (where AQL is running) and where your server is, it's impossible to tell. Obviously if the client can't get to the server the operation cannot happen. If both are localhost you may have some odd configuration where your wifi was trying to look for 127.0.0.1 on the internet and once you disconnected from it the client was able to reach to the server locally...not enough details to know.

您的网络有问题,因为您没有提到您的客户端(AQL正在运行的地方)和您的服务器在哪里,所以不可能知道。显然,如果客户端无法到达服务器,操作就不会发生。如果两者都是localhost,那么您可能会有一些奇怪的配置,您的wifi在internet上尝试查找127.0.0.1,一旦断开连接,客户机就可以在本地访问服务器了……没有足够的细节。

Just make sure your clients can see your server node. Simplest is to try to telnet <host> 3000 (assuming the default port 3000).

确保您的客户端可以看到您的服务器节点。最简单的方法是尝试telnet 3000(假设默认端口3000)。

Regarding timeouts (in general) AQL type help and you'll get (among other things):

关于超时(一般来说)AQL类型的帮助,您将得到(除其他外):

SETTINGS
    TIMEOUT                       (time in ms, default: 1000)
    RECORD_TTL                    (time in sec, default: 0)
    RECORD_PRINT_METADATA         (true | false, default false)
    VERBOSE                       (true | false, default false)
    ECHO                          (true | false, default true)
    FAIL_ON_CLUSTER_CHANGE        (true | false, default true, policy applies to scans)
    OUTPUT                        (TABLE | JSON, default TABLE)
    LUA_USERPATH                  <path>, default : /opt/aerospike/usr/udf/lua
    LUA_SYSPATH                   <path>, default : /opt/aerospike/sys/udf/lua
    USE_SMD                       (true | false, default false)
    REPLICA_ANY                   (true | false, default false)

    To get the value of a setting, run:

        aql> GET <setting>

    To set the value of a setting, run:

        aql> SET <setting> <value>

So, SET TIMEOUT 2500, for example.

例如,设置TIMEOUT 2500。

#1


3  

It means you should increase timeout parameter. Depending how far you are from the database, 1 sec may be not enough.

这意味着您应该增加超时参数。取决于你离数据库有多远,1秒可能还不够。

#2


2  

Something was wrong with your network, and since you're not mentioning anything about where your client is (where AQL is running) and where your server is, it's impossible to tell. Obviously if the client can't get to the server the operation cannot happen. If both are localhost you may have some odd configuration where your wifi was trying to look for 127.0.0.1 on the internet and once you disconnected from it the client was able to reach to the server locally...not enough details to know.

您的网络有问题,因为您没有提到您的客户端(AQL正在运行的地方)和您的服务器在哪里,所以不可能知道。显然,如果客户端无法到达服务器,操作就不会发生。如果两者都是localhost,那么您可能会有一些奇怪的配置,您的wifi在internet上尝试查找127.0.0.1,一旦断开连接,客户机就可以在本地访问服务器了……没有足够的细节。

Just make sure your clients can see your server node. Simplest is to try to telnet <host> 3000 (assuming the default port 3000).

确保您的客户端可以看到您的服务器节点。最简单的方法是尝试telnet 3000(假设默认端口3000)。

Regarding timeouts (in general) AQL type help and you'll get (among other things):

关于超时(一般来说)AQL类型的帮助,您将得到(除其他外):

SETTINGS
    TIMEOUT                       (time in ms, default: 1000)
    RECORD_TTL                    (time in sec, default: 0)
    RECORD_PRINT_METADATA         (true | false, default false)
    VERBOSE                       (true | false, default false)
    ECHO                          (true | false, default true)
    FAIL_ON_CLUSTER_CHANGE        (true | false, default true, policy applies to scans)
    OUTPUT                        (TABLE | JSON, default TABLE)
    LUA_USERPATH                  <path>, default : /opt/aerospike/usr/udf/lua
    LUA_SYSPATH                   <path>, default : /opt/aerospike/sys/udf/lua
    USE_SMD                       (true | false, default false)
    REPLICA_ANY                   (true | false, default false)

    To get the value of a setting, run:

        aql> GET <setting>

    To set the value of a setting, run:

        aql> SET <setting> <value>

So, SET TIMEOUT 2500, for example.

例如,设置TIMEOUT 2500。