Skip to content

Resolve dns problem with multiply fastify servers started in localhost #1082

Open

Description

@anto-mcfly

Hi guys,

I have an always replicable issue when I start two different fastify process in localhost, the first application server started with fastify calls the second one and him request an api served under vpn, if im not connect to the vpn in that moment, I have an ESERVFAIL error:

[2025-02-11T22:50:51.319 +0100] WARN: response errored
err: {
"type": "Error",
"message": "queryAaaa ESERVFAIL localhost",
"stack":
Error: queryAaaa ESERVFAIL localhost
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:173:17)
"code": "ESERVFAIL",
"syscall": "queryAaaa",
"hostname": "localhost"
}

this error remains in dns cache without options to clear or its only me cant find the option to clear dns cache in fastify?

Happy to help with PR, but I wanna be sure this case is not covered

ps: this happening in local only

Activity

  1. metcoder95 commented on Feb 17, 2025

    @metcoder95
    Member

    The error you are facing has nothing to do with fastify. Flushing your DNS cache requires you to have it done at your host machine, I'd suggest you look how to do it depending on your OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions