DO NOT REPLY [Bug 48113] New: Member hostname components are printed as signed 8bits

View: New views
3 Messages — Rating Filter:   Alert me  

DO NOT REPLY [Bug 48113] New: Member hostname components are printed as signed 8bits

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48113

           Summary: Member hostname components are printed as signed 8bits
           Product: Tomcat 6
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: dev@...
        ReportedBy: apache.org@...


Created an attachment (id=24467)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24467)
Patch to print hostname IP components as unsigned int

Hey,

Take the following member for example: 192.168.1.61:4000, when it's hostname is
printed (like in toString()), it shows as:
tcp://{-64, -88, 1, 61}:4000

Like in:
16:23:17,773 INFO  [TcpFailureDetector] Received
memberDisappeared[org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64,
-88, 1, 61}:4000,{-64, -88, 1, 61},4000, alive=1814258,id={50 18 86 10 111 -47
79 83 -108 -4 82 -8 26 82 -79 -59 }, payload={-84 -19 0 5 115 114 0 50 111
...(423)}, command={}, domain={74 79 84 84 65 95 87 65 68 ...(10)}, ]] message.
Will verify.
16:23:17,897 INFO  [TcpFailureDetector] Verification complete. Member still
alive[org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, 1,
61}:4000,{-64, -88, 1, 61},4000, alive=1814258,id={50 18 86 10 111 -47 79 83
-108 -4 82 -8 26 82 -79 -59 }, payload={-84 -19 0 5 115 114 0 50 111 ...(423)},
command={}, domain={74 79 84 84 65 95 87 65 68 ...(10)}, ]]

I attached a patch which takes the Arrays.toString(byte[]) and creates another
one with a second argument "unsigned". Then the original delegates to this new
one with a default of "false" for unsigned. So existing code will continue to
behave as is, but the getHostname() code in MemberImpl passes "true" for this
argument, which will make the name print as:
tcp://{192, 168, 1, 61}:4000

So this code updates:
java/org/apache/catalina/tribes/util/Arrays.java
java/org/apache/catalina/tribes/membership/MemberImpl.java

I generated the patch from trunk with a root of:
java/org/apache/catalina/

So it needs to be applied from this directory.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


DO NOT REPLY [Bug 48113] Member hostname components are printed as signed 8bits

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48113

--- Comment #1 from Mark Thomas <markt@...> 2009-11-22 15:14:51 GMT ---
This was fixed in trunk in r758249. I have proposed the same patch for 6.0.x

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


DO NOT REPLY [Bug 48113] Member hostname components are printed as signed 8bits

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://issues.apache.org/bugzilla/show_bug.cgi?id=48113

Mark Thomas <markt@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Mark Thomas <markt@...> 2009-12-19 14:57:31 GMT ---
The patch has been applied to 6.0.x and will be included in 6.0.21 onwards.

Many thanks.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...