Skip to content

Instantly share code, notes, and snippets.

@lenosi
Last active November 26, 2017 11:22
Show Gist options
  • Save lenosi/ce14cc67202bac220a705fccec75285f to your computer and use it in GitHub Desktop.
Save lenosi/ce14cc67202bac220a705fccec75285f to your computer and use it in GitHub Desktop.
Debug Qpid Proton

How to debug Qpid Proton

If you need debug Qpid Proton, use these enviroments variables:

Log driver related events, initialization, end of stream

PN_TRACE_DRV = true # or 1

Log frames into/out of the transport

PN_TRACE_FRM = true # or 1

Log raw binary data into/out of the transport

PN_TRACE_RAW = true # or 1

Example

1

export PN_TRACE_DRV=1
export PN_TRACE_FRM=1
export PN_TRACE_RAW=1
qdrouterd

2

PN_TRACE_DRV=1 PN_TRACE_FRM=1 PN_TRACE_RAW=1 qdrouterd

RESULT

2017-11-26 12:17:29.445883 +0100 SERVER (info) Container Name: Router.A
2017-11-26 12:17:29.445967 +0100 ROUTER (info) Router started in Standalone mode
2017-11-26 12:17:29.445973 +0100 ROUTER (info) Version: 1.0.0
2017-11-26 12:17:29.446006 +0100 ROUTER_CORE (info) Allow Unsettled Multicast: no
2017-11-26 12:17:29.446167 +0100 ROUTER_CORE (info) Router Core thread running. 0/Router.A
2017-11-26 12:17:29.446180 +0100 ROUTER_CORE (info) In-process subscription M/$management
2017-11-26 12:17:29.451944 +0100 AGENT (info) Activating management agent on $_management_internal
2017-11-26 12:17:29.451993 +0100 ROUTER_CORE (info) In-process subscription L/$management
2017-11-26 12:17:29.452015 +0100 ROUTER_CORE (info) In-process subscription L/$_management_internal
2017-11-26 12:17:29.452299 +0100 CONN_MGR (info) Configured Listener: 0.0.0.0:amqp proto=any, role=normal
2017-11-26 12:17:29.454372 +0100 POLICY (info) Policy configured maxConnections: 65535, policyDir: '', access rules enabled: 'false'
2017-11-26 12:17:29.454794 +0100 POLICY (info) Policy fallback defaultVhost is defined: '$default'
2017-11-26 12:17:29.454816 +0100 SERVER (notice) Operational, 4 Threads Running (process ID 31905)
2017-11-26 12:17:29.454872 +0100 SERVER (notice) Listening on 0.0.0.0:amqp
2017-11-26 12:17:36.609797 +0100 SERVER (info) Accepted connection to 0.0.0.0:amqp from 127.0.0.1:33868
[0x7f5c3800c1e0]:AMQP SASL layer detected
[0x7f5c3800c1e0]:  <- SASL
[0x7f5c3800c1e0]:  -> SASL
[0x7f5c3800c1e0]:0 -> @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS]]
[0x7f5c3800c1e0]:RAW: "\x00\x00\x00+\x02\x01\x00\x00\x00S@\xd0\x00\x00\x00\x1b\x00\x00\x00\x01\xf0\x00\x00\x00\x12\x00\x00\x00\x01\xb3\x00\x00\x00\x09ANONYMOUS"
[0x7f5c3800c1e0]:0 <- @sasl-init(65) [mechanism=:ANONYMOUS, initial-response=b"anonymous@null"]
[0x7f5c3800c1e0]:Authenticated user: anonymous with mechanism ANONYMOUS
[0x7f5c3800c1e0]:0 -> @sasl-outcome(68) [code=0]
[0x7f5c3800c1e0]:RAW: "\x00\x00\x00\x16\x02\x01\x00\x00\x00SD\xd0\x00\x00\x00\x06\x00\x00\x00\x01P\x00"
[0x7f5c3800c1e0]:AMQP 1.0 layer detected
[0x7f5c3800c1e0]:  <- AMQP
[0x7f5c3800c1e0]:0 <- @open(16) [container-id="2c5c5320-9e81-436f-9e81-40566b51b250", hostname="127.0.0.1", channel-max=32767]
[0x7f5c3800c1e0]:0 <- @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
[0x7f5c3800c1e0]:0 <- @attach(18) [name="2c5c5320-9e81-436f-9e81-40566b51b250-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, max-message-size=0]
[0x7f5c3800c1e0]:  -> AMQP
[0x7f5c3800c1e0]:0 -> @open(16) [container-id="Router.A", max-frame-size=16384, channel-max=32767, idle-time-out=8000, offered-capabilities=:"ANONYMOUS-RELAY", properties={:product="qpid-dispatch-router", :version="1.0.0"}]
[0x7f5c3800c1e0]:RAW: "\x00\x00\x00x\x02\x00\x00\x00\x00S\x10\xd0\x00\x00\x00h\x00\x00\x00\x0a\xa1\x08Router.A@p\x00\x00@\x00`\x7f\xffp\x00\x00\x1f@@@\xa3\x0fANONYMOUS-RELAY@\xd1\x00\x00\x003\x00\x00\x00\x04\xa3\x07product\xa1\x14qpid-dispatch-router\xa3\x07version\xa1\x051.0.0"
[0x7f5c3800c1e0]:0 -> @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
[0x7f5c3800c1e0]:RAW: "\x00\x00\x00#\x02\x00\x00\x00\x00S\x11\xd0\x00\x00\x00\x13\x00\x00\x00\x04`\x00\x00R\x00p\x7f\xff\xff\xffp\x7f\xff\xff\xff"
[0x7f5c3800c1e0]:0 -> @attach(18) [name="2c5c5320-9e81-436f-9e81-40566b51b250-examples", handle=0, role=true, 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, max-message-size=0]
[0x7f5c3800c1e0]:RAW: "\x00\x00\x00\x87\x02\x00\x00\x00\x00S\x12\xd0\x00\x00\x00w\x00\x00\x00\x0b\xa1-2c5c5320-9e81-436f-9e81-40566b51b250-examplesR\x00AP\x02P\x00\x00S(\xd0\x00\x00\x00\x11\x00\x00\x00\x0b@R\x00@R\x00B@@@@@@\x00S)\xd0\x00\x00\x00\x16\x00\x00\x00\x07\xa1\x08examplesR\x00@R\x00B@@@@R\x00S\x00"
[0x7f5c3800c1e0]:0 <- (EMPTY FRAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment