We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Хочу словить ошибку подключения к тарантулу, но не получается. Есть такой код:
const TarantoolConnection = require('tarantool-driver'); const host = 'localhost'; const port = '3310'; const username = 'ykuandykov'; const password = '987654321'; const reserveHosts = [ 'ykuandykov:987654321@localhost:3313', 'ykuandykov:987654321@localhost:3314', ]; const times = 1; const timeOut = 100; const connection = new TarantoolConnection({ host, port, username, password, reserveHosts: reserveHosts, beforeReserve: times, lazyConnect: true, retryStrategy: () => timeOut, }); connection.on('connect', config => { console.log('connecting config', config); }); connection.on('reconnecting', timeout => { console.log('reconnecting timeout', timeout); }); connection.ping() .then(result => { console.log('ping resolve result', result); }, error => { console.log('ping reject error', error); }) .catch(error => { console.log('ping catch error', error); });
И он выдает следующее:
[tarantool-driver] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:3310 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) reconnecting timeout 100 [tarantool-driver] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:3310 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) reconnecting timeout 100 [tarantool-driver] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:3313 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) reconnecting timeout 100 [tarantool-driver] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:3313 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14) reconnecting timeout 100 connecting config { host: 'localhost', port: '3314' } ping resolve result true
Ошибка пинга есть, но код не зашел ни в reject, ни в catch.
The text was updated successfully, but these errors were encountered:
first of all you should get permissions for ports
Sorry, something went wrong.
No branches or pull requests
Хочу словить ошибку подключения к тарантулу, но не получается.
Есть такой код:
И он выдает следующее:
Ошибка пинга есть, но код не зашел ни в reject, ни в catch.
The text was updated successfully, but these errors were encountered: