Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window client访问 linux podman服务端linux服务端应该开放哪些端口?可否自行设定端口范围? #22722

Open
panfuy opened this issue May 16, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@panfuy
Copy link

panfuy commented May 16, 2024

Issue Description

测试服务器环境: centos8 + podman
本地开发环境: windows11系统

在centos8 服务器安装podman命令如下:

sudo yum install -y podman podman-plugins cockpit cockpit-podman

systemctl enable --now podman

systemctl enable --now cockpit.socket

可以正常访问【https://ip:9090】来查看容器信息。

在windows11创建podman的连接(已经安装podman-xxx.exe),命令如下:

podman system connection add r2 --identity c:\Users\xxx\.ssh\id_rsa ssh://[email protected]/run/podman/podman.sock

podman system connection default r2

出现如下异常:

D:\> podman -c r1 info
OS: windows/amd64
provider: wsl
version: 5.0.3

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman. failed to create sshClient: connection to bastion host (ssh://root@localhost:51057/run/podman/podman.sock) failed: dial tcp [::1]:51057: connectex: No connection could be made because the target machine actively refused it.

发现centos没有关闭防火墙导致的问题,因为端口号一直在变化。

从日志中发现端口号一直在变化,我怎么配置这个端口区间呢?我不能关闭防火墙,我需要开通端口策略。
image

Steps to reproduce the issue

如文体描述

Describe the results you received

从日志中发现端口号一直在变化,我怎么配置这个端口区间呢?我不能关闭防火墙,我需要开通端口策略。

Describe the results you expected

从日志中发现端口号一直在变化,我怎么配置这个端口区间呢?我不能关闭防火墙,我需要开通端口策略。

podman info output

Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman. failed to create sshClient: connection to bastion host (ssh://root@localhost:51057/run/podman/podman.sock) failed: dial tcp [::1]:51057: connectex: No connection could be made because the target machine actively refused it.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@panfuy panfuy added the kind/bug Categorizes issue or PR as related to a bug. label May 16, 2024
@panfuy
Copy link
Author

panfuy commented May 16, 2024

PS D:> podman -c r2 version
Client: Podman Engine
Version: 5.0.3
API Version: 5.0.3
Go Version: go1.22.3
Git Commit: d08315d
Built: Sat May 11 02:02:40 2024
OS/Arch: windows/amd64

Server: Podman Engine
Version: 4.9.4-dev
API Version: 4.9.4-dev
Go Version: go1.21.7 (Red Hat 1.21.7-1.module_el8+960+4060efbe)
Built: Thu Feb 22 01:03:29 2024
OS/Arch: linux/amd64

@Luap99
Copy link
Member

Luap99 commented May 16, 2024

Please file issues in english.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants