【问题标题】:uid : unable to do port forwarding: socat not found when remote debbuging using intellij ideauid:无法进行端口转发:使用intellij idea远程调试时找不到socat
【发布时间】:2020-03-14 16:41:52
【问题描述】:

我正在使用此命令远程调试我的 kubernetes(v1.15.2) pod:

kubectl port-forward soa-room-service-65986bddb4-6cz76 5011:5011

但是当我使用我的 Intellij Idea 连接调试端口时,它显示:

Forwarding from 127.0.0.1:5011 -> 5011
Forwarding from [::1]:5011 -> 5011
Handling connection for 5011
E0314 15:50:53.351183   41712 portforward.go:400] an error occurred forwarding 5011 -> 5011: error forwarding port 5011 to pod 2d40e44288507f65a256ed7c591658cd1f5caf7f268feb34afda01be480de6c8, uid : unable to do port forwarding: socat not found.
Handling connection for 5011
E0314 15:51:19.031476   41712 portforward.go:400] an error occurred forwarding 5011 -> 5011: error forwarding port 5011 to pod 2d40e44288507f65a256ed7c591658cd1f5caf7f268feb34afda01be480de6c8, uid : unable to do port forwarding: socat not found.

我从互联网上搜索并尝试在本地 Mac OS Catalina 中安装 socat:

brew install socat
$ socat -h
socat by Gerhard Rieger and contributors - see www.dest-unreach.org
Usage:
socat [options] <bi-address> <bi-address>
   options:
      -V     print version and feature information to stdout, and exit

并在远程服务器的 pod 中安装 socat:

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone \
    && apk add --no-cache curl socat

当我调试时,错误仍然存​​在,我应该如何解决这个问题并通过kubernetes pod远程调试启用?我错过了什么吗?

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    说没有安装socat。在kubernetes节点的主机上安装socat应该可以解决问题。

    【讨论】:

      猜你喜欢
      • 2020-03-29
      • 2012-07-23
      • 1970-01-01
      • 2016-02-04
      • 2021-12-14
      • 1970-01-01
      • 1970-01-01
      • 2018-12-18
      • 2012-05-05
      相关资源
      最近更新 更多