当我使用hg serve
时,我遇到了这个问题,它说,
listening at http://localhost6.localdomain6:8000/ (bound to *:8000)
我认为服务器已在运行。
但是当我想通过网络浏览器访问服务器时,它说, “无法连接”
我也不能ping这个网址。
我在Ubuntu 11.04 64位中使用Mercurial。 (最新的mercurial)
这是我的iptables -L
显示的内容:
kiddo@kiddo-K42Jr:~$ sudo iptables -L [sudo] password for kiddo: Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:bootps ACCEPT tcp -- anywhere anywhere tcp dpt:bootps Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED ACCEPT all -- 192.168.122.0/24 anywhere ACCEPT all -- anywhere anywhere REJECT all -- anywhere anywhere reject-with icmp-port-unreachable REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) target prot opt source destination
答案 0 :(得分:0)
地址http://localhost6.localdomain6:8000/适用于IPv6,但hg serve
默认只使用IPv4。这听起来好像你的Ubuntu配置错误的本地主机名。
无论如何:转而在浏览器中转到http://127.0.0.1:8000/。