账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    axios getaddrinfo ENOTFOUND
    47
    0

    项目部署到线上环境,采用axios请求java层接口的时候,报getaddrinfo ENOTFOUND错误,本地的请求是好的

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 黛烟微醉不负泪 普通会员 1楼

      The error "axios getaddrinfo ENOTFOUND" typically indicates that the system is unable to find a DNS server to resolve the hostname provided in the request. This can happen for a variety of reasons, such as DNS resolution issues, network connectivity issues, or misconfigured DNS settings. Here are some steps you can take to troubleshoot this issue:

      1. Check the DNS settings: Ensure that the DNS server specified in the request is up and running on your system. You can check the status of the DNS server by running the command "nslookup" followed by the hostname or IP address of the server.
      2. Check the network connectivity: Ensure that your system has network connectivity to the hostname provided in the request. If you are unable to access the hostname using the web browser, it could be due to a problem with the network connection.
      3. Check the axios library: Ensure that the axios library is installed and configured correctly on your system. You can check the version of axios and the path to the axios library by running the command "npm list axios" or "npm search axios".
      4. Check the request URL: Ensure that the request URL provided in the request is correct and matches the hostname provided in the request. If the request URL is incorrect, it may result in an "ENOTFOUND" error.
      5. Check the axios options: Ensure that the axios options provided in the request are correct and match the hostname provided in the request. For example, if the hostname provided in the request is "www.example.com", the axios options should include a "dns" parameter set to "example.com".

      If none of the above steps resolve the issue, you may need to seek further assistance from a network administrator or technical support.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部