V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
frank1256
V2EX  ›  程序员

spring rest template 在 kubernetes time out

  •  
  •   frank1256 · Jul 22, 2022 · 1378 views
    This topic created in 1385 days ago, the information mentioned may be changed or developed.

    遇到个怪事,我进到在 K8s 里的 pod ,已经 curl 可以访问了。但是代码里直接 timeout 。什么鬼。

    有大佬遇到过类似的吗,毫无头绪

    3 replies    2022-07-22 16:42:45 +08:00
    chendy
        1
    chendy  
       Jul 22, 2022
    开 debug 日志,看看发了啥请求,卡在哪一步
    frank1256
        2
    frank1256  
    OP
       Jul 22, 2022
    @chendy 请求已经抓出来了"I/O error on GET request for \"http://178.104.163.72:31300/users/list\": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out",
    我直接在容器里 curl http://178.104.163.72:31300/users/list 是能访问的
    issakchill
        3
    issakchill  
       Jul 22, 2022
    换个 http client 先试试效果?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3749 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:38 · PVG 18:38 · LAX 03:38 · JFK 06:38
    ♥ Do have faith in what you're doing.