【问题标题】:Perforce client (p4) error when explicit port option not provided未提供显式端口选项时出现 Perforce 客户端 (p4) 错误
【发布时间】:2021-09-30 00:19:37
【问题描述】:

尝试使用 perforce cli 客户端 (p4) 从存储库中检索文件。我有一个配置了适当值的 P4CONFIG=~/.p4config 文件。

当我尝试使用 p4 命令时,我收到以下错误:

p4 login
Perforce client error:
    Connect to server failed; check $P4PORT.
    TCP connect to "ssl:fqdn.com:port" failed.
    Servname not supported for ai_socktype

当我指定 p4 端口(P4PORT)时,该命令起作用:

p4 -p ${P4PORT} login

请注意,perforce 提供了额外的选项来提供额外的调试信息:

p4 -p ${P4PORT} -vnet=5 -vrpc=5 login

【问题讨论】:

  • 听起来您的 P4CONFIG 文件包含不正确的 P4PORT 值。我建议在您的问题中包含p4 set P4PORTp4 -p ${P4PORT} info 的(未更改的)输出。

标签: linux ubuntu perforce


【解决方案1】:

检查 P4PORT 环境变量中的值。

echo ${P4PORT}
echo ${P4PORT} | od -c
grep P4PORT ~/.bashrc

同时检查 perforce 在你的 perforce 配置中检查的值,

grep P4PORT ${P4CONFIG}
grep P4PORT ${P4CONFIG} | od -c
p4 set P4PORT

问题是配置文件中的 P4PORT 值有引号。 shell 会去掉引号,但(显然)perforce 不会在配置文件中去掉引号。

【讨论】:

    猜你喜欢
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 2020-09-07
    • 1970-01-01
    • 2014-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多