git-cache-http-server icon indicating copy to clipboard operation
git-cache-http-server copied to clipboard

Crash when hostname is not found with DNS.

Open patlefort opened this issue 3 years ago • 5 comments

}
  hostname: 'asmjit'
  syscall: 'getaddrinfo',
  code: 'ENOTFOUND',
  errno: -3008,
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at TLSSocket.emit (node:events:520:28)
    at TLSSocket.socketErrorListener (node:_http_client:442:9)
Emitted 'error' event on ClientRequest instance at:
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
Error: getaddrinfo ENOTFOUND asmjit
      ^
      throw er; // Unhandled 'error' event

I'm not sure if there is supposed to be something before that }, it's all I have in my log.

patlefort avatar Sep 21 '22 09:09 patlefort

What URL (or, alternatively, git config replacement rule) are you using?

P.S. Full disclosure: I haven't been able to maintain this, and it's unlikely I'll be able to fix any issues we end up finding here. But maybe it's a usage/config error, or a bug to report in node.

jonasmalacofilho avatar Sep 21 '22 16:09 jonasmalacofilho

The URL was an invalid one that happened by mistake, however it shouldn't cause it to crash. The URL was https://github.com/../asmjit/asmjit.git, due to some weirdness in some AUR package. It got interpreted as GET /asmjit/asmjit.git/info/refs?service=git-upload-pack.

My .gitconfig has

[url "http://pat-server.patdomain.org:52943/"]
        insteadOf = https://

patlefort avatar Sep 21 '22 20:09 patlefort

And what version or specific commit of git-cache-http-version are you running?

jonasmalacofilho avatar Sep 22 '22 00:09 jonasmalacofilho

The latest commit from this repo.

patlefort avatar Sep 22 '22 00:09 patlefort

Thanks.

jonasmalacofilho avatar Sep 22 '22 01:09 jonasmalacofilho