`Request #1619018557157: Request to Node 0 failed ...
# community-help
m
Request #1619018557157: Request to Node 0 failed due to "ECONNRESET socket hang up"
Request #1619018557157: Sleeping for 0.1s and then retrying request...
Request #1619018557157: Request to Node 0 failed due to "ECONNRESET socket hang up"
Request #1619018557157: Sleeping for 0.1s and then retrying request...
{ Error: socket hang up
at createHangUpError (_http_client.js:332:15)
at Socket.socketOnEnd (_http_client.js:435:23)
at Socket.emit (events.js:203:15)
at Socket.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
code: 'ECONNRESET',
I got this error in Typesense cloud, any workarounds?? Thanks!
j
Looking into this
@Masahiro Aoki Could you give me the cluster ID?
Also, may I know what API endpoint you called when you saw this timeout?
m
Here is my cluster ID
gxu1iajypedl2z0tp
in JS SDK, • client.collections().create(usersCollection); • client.collections(‘users’).documents().create(userData)
I got this kind of error once. My implementation might be wrong😂
j
Hmm, I don't see any errors in the logs on that cluster. Could it be a client-side connectivity issue, especially if you only saw it once?
🤔 1
m
Copy code
myCollection = {
        'name': 'books',
        'fields': [
          {'name': 'id', 'type': 'string'},
          {'name': 'title', 'type': 'string' },
          {'name': 'publication_year', 'type': 'int32' },
        ],
        'default_sorting_field': 'publication_year'
      };
      
      try{
        await client.collections().create(myCollection);
      }catch(e){
          console.log(e);  
            }
Copy code
Request #1619058629397: Request to Node 0 failed due to "ENOTFOUND getaddrinfo ENOTFOUND <http://tsmguza3k7b4vqh9p-1.a1.typesense.net|tsmguza3k7b4vqh9p-1.a1.typesense.net> <http://tsmguza3k7b4vqh9p-1.a1.typesense.net:443|tsmguza3k7b4vqh9p-1.a1.typesense.net:443>"
Request #1619058629397: Sleeping for 0.1s and then retrying request...
Request #1619058629397: Request to Node 0 failed due to "ENOTFOUND getaddrinfo ENOTFOUND <http://tsmguza3k7b4vqh9p-1.a1.typesense.net|tsmguza3k7b4vqh9p-1.a1.typesense.net> <http://tsmguza3k7b4vqh9p-1.a1.typesense.net:443|tsmguza3k7b4vqh9p-1.a1.typesense.net:443>"
Request #1619058629397: Sleeping for 0.1s and then retrying request...
{ Error: getaddrinfo ENOTFOUND <http://tsmguza3k7b4vqh9p-1.a1.typesense.net|tsmguza3k7b4vqh9p-1.a1.typesense.net> <http://tsmguza3k7b4vqh9p-1.a1.typesense.net:443|tsmguza3k7b4vqh9p-1.a1.typesense.net:443>
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '<http://tsmguza3k7b4vqh9p-1.a1.typesense.net|tsmguza3k7b4vqh9p-1.a1.typesense.net>',
  host: '<http://tsmguza3k7b4vqh9p-1.a1.typesense.net|tsmguza3k7b4vqh9p-1.a1.typesense.net>',
  port: '443',
  config:
   { url:
      '<http://tsmguza3k7b4vqh9p-1.a1.typesense.net:443/collections>',
     method: 'post',
     data:
      '{"name":"books","fields":[{"name":"id","type":"string"},{"name":"title","type":"string"},{"name":"publication_year","type":"int32"}],"default_sorting_field":"publication_year"}',
     headers:
      { Accept: 'application/json, text/plain, */*',
I finally figure out. client initialization was wrong. not http, https
j
Ah ok! 😅
Btw, in the above stack trace, cluster id
tsmguza3k7b4vqh9p
was terminated, so it's not an active cluster
m
Yes, thanks 😁