【问题标题】:SVN setup... Unable to connect to a repository but can ping hostSVN 设置...无法连接到存储库,但可以 ping 主机
【发布时间】:2016-05-02 17:59:23
【问题描述】:

我有一个我正在为一个项目设置的 svn 服务器。我已经安装了 SVN,使用新的 SVN 用户启动并运行它,在 passwrd 文件中创建了用户/密码组合,并使其在 svnserve.conf 中可用。我在我的 SVN 用户文件夹和“svnserve -d -r /home/svn/repositories”中创建了一个存储库文件夹。我在存储库中为我当前的项目创建了一个文件夹...

所以我有

/home/svn/repositories/my_new_project

我在我的服务器上运行 netstat -lntp

Proto Recv-Q Send-Q Local Address     Foreign Address State  
PID/Program name
tcp        0      0 0.0.0.0:3690      0.0.0.0:*       LISTEN 
24405/svnserve
...etc...

现在,跳出服务器,跳到我的客户端机器上,检查服务器是否已启动,我

ping my_network_server_name_here

使用 32 字节数据 ping my_network_server_name_here [1.2.3.4]:

Reply from [1.2.3.4]: bytes=32 time=1ms TTL=62
Reply from [1.2.3.4]: bytes=32 time=1ms TTL=62
Reply from [1.2.3.4]: bytes=32 time=2ms TTL=62
Reply from [1.2.3.4]: bytes=32 time=3ms TTL=62

而且我得到了很好的 ping 速率,所以我知道服务器是可以访问的。 我已经安装了tortoiseSVN。我右键单击要添加到存储库的文件夹,点击导入,然后将其发送到

svn://my_network_server_name_here:3690/my_new_project

我得到的回应是……

Unable to connect to a repository at URL
svn://my_network_server_name_here/my_new_project
Can't connect to host 'my_network_server_name': A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because the connected host has failed to respond.

我的问题是……我在哪里搞砸了?

【问题讨论】:

  • Ping (ICMP-packets) 对 TCP 连接意味着 nothing。无论如何,这都是 SU 主题
  • 我主要使用 ping 来检查服务器是否已启动并且没有以某种主要方式受到防火墙保护。如果您有任何建议,虽然我不知道测试 TCP 连接的良好快速测试?

标签: svn networking tortoisesvn


【解决方案1】:

对于svnserve -d -r /home/svn/repositories repo svn://my_network_server_name_here:3690/my_new_project 的 URL 表示:您在文件夹 my_new_project 中创建了存储库 (svnadmin create)。对吗?

好吧,0.0.0.0:3690 的意思是“svnserve 在所有接口上侦听”,但并不意味着“您可以在所有接口上连接到它”。因为一些中间工具会阻止连接到 svnserve。您可以在 SVN 中使用 轻量级命令(如 svn ls URL

  1. 尝试使用主机名localhost 从 repo 的主机连接到 repo
  2. 如果正常,使用主机的 FQDN 从 repo 的主机连接到 repo
  3. 如果 OK,从外部主机连接到 repo,减少每次迭代的中间主机数量

路由上的防火墙预期会阻止访问未列入白名单的端口

【讨论】:

  • 你是对的,我执行了 svnadmin create 命令。至于使用svn ls svn://my_network_server_name_here:3690/my_new_project,给我一个错误,它无法从同一服务器的本地主机连接(无法连接到 URL 上的存储库......)但是,从本地主机执行它会提供额外的“svnserve .conf:19:预期选项。”但是,我在第 19 行检查了 svnserve.conf,它只是一个注释指令行。
  • 确实修复了第 1 步和第 2 步的一些问题,但客户端仍然出现相同的错误,并且客户端和主机之间没有任何关系。 ://
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多