[ 
https://issues.apache.org/jira/browse/DISPATCH-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706763#comment-15706763
 ] 

Ganesh Murthy commented on DISPATCH-572:
----------------------------------------

When you now start the router with PN_TRACE_FRM=1, the "Accepted from 
127.0.0.1:48192" message that you previously saw has been moved as a log 
statement. To see this message turn on trace level logging on by adding the 
following to the router config file like this - 

{noformat}
log {
    module: DEFAULT
    enable: trace+
    output: qdrouterd.log
}
{noformat}

Make a connection to the router via simple_send.py or simple_recv.py and you 
will see the following - 

{noformat}
Tue Nov 29 17:22:10 2016 SERVER (trace) Accepting incoming connection from 
127.0.0.1:43072 to 0.0.0.0:amqp with connection id [1]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:  <- SASL
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:  -> SASL
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 -> @sasl-mechanisms(64) 
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS]]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 <- @sasl-init(65) 
[mechanism=:ANONYMOUS, initial-response=b"[email protected]"]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 -> @sasl-outcome(68) [code=0]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:  <- AMQP
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 <- @open(16) 
[container-id="60d1e762-22ae-4611-b450-e6c373287c1e", hostname="localhost", 
channel-max=32767]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 <- @begin(17) 
[next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
Tue Nov 29 17:22:10 2016 SERVER (trace) [1]:0 <- @attach(18) 
[name="60d1e762-22ae-4611-b450-e6c373287c1e-examples", handle=0, role=false, 
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, 
dynamic=false], target=@target(41) [address="examples", durable=0, timeout=0, 
dynamic=false], initial-delivery-count=0]
{noformat}

Above, you will notice the introduction of a connection id [1]
connection_id has replaced the transport reference. Using the connection id, 
you will be able to correlate messages that belong to the same connection


> Adding log info with proton transport id and related remote IP/port
> -------------------------------------------------------------------
>
>                 Key: DISPATCH-572
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-572
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>            Reporter: Paolo Patierno
>            Assignee: Ganesh Murthy
>             Fix For: 0.8.0
>
>
> Hi,
> enabling the Qpid Proton trace through PN_TRACE_FRM=1 when I start the Qpid 
> Dispatch Router, I need sometimes to know who is the remote peer is 
> exchanging traced messages.
> For example, considering these few lines of trace (running the Qpid Dispatch 
> Router) :
>  
> Accepted from 127.0.0.1:48192
> Accepted from 127.0.0.1:48190
> [0x7fbc44016390]:  <- SASL
> [0x7fbc44016390]:  -> SASL
> [0x7fbc44003b70]:  <- SASL
> [0x7fbc44003b70]:  -> SASL
> [0x7fbc44016390]:0 -> @sasl-mechanisms(64) 
> [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
> [0x7fbc44003b70]:0 -> @sasl-mechanisms(64) 
> [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
>  
> The router accepts two connections from remote clients (we see IP and port) 
> but then every message is related to an "identifier" (I guess it should be 
> the file descriptor related to the used socket).
> If I need to match these information with Wireshark (where I can see remote 
> port) I don't know if remote clients using remote port 48192 is related to 
> 0x7fbc44016390 or 0x7fbc44003b70.
> I think it could be a good information to add into the trace at least showing 
> the "identifier" after the accepted message, i.e. :
> Accepted from 127.0.0.1:48192 [0x7fbc44016390]
> It's also true, that messages related to something like [0x7fbc44016390] come 
> from Qpid Proton and messages like "Accepted ..." come from Qpid Dispatch 
> Router.
> Thanks,
> Paolo.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to