英文:
Perforce stopped connecting
问题
我为几个用户运行了一年多的Perforce开发服务器,一直没有问题,然后他们上周报告说它拒绝连接他们的客户端。我登录到服务器并尝试了 "p4 info",并得到以下错误信息:
Perforce客户端错误:
连接服务器失败;请检查$P4PORT。
连接:127.0.0.1:1666:连接被拒绝
当我尝试 "p4 -p servername:port" 时,我得到了类似的返回,其中包含服务器的IP地址。
英文:
I ran up a perforce dev servers for couple users for a year and bit with no problems, then they reported it refuses connection to their clients last week. I logged into the server and tried "p4 info", and get
Perforce client error:
Connect to server failed; check $P4PORT.
connect: 127.0.0.1:1666: Connection refused
and when tried "p4 -p servername:port" i get similar return with servers IP.
答案1
得分: 1
很难确定,如果没有更多信息的话,服务器是运行在Windows还是Linux上?您使用了什么方法来安装它?
有可能服务器设置了安全的SSL连接,因此拒绝没有SSL的连接请求。
尝试使用 p4 -p ssl:服务器名称:端口
,看看在开头添加SSL是否有所不同。
还值得检查服务器是否正在运行。可能安装出了问题,或者虚拟机本身出了问题,服务器没有运行。在Linux上,通常可以使用systemctl来检查(根据安装方式,服务的名称可能会有所不同),而在Windows上,可以使用进程监视器(Process Monitor)来查找Perforce服务。
英文:
It's hard to know for sure without more information, is the server running on Windows or Linux? What method did you use to install it?
Its possible that the server was setup with a secure ssl connection so it is refusing the connection request without it.
Try p4 -p ssl:servername:port
and see if adding the ssl at the beginning makes a difference.
It's also worth checking if the server is running. It's possible that something went wrong with the install or the VM itself and the server isn't running. On Linux you can usually check that with systemctl (the name of the service might vary based on how you installed it) and on Windows you can check the Process Monitor and look for the Perforce service.
答案2
得分: 1
基本上是在一位更有经验的Linux同事的帮助下解决了这个问题。原来他使用了p4dctl来提供更详细的错误信息,结果发现是与数据库文件state.xu的权限问题有关。我猜升级改变了文件的权限。他使用了以下命令来加载正确的环境和用户等信息。
p4dctl exec -t p4d perforce -- -xu
Perforce server error:
chmod: state.xu: Operation not permitted
p4dctl error:
'perforce' p4d: '/opt/perforce/sbin/p4d -xu' exited with status 255.
在定位到文件并清理多余内容以及更改权限后,他再次运行了该命令,升级在服务器启动时应用了。然后他重新启动了服务,应用程序又开始运行了。
systemctl restart perforce-p4dctl.service
英文:
Basically solved this with help of a coworker who is more experienced in Linux. Turns out he used p4dctl to provide more verbose in the error, where it turned out to be a permission issue with database file, state.xu. I guess the upgrade changed the permission of the file. He used this command to load the correct environment and user etc..
p4dctl exec -t p4d perforce -- -xu
Perforce server error:
chmod: state.xu: Operation not permitted
p4dctl error:
'perforce' p4d: '/opt/perforce/sbin/p4d -xu' exited with status 255.
After locating the file(s), cleaning up the extra but also changing permissions, he ran the command again and the upgrades were applied at server startup. then he restarted the service and application started running again.
systemctl restart perforce-p4dctl.service
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论