別のサーバーで特定のポートが開いているかブロックされているかを開発者ボックスで確認する方法は?

別のサーバーで特定のポートが開いているかブロックされているかを開発者ボックスで確認する方法は?

私の開発ボックスでは、ポート9042と9160を介して会社のステージングCassandraサーバーの1つに接続しようとしています。コード経由で接続できません。プログラムはSELECTクエリで中断されます。

もしそうなら、私のCassandraステージングサーバーでこれら2つのポートがブロックされているかどうか、私の開発ボックスで確認する方法があるかどうか疑問に思います。

以下は、私の開発ボックスから接続しようとしているCassandraステージングサーバーのURLです。

sc-host01.vip.slc.qa.host.com

私の開発ボックスコンピュータのURLは -

username-dyn-vm1-4.phx-os1.tratus.dev.host.com

接続できない理由を見つける方法を教えてくれる人はいますか?

私のCassandraステージングサーバーでこれらのポートが開いていることを開発ボックスでどのように確認できますか?

直す:-

これが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.

ベストアンサー1

TCPポートの場合は、開発ボックスでTelnetを使用できます。

telnet sc-host01.vip.slc.qa.host.com 9042
telnet sc-host01.vip.slc.qa.host.com 9160

タイムアウトエラーが発生すると、ポートはブロックされます。

おすすめ記事