我正在尝试从开发盒连接到我们公司在端口 9042 和 9160 上的暂存 Cassandra 服务器之一。通过代码,我无法连接到它...程序在我的 SELECT 查询中被挂起..
所以我想知道有没有办法从我的开发箱中找出这两个端口是否在我的 Cassandra 登台服务器上被阻止?
下面是我试图从我的开发盒连接的 Cassandra 登台服务器 url -
sc-host01.vip.slc.qa.host.com
我的开发盒机器网址是 -
username-dyn-vm1-4.phx-os1.tratus.dev.host.com
谁能告诉我如何找出我无法连接到它的可能原因。
如何从我的开发框中检查这些端口是否在我的 Cassandra 登台服务器上打开?
更新:-
ubuntu@username-dyn-vm1-4:~/build$ traceroute sc-host01.vip.slc.qa.host.com
traceroute to sc-host01.vip.slc.qa.host.com (10.109.107.64), 30 hops max, 60 byte packets
1 10.9.209.1 (10.9.209.1) 4.594 ms 6.628 ms 8.299 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 stgcass01-1.vip.slc.qa.host.com (10.109.107.64) 7.907 ms 3.312 ms 3.950 ms
这就是我运行 nmap 时得到的结果 -
ubuntu@username-dyn-vm1-4:~/build$ nmap -p T:9160 sc-host01.vip.slc.qa.host.com
Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-13 20:01 UTC
Nmap scan report for sc-host01.vip.slc.qa.host.com (10.109.107.64)
Host is up (0.0037s latency).
rDNS record for 10.109.107.64: stgcass01-1.vip.slc.qa.host.com
PORT STATE SERVICE
9160/tcp open apani1
Nmap done: 1 IP address (1 host up) scanned in 0.19 seconds
ubuntu@username-dyn-vm1-48493:~/build$ nmap -p T:9042 sc-host01.vip.slc.qa.host.com
Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-13 20:02 UTC
Nmap scan report for sc-host01.vip.slc.qa.host.com (10.109.107.64)
Host is up (0.0049s latency).
rDNS record for 10.109.107.64: stgcass01-1.vip.slc.qa.host.com
PORT STATE SERVICE
9042/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.11 seconds
这是否意味着端口已正确打开并且没有问题?
使用 telnet 我得到了这个 -
ubuntu@username-dyn-vm1-4:~/build$ telnet sc-host01.vip.slc.qa.host.com 9042
Trying 10.109.107.64...
Connected to stgcass01-1.vip.slc.qa.host.com.
Escape character is '^]'.
^CConnection closed by foreign host.
ubuntu@username-dyn-vm1-4:~/build$ telnet sc-host01.vip.slc.qa.host.com 9160
Trying 10.109.107.64...
Connected to stgcass01-1.vip.slc.qa.host.com.