You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Greene (JIRA)" <ji...@apache.org> on 2009/07/02 01:04:47 UTC

[jira] Commented: (CASSANDRA-74) Random port (5555) hardcoded

    [ https://issues.apache.org/jira/browse/CASSANDRA-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726262#action_12726262 ] 

Michael Greene commented on CASSANDRA-74:
-----------------------------------------

I don't see a reason to make this configurable.  I haven't seen Cassandra ever try to bind on this port; it looks like it is just used as a flag of sorts for certain types of messages.  It really *is* a randomPort, or rather a *throwAwayPort*.

In the definition of the protocol header, there's this comment that may or may not elucidate (it didn't help me much): "The 5th bit is used to indicate that the sender is not listening on any well defined port. This implies the receiver needs to cache the connection using the port on the socket."  The 5th bit is the 'listening' bit, and we use this randomEndPoint when we see the listening bit set.

I never actually see a later test for this port so that we might explicitly cache that connection, but this code is still throwing me for loops, so what do I know.

It doesn't seem to be used by the Gossiper at all.

> Random port (5555) hardcoded
> ----------------------------
>
>                 Key: CASSANDRA-74
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-74
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Per Mellqvist
>            Assignee: Chris Goffinet
>            Priority: Minor
>         Attachments: 0001-Removed-hardcoded-port-5555-and-moved-to-storage-con.patch, 0002-Renamed-random-port-to-gossip-port-and-moved-to-stor.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The EndPoint class contains a "random port" currently hard coded to 5555. The cassandra process will attempt to bind on this port, another process already using 5555 will interfere with this. The port should be configurable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.