Perforce 客户端和服务器不再连接,127.0.0.1:1666 拒绝服务器上的所有连接,甚至是本地连接

Perforce 客户端和服务器不再连接,127.0.0.1:1666 拒绝服务器上的所有连接,甚至是本地连接

我有一台运行 Ubuntu Server 18.04 的服务器,它是一台万能的本地服务器 - 托管一个 Samba 共享、一个媒体服务器和一个 Perforce 服务器。我通过本地网络 IP(ssl:192.xxx:1666)连接到该仓库。一切都运行良好,直到……

...我还尝试在其中添加 wiki.js 安装。有很多软件包和配置混乱。Apache 被删除,wiki.js / mongodb / mariadb / postgresql 都被多次使用和删除,nginx 被多次安装和删除。

原因如下——(我当时所做的事情的背景大概导致此问题):

我通过 PiHole 对整个网络进行 DNS 过滤,并利用它为该 Ubuntu 服务器上的各种进程创建本地 DNS 名称和 CNAME 条目。我的想法是,我可以将网络中其他地方的客户端计算机指向“perforce.RackServer.net”而不是“192.168.0.x:1666”,并通过 nginx 进行一些反向代理获得相同的结果。我们试图使寻址变得人性化,而不是每个人都必须向我询问所有事情的 IP 和端口号。

我做到了不是成功设置了 nginx。现在它已卸载。没关系 - 我稍后会回来处理。问题如下。

在所有这些过程中,网络配置(机器有 eth0 和 eth1)的某些部分出现了问题,现在当我尝试 #sudo systemctl start helix-p4dctl.service

我明白了

Job for helix-p4dctl.service failed because the control process exited with error code.
See "systemctl status helix-p4dctl.service" and "journalctl -xe" for details.

通过 systemctl 状态检查可以得到:

Jun 20 14:10:07 RackServer p4dctl[4186]: error: Connect to server failed; check $P4PORT.
connect: 127.0.0.1:1666: Connection refused
Jun 20 14:10:07 RackServer p4dctl[4188]: error: Connect to server failed; check $P4PORT.
connect: 127.0.0.1:1666: Connection refused
Jun 20 14:10:07 RackServer p4dctl[4189]: error: Connect to server failed; check $P4PORT.
connect: 127.0.0.1:1666: Connection refused
Jun 20 14:10:07 RackServer p4dctl[4190]: error: Connect to server failed; check $P4PORT.
connect: 127.0.0.1:1666: Connection refused
Jun 20 14:10:08 RackServer p4dctl[4181]: error: 'PerforceServer' p4d: '/opt/perforce/sbin/p4d' exited with status 255.
Jun 20 14:10:08 RackServer p4dctl[4181]: Started 0 services.
Jun 20 14:10:08 RackServer p4dctl[4181]: error: Not all services started successfully.
Jun 20 14:10:08 RackServer systemd[1]: helix-p4dctl.service: Control process exited, code=exited status=1
Jun 20 14:10:08 RackServer systemd[1]: helix-p4dctl.service: Failed with result 'exit-code'.
Jun 20 14:10:08 RackServer systemd[1]: Failed to start LSB: Starts all Perforce services.

这与我现在尝试远程连接 p4v 可视化客户端时遇到的错误类似:
Connect to server failed; check $P4PORT.
connect: 192.168.0.117:1666: Connection refused

检查服务器上的 P4PORT 环境变量得到以下结果:

...没什么。它应该是 ssl:1666 或只是 1666。以前是这样的,直到现在。所以如果我把它设置为应该的样子

export $P4PORT=ssl:1666

然后尝试启动服务,我收到与第一次相同的错误。

让我们检查一下实际的连接...

admin@RackServer:~$ ping 192.168.0.117
PING 192.168.0.117 (192.168.0.117) 56(84) bytes of data.
64 bytes from 192.168.0.117: icmp_seq=1 ttl=64 time=0.052 ms
64 bytes from 192.168.0.117: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 192.168.0.117: icmp_seq=3 ttl=64 time=0.017 ms

相同: admin@RackServer:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.045 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.016 ms

和: admin@RackServer:~$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.054 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.014 ms

但是,nmap 没有显示 1666 打开...... 21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp
3306/tcp open mysql
3389/tcp open ms-wbt-server

这是 ifconfig,仅供参考。
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.117 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::da16:9fa8:aff2:2aef prefixlen 64 scopeid 0x20<link>
ether 00:04:23:d3:d0:92 txqueuelen 1000 (Ethernet)
RX packets 33063 bytes 2652752 (2.6 MB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 1872 bytes 269690 (269.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 18 memory 0xb8820000-b8840000

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.116 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::659f:d321:8607:cc5f prefixlen 64 scopeid 0x20<link>
ether 00:04:23:d3:d0:93 txqueuelen 1000 (Ethernet)
RX packets 31082 bytes 2047269 (2.0 MB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 531 bytes 41557 (41.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 memory 0xb8800000-b8820000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 5185 bytes 278583 (278.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5185 bytes 278583 (278.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

我其实并不是一个专业的网络人员,而且我还在学习 *nix,所以我对此了解甚少,而且我让 Perforce 仓库重新上线。一切都正常,只是机器突然拒绝在 1666 上进行连接(远程或本地),无论出于什么原因。所有其他正常工作的服务要么仍在工作,要么恢复工作。只有这一个。

答案1

谜团终于解开了。

此 Perforce 安装是 2021 年发布的版本,p4d/2021.2/LINUX26X86_64/2264565(我在查看日志时发现了这一点)。在某个时候,已安装的 helix / p4 软件包陷入了 apt-get 升级(它们不应该如此,它们是手动下载和安装 .deb 软件包),这会将最新的 2022 版本安装到机器上。

事实证明,最新的 Perforce Server 版本无法在那台旧机器上运行,或者可能是无法在 Ubuntu 18.04 上运行。无论哪种方式,安装 2021 年初的版本都是可行的。而且,你可以——实际上——将所有仓库文件从仓库备份放入新的空仓库中,它就会工作。

这是我在命令行上度过的最令人困惑的五天。

相关内容