H2 控制台从不是我的 IP 地址开始
Posted
技术标签:
【中文标题】H2 控制台从不是我的 IP 地址开始【英文标题】:H2 Console starts on IP address which is not mine 【发布时间】:2012-11-11 19:04:46 【问题描述】:如果我跑
H2JAR=/common/home/jjs/.m2/repository/com/h2database/h2/1.3.168/h2-1.3.168.jar java -cp $H2JAR org.h2.tools.Server $*
我明白了
Web Console server running at http://68.178.232.99:8082 (only local connections)
TCP server running at tcp://68.178.232.99:9092 (only local connections)
PG server running at pg://68.178.232.99:5435 (only local connections)
但我有
1004 ~\>traceroute 68.178.232.99
traceroute to 68.178.232.99 (68.178.232.99), 30 hops max, 60 byte packets
1 190.33.189.161 (190.33.189.161) 9.145 ms 9.023 ms 9.467 ms
2 172.31.36.254 (172.31.36.254) 171.169 ms 171.083 ms 170.976 ms
3 10.255.6.9 (10.255.6.9) 170.811 ms 170.641 ms 170.529 ms
4 ge-0-0-0.bal1-int-1.jf1-agr-1.cwpanama.net (201.224.254.237) 170.416 ms 170.306 ms 170.193 ms
5 so-7-1-3.mia11.ip4.tinet.net (216.221.158.49) 185.066 ms 186.763 ms 188.797 ms
6 xe-2-2-0.mia10.ip4.tinet.net (89.149.184.254) 189.751 ms xe-8-0-0.mia10.ip4.tinet.net (89.149.180.185) 202.777 ms xe-1-0-0.mia10.ip4.tinet.net (89.149.183.21) 202.611 ms
7 ge-0-2-2.mpr2.mia1.us.above.net (64.125.13.81) 211.130 ms 215.839 ms 217.518 ms
8 xe-4-0-0.cr2.iah1.us.above.net (64.125.30.202) 219.719 ms 221.003 ms 228.238 ms
9 xe-1-1-0.mpr4.phx2.us.above.net (64.125.30.149) 219.337 ms 225.518 ms 228.868 ms
10 209.66.64.6.t01121-04.above.net (209.66.64.6) 228.763 ms 214.909 ms 215.359 ms
我的主机文件是: 127.0.0.1 localhost.localdomain 本地主机 ::1 localhost6.localdomain6 localhost6
【问题讨论】:
【参考方案1】:H2 尝试检测您计算机的 IP 地址。在您的情况下,它似乎无法正常工作。你能运行H2数据库的网络测试吗?您需要下载 H2 的 .zip 文件,将其展开,chmod
build.sh
文件,然后运行:
./build.sh testNetwork
在我的情况下,结果是:
Target: testNetwork
localhost:
localhost/127.0.0.1
localhost/127.0.0.1
localhost/0:0:0:0:0:0:0:1
localhost/fe80:0:0:0:0:0:0:1%1
getLocalHost:Thomass-MacBook-Pro.local/192.168.0.104
/192.168.0.104
byName:/192.168.0.104
ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=63498]
time: 0
server accepting
client:/192.168.0.104:63498
time: 8
server accepted:Socket[addr=/192.168.0.104,port=63499,localport=63498]
client:Socket[addr=/192.168.0.104,port=63498,localport=63499]
time: 2
server read:123
client read:234
server closing
server done
time: 202
done
Done in 1626 ms
这不会解决问题,但会提供有关 H2 尝试检测 IP 地址的更多信息。
【讨论】:
以上是关于H2 控制台从不是我的 IP 地址开始的主要内容,如果未能解决你的问题,请参考以下文章