【发布时间】:2011-07-17 13:40:31
【问题描述】:
自从我重新启动安装了 svn 的 Ubuntu 服务器后,我无法从笔记本电脑访问它。使用 svnX,当我尝试浏览我的曲目时,我得到了错误:
svn: Can't connect to host 'xxx.xxx': Address already in use
当我尝试更新任何工作副本时,我得到一个不同的错误:
svn: Can't connect to host 'xxx.xxx': Operation timed out
整个历史是这样的:
- 当我第一次发现 svn 不工作时,我怀疑我的 iptables 启动脚本不接受 svn 连接...这是真的,所以我更改了我的 iptables 规则以便接受 svn 连接
- 但它没有改变任何东西:我得到了和以前一样的错误!
这是我的 iptables 现在我已经重新启动并添加了 SVN,这有什么错误吗?
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:svn
ACCEPT icmp -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere state NEW,RELATED,ESTABLISHED
【问题讨论】:
-
你能提供完整的SVN命令吗? (您可以用“example.com”替换您的 IP/域。)另外,为了确定,您可以在刷新 IP 表并将所有策略设置为“接受”时访问您的 SVN 存储库吗?
-
在我的服务器上出现“iptables -P INPUT ACCEPT”后,svn 访问正常!
-
但是一旦我将它设置回“iptables -P INPUT DROP”,svn 访问就不起作用了。我的测试是从笔记本电脑的终端启动以下命令:“svn checkout svn://example.com/repos/”,我得到“svn:无法连接到主机'example.com':操作超时”消息。