If connection data is insufficient to debug the problem, it may be necessary to
trace communication data.
To enable communication tracing, the
java property -DCommTrace can be specified instead of
-DConnTrace.
NOTE: Specifying
-DCommTrace
automatically enables connection tracing as well as communication tracing.
An example of communication data trace output follows:
Mon Apr 10 16:36:09 CDT 2000 ConnTrace is true
Mon Apr 10 16:36:09 CDT 2000 Connecting to hany/9.53.166.59 Port 900
Mon Apr 10 16:36:09 CDT 2000 Commtrace is true
Mon Apr 10 16:36:09 CDT 2000 Sent on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]:
0000 47494F50 01000003 0000000C 00000005 |GIOP............|
0010 00000004 494E4954 |....INIT |
Mon Apr 10 16:36:09 CDT 2000 Rcvd on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]: (Off = 0)
Mon Apr 10 16:36:09 CDT 2000 GIOP packet header detected and skipped.
Mon Apr 10 16:36:09 CDT 2000 Rcvd on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]: (Off = 12)
Mon Apr 10 16:36:09 CDT 2000 GIOP packet header corrected!
0000 47494F50 01000004 00000008 00000005 |GIOP............|
0010 00000001 |.... |
Mon Apr 10 16:36:09 CDT 2000 Listening on ServerSocket
[addr=0.0.0.0/0.0.0.0,port=0,localport=1381]
Mon Apr 10 16:36:09 CDT 2000 Sent on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]:
0000 47494F50 01000000 0000010C 00000002 |GIOP............|
0010 00000001 0000000C 00000000 00010001 |................|
0020 00010100 00000006 000000A4 00000000 |................|
0030 00000028 49444C3A 6F6D672E 6F72672F |...(IDL:omg.org/|
0040 53656E64 696E6743 6F6E7465 78742F43 |SendingContext/C|
0050 6F646542 6173653A 312E3000 00000001 |odeBase:1.0.....|
0060 00000000 00000068 00010100 0000000C |.......h........|
0070 392E3533 2E313636 2E353800 05650000 |9.53.166.58..e..|
0080 0000002C 4A4D4249 00000010 3EA4A054 |...,JMBI....>..T|
0090 00000000 00000000 00000000 00000000 |................|
00a0 00000024 00000008 00000000 00000000 |...$............|
00b0 00000001 00000001 00000014 00000000 |................|
00c0 00010001 00000000 00010100 00000000 |................|
00d0 00000006 01000000 00000004 494E4954 |............INIT|
00e0 00000004 67657400 0000001C 49424D44 |....get.....IBMD|
00f0 3A000000 0000000C 392E3533 2E313636 |:.......9.53.166|
0100 2E353800 00000000 0000000C 4E616D65 |.58.........Name|
0110 53657276 69636500 |Service. |
Mon Apr 10 16:36:09 CDT 2000 Rcvd on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]: (Off = 0)
Mon Apr 10 16:36:09 CDT 2000 GIOP packet header detected and skipped.
Mon Apr 10 16:36:09 CDT 2000 Rcvd on Socket
[addr=hany/9.53.166.59,port=900,localport=1380]: (Off = 12)
Mon Apr 10 16:36:09 CDT 2000 GIOP packet header corrected!
0000 47494F50 01000001 0000019C 00000002 |GIOP............|
0010 00000001 0000000C 00000000 00010001 |................|
0020 00010100 00000006 000000A4 00000000 |................|
etc.....
The following examples illustrate how to read communication
traces:
All packets start with a Header: (12-Bytes)
0-3 4-7
8-11
---------------------------
| GIOP 1 1 0/1 Op Length
|
---------------------------
|
| | | |
|
| | | +-------- Length
|
| | +------------ Op Code 0 Request (method invocation)
|
| |
1 Response (method results)
|
| |
3 Locate (Locating an object)
|
| |
4 Locate Response (Object location)
|
| +--------------- Endianness
|
|
0 Big Endian (Most java packets are Big Endian)
|
|
1 Little Endian
|
+-------------------- IIOP Version (1.1)
+ -------------------------
Fixed Header ('G','I','O','P')
Op Code 3 - Locate
0-11 12-15
16-20 20-...
------------------------------------------
| Header | Request-ID | ObjKeyLen | ObjKey
|
------------------------------------------
| |
|
| |
+-------+
| |
|
| |
+- Object Key Data (octets)
| +-----
Length of Object Key
+------------------Packet Serial Number - Correlation ID
Op Code 4 - Locate Response
0-11 12-15
16-20 20-...
------------------------------------------------
| Header | Request-ID | Reponse Code |
IOR (if Response Code = FORWARD)
------------------------------------------------
|
|
|
|
+----- 0 Unkown object
1 Object Here
2 Object Forward (followed by new IOR)
IOR [Type ID (string), Sequence Tag (long) / Profiles (sequence octets)]
[Type ID (string)]
0-3 4-...
-----------------
| StrLen | StrData (Includes NULL terminator)
-----------------
[(long) Tag Profile Sequence Length]
0-3
--------
| Length |
--------
Tag Profile
0-3
-------------------------------------
| Tag | ProfileLength
(long) | ProfileData
--------------------------------------
|
|
|
+--------+
|
|
|
+---- Version (1.1)
|
String (.decimal TCPIP Address)
|
Port (TCPIP listening port)
|
Object Key (length then data see above)
|
+------------------ 0 TCPIP
Op Code 0 - Request
Header, Sequence Service Contexts,
Request-ID, Response Expected,
Object Key, Method Name, Principal,
Method parameters
Sequence Service Contexts (RAS, Security,
Transaction...)
Length of Sequence (long)
Service Tag (long)
Service Data: Length (long) followed
by data (octets)
Request-ID (long)
Response Expected
(Boolean - sent as octet) 0 No response
expected (one way method)
1 Response expected
Object Key
Object Key Length (long)
Object Key Data (octets)
Method Name (string)
0-3 4-...
---------------
| StrLen | StrData (Includes NULL terminator)
---------------
Principal (sequence octets)
Principal Length (long)
Pricipal Data (octets)
Method parameters (See .idl file)
Op Code 1 - Response
Header, Sequence Service Contexts,
Request-ID, Status,
INOUT/OUT parameters if Status
= No Exception
Exception
if Status = User/System Exception
IOR
if Status = Forward
Sequence Service Contexts (RAS, Security,
Transaction...)
Length of Sequence (long)
Service Tag (long)
Service Data: Length (long) followed
by data (octets)
Request-ID (long)
Status (long)
0 No Exception
1 User Exception
2 System Exception
3 Forward
INOUT/OUT parameters (see .idl)
Exception
Type (string)
0-3 4-...
---------------
| StrLen | StrData (Includes NULL terminator)
---------------
System Exception [2 longs - minor,
Completed Yes(0), No(1), Maybe(2)]
User Exception (See .idl)
IOR (see above)