连接到SVN时未知的主机名localhost

连接到SVN时未知的主机名localhost

本文介绍了连接到SVN时未知的主机名localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台已安装SVN 1.6的RedHat 6企业服务器.这台机器不在网络上,也从未在网络上.最终,它将被添加到网络中,但现在不添加.

I have a RedHat 6 enterprise server that I have installed SVN 1.6 on. This machine is not on a network and has never been on a network. Eventually, it will be added to a network but not right now.

我正在运行svnserve以提供对存储库的访问.

I am running svnserve to provide access to the repository.

svnserve的启动方式为

svnserve is started as,

svnserve -d

运行命令svn co svn://localhost/<project name>时,出现错误消息"svn:E000111"无法连接到主机"localhost":连接被拒绝.

When I run the command, svn co svn://localhost/<project name> I get the error message, "svn: E000111" Can't connect to host 'localhost': connection refused.

netstat确认svn正在监听0.0.0.0:3690.

netstat confirms that svn is listening on 0.0.0.0:3690.

我已经读过,使用svnserve更加明确是值得的,所以我按如下方式启动它,

I have read it pays to be more explicit with svnserve so I started it as follows,

svnserve -d --listen-port 3690 --listen-host 0.0.0.0 (also tried 127.0.0.1)

尝试结帐时,我收到相同的拒绝连接错误消息.

I get the same connection refused error message when trying to checkout.

接下来,我尝试直接使用IP地址而不是主机名签出

Next I tried checking out directly with the ip address rather than a hostname,

svn co svn://127.0.0.1/<project>

我收到的错误消息是荒谬的,"svn:E670009:未知的主机名'127.0.0.1'".

The error message I get back is nonsensical, "svn: E670009: unknown hostname '127.0.0.1'".

在这一点上,我很沮丧.我似乎无法使用"svn://"协议执行结帐.我已经禁用了ipv4和ipv6防火墙.

At this point I am stumped. I can't seem to perform a checkout using the "svn://" protocol. I have already disabled the ipv4 and ipv6 firewalls.

有什么想法吗?

推荐答案

出现网络错误时,可以使用telnet命令查看是否可以连接到该端口.您应该看到这样的响应:

When you have a network error, you can use the telnet command to see if you can connect to that port. You should see a response like this:

$ pint localhost   # Does this give you anything?
$ telnet localhost 3690
Connected to localhost.
Escape character is '^]'.
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops...

可能是您的网络已设置为阻止端口3690.请检查软件防火墙以及SEL的设置方式.

It could be that your network was setup to block port 3690. Check your software firewall and how SEL is setup.

这篇关于连接到SVN时未知的主机名localhost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 15:58