connection ports

72 views
Skip to first unread message

M.V.

unread,
Sep 20, 2011, 7:48:27 AM9/20/11
to cassandra-gui
After starting the daemon I noticed that the application starts listen
on two random ports.
Having checked checking http://wiki.apache.org/cassandra/FAQ#ports I
gather that in my vanilla setup (listening on interface
192.168.100.30)
port => service/application
7000 => Cassandra cluster communication
7199 => JMX
8081 => MX4J/Http Adaptor - JMX Management Console
9160 => The Thrift client API
33653 => ???
58496 => ???

Because of very strict iptables setup, some clients such as cassandra-
gui.jar can't connect to this node because it (the client) attemps to
connect to one of this random ports as well as 9160 & 7199 ports
Any ideas?

<code>
[root@merlot ~]# netstat -anpt | grep java
[root@merlot ~]#
[root@merlot ~]# /etc/init.d/cassandra start
Starting : [ OK ]
[root@merlot ~]# netstat -anpt | grep java
tcp 0 0 0.0.0.0:58496
0.0.0.0:* LISTEN 23207/java
tcp 0 0 192.168.100.30:9160
0.0.0.0:* LISTEN 23207/java
tcp 0 0 192.168.100.30:8081
0.0.0.0:* LISTEN 23207/java
tcp 0 0 0.0.0.0:33653
0.0.0.0:* LISTEN 23207/java
tcp 0 0 192.168.100.30:7000
0.0.0.0:* LISTEN 23207/java
tcp 0 0 0.0.0.0:7199
0.0.0.0:* LISTEN 23207/java
[root@merlot ~]# ps aux | grep java | grep -v grep
cassandra 23207 2.4 1.7 4451416 135284 ? Sl 11:23
0:02 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java -ea -XX:
+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms3735M -Xmx3735M -
Xmn600M -XX:+HeapDumpOnOutOfMemoryError -Xss128k -XX:+UseParNewGC -XX:
+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -
XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:
+UseCMSInitiatingOccupancyOnly -Djava.net.preferIPv4Stack=true -
Dcom.sun.management.jmxremote.port=7199 -
Dcom.sun.management.jmxremote.ssl=false -
Dcom.sun.management.jmxremote.authenticate=false -
Dlog4j.configuration=log4j-server.properties -
Dlog4j.defaultInitOverride=true -Dcassandra-pidfile=/var/run/cassandra/
cassandra.pid -cp /home/cassandra/bin/../conf:/home/cassandra/bin/../
build/classes/main:/home/cassandra/bin/../build/classes/thrift:/home/
cassandra/bin/../lib/antlr-3.2.jar:/home/cassandra/bin/../lib/apache-
cassandra-0.8.5.jar:/home/cassandra/bin/../lib/apache-cassandra-
thrift-0.8.5.jar:/home/cassandra/bin/../lib/avro-1.4.0-fixes.jar:/home/
cassandra/bin/../lib/avro-1.4.0-sources-fixes.jar:/home/cassandra/
bin/../lib/commons-cli-1.1.jar:/home/cassandra/bin/../lib/commons-
codec-1.2.jar:/home/cassandra/bin/../lib/commons-
collections-3.2.1.jar:/home/cassandra/bin/../lib/commons-lang-2.4.jar:/
home/cassandra/bin/../lib/concurrentlinkedhashmap-lru-1.1.jar:/home/
cassandra/bin/../lib/guava-r08.jar:/home/cassandra/bin/../lib/high-
scale-lib-1.1.2.jar:/home/cassandra/bin/../lib/jackson-core-
asl-1.4.0.jar:/home/cassandra/bin/../lib/jackson-mapper-asl-1.4.0.jar:/
home/cassandra/bin/../lib/jamm-0.2.2.jar:/home/cassandra/bin/../lib/
jline-0.9.94.jar:/home/cassandra/bin/../lib/jna.jar:/home/cassandra/
bin/../lib/json-simple-1.1.jar:/home/cassandra/bin/../lib/
libthrift-0.6.jar:/home/cassandra/bin/../lib/log4j-1.2.16.jar:/home/
cassandra/bin/../lib/mx4j-tools.jar:/home/cassandra/bin/../lib/
platform.jar:/home/cassandra/bin/../lib/servlet-api-2.5-20081211.jar:/
home/cassandra/bin/../lib/slf4j-api-1.6.1.jar:/home/cassandra/bin/../
lib/slf4j-log4j12-1.6.1.jar:/home/cassandra/bin/../lib/
snakeyaml-1.6.jar org.apache.cassandra.thrift.CassandraDaemon
[root@merlot ~]#
</code>

M.V.

unread,
Sep 20, 2011, 8:30:48 AM9/20/11
to cassandra-gui
Not a cassandra-gui issue.

I haven't manage to solve my problem - I'm behind a very strict
firewall so connections to random ports aren't possible.
But for the java experienced folks here is the solution

http://www.mail-archive.com/us...@cassandra.apache.org/msg16144.html
http://www.mail-archive.com/us...@cassandra.apache.org/msg10714.html
http://blogs.oracle.com/jmxetc/entry/connecting_through_firewall_using_jmx
http://blogs.oracle.com/jmxetc/entry/jmx_connecting_through_firewalls_using
Reply all
Reply to author
Forward
0 new messages