Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"

发布时间 2023-04-23 13:22:11作者: 人间春风意

背景

  某日,一正常项目迁移到新的服务器

  新的服务器,需要使用代理来访问之前能直接访问的接口,加完代理之后,发现无法获取数据了

报错

  org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://xxxxxxxxxx/xxxx": Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"; nested exception is java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"

解决

  代理写法没有问题,是代理端到目的端出的问题

  所以就等相关人员弄好设定就可以了