I'm running a single ArangoDB (no cluster atm) in a Kubernetes cluster and everything works fine, but sometimes I'm having trouble connecting to my ArangoDB. I've a very simple application that looks like:
const arango = require('arangojs')
async function test () {
const db = new arango.Database({
url: 'http://<some-ip-addr>:8529',
databaseName: 'somedb',
auth: {
username: 'root',
password: 'mypassword'
}
})
const col = db.collection('test')
console.log('Exists:', await col.exists())
}
test()
When I start the application, I'm often getting the following error message:
(node:29612) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT <some-ip-addr>:8529
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:29612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29612) [DEP0018] DeprecationWarning: Unhandled promise rejectio
ns are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:29612) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT <some-ip-addr>:8529
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:29612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
When I use try/catch around "await col.exists()" I'm getting the following error:
When I start the application 5 times, I'm getting this error on 3 or 4 starts. On 1 or 2 starts it works. But I'm connected to the web-interface using Firefox without any problems. I'm running a single instance of ArangoDB 3.7.3, using arangojs 7.1.1 (previously tried with arangojs 7.2.0) using Node.js 14.14.0.
I'm running a single ArangoDB (no cluster atm) in a Kubernetes cluster and everything works fine, but sometimes I'm having trouble connecting to my ArangoDB. I've a very simple application that looks like:
When I start the application, I'm often getting the following error message:
When I use try/catch around "await col.exists()" I'm getting the following error:
When I start the application 5 times, I'm getting this error on 3 or 4 starts. On 1 or 2 starts it works. But I'm connected to the web-interface using Firefox without any problems. I'm running a single instance of ArangoDB 3.7.3, using arangojs 7.1.1 (previously tried with arangojs 7.2.0) using Node.js 14.14.0.
Any suggestions?