我在一台服务器上建立了一个arangodb 3.1.10集群,该服务器有3个代理,5个协调器和5个初选。我在使用带分片集合的大批量时遇到了问题。
我经常在负责批量查询的协调器中收到以下错误:
2017-02-15T15:23:28Z [2665] ERROR {cluster} cannot create connection to server 'PRMR-6f3a5704-5500-4fa8-8933-5029e492c25d' at endpoint 'tcp://localhost:4101'
2017-02-15T15:23:28Z [2665] ERROR {cluster} cannot create connection to server 'PRMR-6f3a5704-5500-4fa8-8933-5029e492c25d' at endpoint 'tcp://localhost:4101'
Localhost:4101是PRIMARY。但是它自己的日志没有显示任何错误:
2017-02-15T14:38:10Z [2582] INFO ArangoDB 3.1.10 [linux] 64bit, using VPack 0.1.30, ICU 54.1, V8 5.0.71.39, OpenSSL 1.0.1e-fips 11 Feb 2013
2017-02-15T14:38:10Z [2582] INFO using SSL options: SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_TLS_ROLLBACK_BUG
2017-02-15T14:38:10Z [2582] INFO Starting up with role PRIMARY
2017-02-15T14:38:27Z [2582] INFO {cluster} Fresh start. Persisting new UUID PRMR-6f3a5704-5500-4fa8-8933-5029e492c25d
2017-02-15T14:38:27Z [2582] INFO file-descriptors (nofiles) hard limit is 65536, soft limit is 65536
2017-02-15T14:38:27Z [2582] INFO WAL directory '/opt/arangodb/primary_4101/data/journals' does not exist. creating it...
2017-02-15T14:38:27Z [2582] INFO created base application directory '/opt/arangodb/primary_4101/apps/_db'
2017-02-15T14:38:27Z [2582] INFO JavaScript using startup '/usr/share/arangodb3/js', application '/opt/arangodb/primary_4101/apps'
2017-02-15T14:38:28Z [2582] INFO Cluster feature is turned on. Agency version: {"server":"arango","version":"3.1.10","license":"community"}, Agency endpoints: http+tcp://127.0.0.1:4002, http+tcp://127.0.0.1:4000, http+tcp://127.0.0.1:4001, server id: 'PRMR-6f3a5704-5500-4fa8-8933-5029e492c25d', internal address: tcp://localhost:4101, role: PRIMARY
2017-02-15T14:38:28Z [2582] INFO using heartbeat interval value '1000 ms' from agency
2017-02-15T14:38:28Z [2582] INFO using endpoint 'http+tcp://0.0.0.0:4101' for non-encrypted requests
2017-02-15T14:38:28Z [2582] INFO bootstrapped DB server PRMR-6f3a5704-5500-4fa8-8933-5029e492c25d
2017-02-15T14:38:28Z [2582] INFO ArangoDB (version 3.1.10 [linux]) is ready for business. Have fun!
2017-02-15T15:22:42Z [2582] INFO created application directory '/opt/arangodb/primary_4101/apps/_db/entities' for database 'entities'`
只要集合没有分片,它就可以正常工作,但只要我添加分片,一些批次就会失败。在进行此测试时,我的收藏品都有5个碎片。
这是我用来启动主要命令的命令:
/usr/sbin/arangod \
--server.endpoint tcp://0.0.0.0:4101 \
--server.threads 8 \
--log.level INFO \
--javascript.v8-contexts 4 \
--database.directory /opt/arangodb/primary_4101/data \
--javascript.startup-directory /usr/share/arangodb3/js \
--javascript.app-path /opt/arangodb/primary_4101/apps \
--log.file /opt/arangodb/primary_4101/arangod.log \
--log.force-direct false \
--server.authentication false \
--cluster.my-address tcp://localhost:4101 \
--cluster.my-role PRIMARY \
--cluster.my-local-info tcp://localhost:4101 \
--foxx.queues false \
--server.statistics true \
--cluster.agency-endpoint tcp://localhost:4000 --cluster.agency-endpoint tcp://localhost:4001 --cluster.agency-endpoint tcp://localhost:4002