首页 > 系统相关 >nginx 解决 No connection could be made because the target machine actively refused it

nginx 解决 No connection could be made because the target machine actively refused it

时间:2024-05-21 17:09:53浏览次数:13  
标签:made netsh could connection prefix actively because ipv6 target

已经搭建好的环境突然全部nginx502,localhost拒绝访问

报错信息:

connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client:

 

打开cmd,在cmd中 ping 127.0.0.1 会出现下图情况。

 

 

ping 解析出来的是 IPV6 的::1,原因是windows有个优先解析列表,当ipv6的优先级⾼于ipv4时,就会出现这种情况。

执行命令:netsh interface ipv6 show prefixpolicies

 

解决办法:修改优先解析表让 ipv4 优先级高于ipv6的记录。方法如下:

 

依次逐⾏复制下⾯命令执⾏,调整顺序

netsh int ipv6 set prefix ::/96 50 0

netsh int ipv6 set prefix ::ffff:0:0/96 40 1

netsh int ipv6 set prefix 2001::/32 30 3

netsh int ipv6 set prefix ::1/128 10 4

netsh int ipv6 set prefix ::/0 5 5

调整后执⾏ netsh interface ipv6 show prefixpolicies 检查⼀下 重启电脑 ⽤得好好的,

 

原文出处:【无标题】nginx 502 解决 No connection could be made because the target machine actively refused it_nginx no connection could be made because the targ-CSDN博客

标签:made,netsh,could,connection,prefix,actively,because,ipv6,target
From: https://www.cnblogs.com/helloStone/p/18204523

相关文章

  • Skipping invalid relocation target,
      [55.732900]module:x86/modules:Skippinginvalidrelocationtarget,existingvalueisnonzerofortype1,loc0000000095d22a08,valffffffffc07aa525root@ubuntux86:#uname-aLinuxubuntux865.13.0-39-generic#44~20.04.1-UbuntuSMPThuMar2416:......
  • Invalid URI at UnityEngineInternal.WebRequestUtils.MakeInitialUrl (System.Stri
    问题背景:有一个项目用到3d模型,原来访问地址用的是域名,访问老是报跨域问题,于是换成了内网地址这么一换问题来了,控制台直接报错 FormatException:InvalidURIatUnityEngineInternal.WebRequestUtils.MakeInitialUrl(System.StringtargetUrl,System.StringlocalUrl)[0......
  • mysql Code: 1093. You can't specify target table for update in FROM clause
    执行如下sql会报错,大概是delete的where条件里面不能包含自身的表deletefromt_plan_newwhereplan2codeisnotnullandplan2versionisnotnulland(plan2code,plan2version)notin(selectplan2code,max(plan2version)fromt_plan_newgroupbyplan2code) 所以用临......
  • 排查Java反射调用的InvocationTargetExcetion问题
    在Java中通过反射调用方法时,常见的一个异常是:java.lang.reflect.InvocationTargetException,将异常信息打印到日志文件中时通常会有如下一句信息:java.lang.reflect.InvocationTargetException:null,由于在异常信息中存在"null",一开始就会非常敏感,会误以为是空指针异常。其实不然,从......
  • WPF Behavior Interaction Triggers EventTrigger EventName CallMethodAction Target
    //xaml<Windowx:Class="WpfApp92.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mic......
  • CMakeListx.txt --- include_directories和target_include_directories命令
    1. include_directories语法include_directories([AFTER|BEFORE][SYSTEM]dir1[dir2...])作用将指定目录添加到编译器的头文件搜索路径之下,指定的目录被解释成当前源码路径的相对路径。参数默认情况下,include_directories命令会将目录添加到列表最后,可以通过命令设置......
  • Ubuntu/Linux系统中的multi-user.target
    相关:https://www.cnblogs.com/devilmaycry812839668/p/17999041multi-user.target是Linux系统中systemd的一个目标。它表示系统已完成引导过程,并准备好供多个用户登录和使用系统。该目标通常包括在多用户环境中进行正常系统操作所需的服务和资源。RunLvlTargetU......
  • Django Error: [WinError 10013] An attempt was made to access a socket in a way f
      D:\06softw-dev-202306\manage.pyrunserverWatchingforfilechangeswithStatReloaderPerformingsystemchecks...Systemcheckidentifiednoissues(0silenced).May03,2024-10:02:12Djangoversion3.2.18,usingsettings'MPDB.settings......
  • WPF pass event method to viewmodel via Interaction:CallMethodAction,TargetObject
    <Windowx:Class="WpfApp71.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • Android在创建Actively的同时创建.xml文件
    如图右键想要创建新activity的包,选择new——》activity——》emptyactivity 输入新activity的信息——》finish 创建成功 ......