AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-232197

jtlindsey's questions

Martin Hope
jtlindsey
Asked: 2024-08-11 22:22:18 +0800 CST

本地服务器和远程服务器之间的 SSH 连接问题

  • 8

在生产服务器上,我有一个自动化任务,每分钟通过网络向远程生产服务器发送一次相同的 SSH 命令和数据量。唯一可能改变的是对象中的几个值。这个过程已经在程序中运行多年,没有出现问题。没有任何本地更改,我们开始出现随机的ECONNRESET和Connection lost before handshake错误实例。一开始每天只有几个,后来增加到每小时多个。目标服务器管理员说他们的日志没有提供有用的信息……只是说Received disconnect from <origin_ip> port 21549:11或pam_unix(sshd:session): session closed for user <username>。

由于连接最初是成功的(socket connected),ssh -vvv或者我的 ssh 工具中的等效功能在发送所有数据之前连接中断时无法收集其他数据。有时套接字连接后不到 12 秒就会断开连接。

我运行mtr <destinatioin_ip>检查跟踪,发现在 9 个跳转中,只有最后一跳(目的地)有数据包丢失。通常情况下,丢失率在 12% 到 20% 之间。从不低于 6%。但考虑到它使用的是 ping/ICMP,有时会受到限制,我认为它不能可靠地确认 ssh 连接存在问题。因此,我运行mtr -T -P 22 <destination_ip>检查 SSH/TCP,它经常显示前 8 个跳转的丢失率为 0%,仅在目的地第 9 个跳转处丢失了多达 29% 的数据包。但不太常见的是,它有时在前 8 个跳转中都显示高达 50% 的数据包丢失,并且从未到达第 9 个跳转。令人困惑。

在进行上述测试或让自动化程序自行重试时,最终目标服务器将阻止我的所有 SSH 连接。此时ssh -vvv <destination_ip>将挂起,然后显示连接超时:

ssh -vvv <user@destination_ip>
OpenSSH_7.6p1 Ubuntu-4ubuntu0.7, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "<destination_ip>" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to <destination_ip> [<destination_ip>] port 22.
debug1: connect to address <destination_ip> port 22: Connection timed out
ssh: connect to host <destination_ip> port 22: Connection timed out

为了解决这个问题connection timed out,目标服务器管理员说他重新启动了 ssh 服务器。此时我可以再次连接,但随机断开连接的情况会继续,直到最终再次被完全阻止。

pfSense 是与 Ubiquiti 交换机一起用于源服务器网络的防火墙。源防火墙显示没有被阻止的 SSH 连接,并且与目标服务器同时建立的 SSH 连接从未超过 2-3 个。

以上内容是否足以说明问题至少不是我的服务器,而可能是目标服务器(跳数 9)?如果原因出在本地,我还应该在本地查看其他内容以进行隔离吗?

我完全控制本地生产服务器。问题是,如果没有足够的证据证明问题不是本地问题,我就很难让远程团队上报,让他们做进一步的研究。

networking
  • 1 个回答
  • 161 Views
Martin Hope
jtlindsey
Asked: 2021-04-18 18:32:47 +0800 CST

ESXi esxcli 错误:未知命令或命名空间 vm 进程 kill –t=soft –w=67909

  • 1

我正在运行 ESXi 6.5 嵌入式主机客户端。当我 ssh 进入系统时,我可以运行esxcli vm process list并获得预期的输出:

testserver1
   World ID: 67909
   Process ID: 0
   VMX Cartel ID: 67908
   UUID: someuuid
   Display Name: testserver1
   Config File: /vmfs/volumes/somelocation/testserver1/testserver1.vmx

但是如果我运行esxcli vm process kill –t=soft –w=67909我会得到错误Error: Unknown command or namespace vm process kill –t=soft –w=67909

为了确认我正在运行正确的命令,我运行esxcli vm process kill -help并得到

Error: Invalid option -h

Usage: esxcli vm process kill [cmd options]

Description: 
  kill                  Used to forcibly kill Virtual Machines that are stuck and not responding to normal stop operations.

Cmd options:
  -t|--type=<str>       The type of kill operation to attempt. There are three types of VM kills that can be attempted:   [soft, hard, force]. Users should always
                        attempt 'soft' kills first, which will give the VMX process a chance to shutdown cleanly (like kill or kill -SIGTERM). If that does not work
                        move to 'hard' kills which will shutdown the process immediately (like kill -9 or kill -SIGKILL). 'force' should be used as a last resort
                        attempt to kill the VM. If all three fail then a reboot is required. (required)
  -w|--world-id=<long>  The World ID of the Virtual Machine to kill. This can be obtained from the 'vm process list' command (required)

你能看到我做错了什么可能会阻止这个命令工作吗?我意识到文档中vim-cmd有替代方案,但我试图弄清楚为什么文档中的第一个选项会响应,就像它甚至不是有效的命令一样。

vmware-esxi
  • 1 个回答
  • 672 Views
Martin Hope
jtlindsey
Asked: 2017-10-26 10:58:58 +0800 CST

从 ESXi 嵌入式主机客户端导出 VM 失败 - 网络错误或网络中断

  • 2

我正在尝试通过 ESXi 嵌入式主机客户端将 60 GB 的 VM 从 VMware ESXi 导出到我的计算机。每次我尝试时,它都会下载大约 20 GB 的disk-0.vmdk文件(下载 ~1GB/分钟),然后停止Network Error

  • VMware ESXi v6.5.0(内部版本 4887370)
  • ESXi 嵌入式主机客户端版本 1.23.0(内部版本 6360286)
  • “最近的任务”窗格在导出 Vm 旁边显示“已成功完成”。
  • 我没有附加到此虚拟机的快照
  • 目标位置有 200GB 的可用空间。
  • 主机和 Web 客户端通过以太网(不是 wifi)连接。

我现在已经尝试了3次,它总是失败。知道根本问题是什么吗?有没有另一种方法可以在不关闭主机的情况下导出虚拟机?

vmware-esxi
  • 1 个回答
  • 26905 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve