前言

昨天 Veeam 纳管一台 Ubuntu 20.04 时遇到了一些问题,先是提示主机需要联外网下载依赖,配置网络之后,agent 安装又失败了,报错:

1
2025/11/18 17:06:50 Warning Failed to connect to 10.199.41.71 Details: Failed to execute agent management command print. No such file or directory Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon. 

本文记录一下分析过程以及解决步骤。

问题分析

首先查看主机系统版本:

1
2
3
4
5
root@apods01:~# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

VBR 纳管报错,格式化内容之后如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Failed to install 
veeam_6.3.1.1016_amd64.deb,
veeam-libs_6.3.1.1016_amd64.deb
veeamsnap_6.3.1.1016_all.deb packages

Failed to fetch
http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/libdpkg-perl_1.19.7ubuntu3.2_all.deb

Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::103).
- connect (101: Network is unreachable)
Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4002:1::103).
- connect (101: Network is unreachable)
Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4002:1::102).
- connect (101: Network is unreachable)
Could not connect to archive.ubuntu.com:80 (91.189.91.83),
connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.81),
connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.82),
connection timed out

联系网络管理员临时开通外网后,重新执行 Rescan,提示安装成功,但是执行备份的时候报错:

1
2025/11/18 17:06:50 Warning Failed to connect to 10.199.41.71 Details: Failed to execute agent management command print. No such file or directory Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon. 

查看 Rescan 日志:

1
2
3
4
5
6
7
[18.11.2025 17:01:24.248]    <18>   Error (3)    Agent management command has failed, exit code 255, error text: No such file or directory
[18.11.2025 17:01:24.248] <18> Error (3) Failed to connect: /var/tmp/veeam/socket/veeamservice.sock.
[18.11.2025 17:01:24.248] <18> Error (3) Failed to connect to veeamservice daemon.
[18.11.2025 17:01:24.248] <18> Error (3) Failed to process discovery operation for Linux host: 10.199.41.71
[18.11.2025 17:01:24.248] <18> Error (3) Failed to execute agent management command print. No such file or directory
[18.11.2025 17:01:24.248] <18> Error (3) Failed to connect: /var/tmp/veeam/socket/veeamservice.sock.
[18.11.2025 17:01:24.248] <18> Error (3) Failed to connect to veeamservice daemon. (System.Exception)

检查主机上是否存在这个文件:

1
2
root@apods01:~# cd /var/tmp/veeam/socket/
-bash: cd: /var/tmp/veeam/socket/: No such file or directory

当前主机不存在以上文件,但是正常纳管的主机是存在的:

1
2
3
4
5
6
7
8
9
10
11
12
[root@SQCSLEAP01N ~]# cd /var/tmp/veeam/socket
[root@SQCSLEAP01N socket]# ls
events.sock veeamservice.sock
````
看来就是因为这个了,怀疑是第一次安装的时候有问题,尝试卸载 agent 后重新安装:
>https://helpcenter.veeam.com/docs/agentforlinux/userguide/uninstallation_process.html?ver=60

首先卸载安装的 veeam 相关依赖:
```bash
apt-get remove veeam veeam-libs veeamsnap
apt-get remove veeam veeam-libs blksnap
apt-get remove veeam-nosnap veeam-libs

删除 veeam 安装目录:

1
2
3
4
5
6
root@apods01:/opt# rm -rf veeam/
root@apods01:/opt#
root@apods01:/opt# ll
total 8
drwxr-xr-x 2 root root 4096 Nov 18 09:23 ./
drwxr-xr-x 21 root root 4096 May 31 2024 ../

杀掉所有 veeam 相关进程:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
root@apods01:/opt# ps -ef|grep veeam
root 463548 1 0 09:22 ? 00:00:00 /opt/veeam/transport/veeamtransport --run-service
root 463567 463548 0 09:22 ? 00:00:00 /opt/veeam/transport/veeamtransport --run-environmentsvc 7:6
root 463580 463548 0 09:22 ? 00:00:00 /opt/veeam/transport/veeamimmureposvc --subprocess --log /var/log/VeeamBackup --maxLogSize 15728640 --stdio 10:7
root 463651 1 0 09:22 ? 00:00:00 /opt/veeam/deployment/veeamdeploymentsvc --run-service
root 463653 463651 0 09:22 ? 00:00:00 /opt/veeam/deployment/veeamdeploymentsvc --service-process 9:8
root 463655 463653 0 09:22 ? 00:00:00 /opt/veeam/deployment/veeamdeploymentsvc --vcp-subprocess 18:17

root@apods01:/opt# kill -9 463651
root@apods01:/opt# kill -9 463548
root@apods01:/opt# kill -9 463567
root@apods01:/opt# kill -9 463580

root@apods01:/opt# ps -ef|grep veeam
root 465271 392310 0 09:24 pts/0 00:00:00 grep --color=auto veeam

在 VBR 重新执行 rescan,成功安装 agent,可以正常备份。

写在最后

Veeam 纳管 Ubuntu 系统需要提前开通外网下载 deb 依赖包,否则会纳管失败。