[
https://issues.apache.org/jira/browse/PROTON-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976353#comment-15976353
]
Nico Maas commented on PROTON-1465:
-----------------------------------
Hello [~gemmellr],
I increased the verbosity of ActiveMQ Logging to Debug Level
I got following now:
{code}
Traceback (most recent call last):
File "./send_activemq.py", line 323, in <module>
mq_send(data.read())
File "./send_activemq.py", line 272, in mq_send
activemq_sender.send(Message(body=data))
File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 78, in
send
self.connection.wait(lambda: _is_settled(delivery), msg="Sending on sender
%s" % self.link.name, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 267, in
wait
self.container.process()
File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 159, in
process
self._check_errors()
File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 155, in
_check_errors
_compat.raise_(exc, value, tb)
File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 4050,
in dispatch
ev.dispatch(self.handler)
File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3959,
in dispatch
result = dispatch(handler, type.method, self)
File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3837,
in dispatch
return m(*args)
File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 289, in
on_connection_remote_close
raise ConnectionClosed(event.connection)
proton.utils.ConnectionClosed: Connection MYIPSERVERADDR closed due to:
Condition('amqp:decode-error', 'Could not process AMQP commands')
{code}
And the ActiveMQ Log:
{code}
2017-04-20 09:15:03,611 | DEBUG | Publishing: mqtt://5268c3466792:1883 for
broker transport URI:
mqtt://5268c3466792:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
| org.apache.activemq.broker.TransportConnector | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
2017-04-20 09:15:03,605 | DEBUG | queue://file, subscriptions=1, memory=60%,
size=802, pending=0 toPageIn: 177, force:false, Inflight: 8,
pagedInMessages.size 625, pagedInPendingDispatch.size 616, enqueueCount: 837,
dequeueCount: 35, memUsage:406126634, maxPageSize:200 |
org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost]
Task-4
2017-04-20 09:15:03,613 | DEBUG | queue://file, subscriptions=1, memory=60%,
size=802, pending=0 toPageIn: 177, force:false, Inflight: 8,
pagedInMessages.size 625, pagedInPendingDispatch.size 616, enqueueCount: 837,
dequeueCount: 35, memUsage:406126634, maxPageSize:200 |
org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost]
Task-4
2017-04-20 09:15:03,614 | DEBUG | Publishing: mqtt://5268c3466792:1883 for
broker transport URI:
mqtt://5268c3466792:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
| org.apache.activemq.broker.TransportConnector | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
2017-04-20 09:15:03,615 | DEBUG | remove connection id:
ID:5268c3466792-36197-1492679612071-3:4 |
org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
2017-04-20 09:15:03,616 | DEBUG | Publishing: amqp://5268c3466792:5672 for
broker transport URI:
amqp://5268c3466792:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600
| org.apache.activemq.broker.TransportConnector | ActiveMQ
BrokerService[localhost] Task-1
2017-04-20 09:15:03,617 | DEBUG | Transport Connection to: tcp://MYIPADDR:50770
failed: java.io.EOFException |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
java.io.EOFException
at
java.io.DataInputStream.readByte(DataInputStream.java:267)[:1.8.0_121]
at
org.apache.activemq.transport.mqtt.MQTTWireFormat.unmarshal(MQTTWireFormat.java:86)[activemq-mqtt-5.14.4.jar:5.14.4]
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240)[activemq-client-5.14.4.jar:5.14.4]
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)[activemq-client-5.14.4.jar:5.14.4]
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)[activemq-client-5.14.4.jar:5.14.4]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-04-20 09:15:03,617 | DEBUG | Publishing: amqp://5268c3466792:5672 for
broker transport URI:
amqp://5268c3466792:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600
| org.apache.activemq.broker.TransportConnector | ActiveMQ
BrokerService[localhost] Task-1
2017-04-20 09:15:03,619 | DEBUG | Unregistering MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=clientId,connectionName=send
| org.apache.activemq.broker.jmx.ManagementContext | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
2017-04-20 09:15:03,620 | DEBUG | Connection Stopped: tcp://MYIPADDR:59252 |
org.apache.activemq.broker.TransportConnection | ActiveMQ
BrokerService[localhost] Task-1
2017-04-20 09:15:03,620 | DEBUG | Unregistering MBean
org.apache.activemq:type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=mqtt,connectionViewType=remoteAddress,connectionName=tcp_//MYIPADDR_50770
| org.apache.activemq.broker.jmx.ManagementContext | ActiveMQ Transport:
tcp:///MYIPADDR:50770@1883
2017-04-20 09:15:03,623 | DEBUG | Stopping connection: tcp://MYIPADDR:50770 |
org.apache.activemq.broker.TransportConnection | ActiveMQ
BrokerService[localhost] Task-4
2017-04-20 09:15:03,625 | DEBUG | Stopping transport tcp:///MYIPADDR:50770@1883
| org.apache.activemq.transport.tcp.TcpTransport | ActiveMQ
BrokerService[localhost] Task-4
2017-04-20 09:15:03,626 | DEBUG | Initialized TaskRunnerFactory[ActiveMQ Task]
using ExecutorService:
java.util.concurrent.ThreadPoolExecutor@12e45f4e[Running, pool size = 0, active
threads = 0, queued tasks = 0, completed tasks = 0] |
org.apache.activemq.thread.TaskRunnerFactory | ActiveMQ
BrokerService[localhost] Task-4
2017-04-20 09:15:03,988 | DEBUG | Closed socket
Socket[addr=/MYIPADDR,port=50770,localport=1883] |
org.apache.activemq.transport.tcp.TcpTransport | ActiveMQ Task-1
2017-04-20 09:15:03,990 | DEBUG | Forcing shutdown of ExecutorService:
java.util.concurrent.ThreadPoolExecutor@12e45f4e[Running, pool size = 1, active
threads = 0, queued tasks = 0, completed tasks = 1] |
org.apache.activemq.util.ThreadPoolUtils | ActiveMQ BrokerService[localhost]
Task-4
2017-04-20 09:15:03,991 | DEBUG | Stopped transport: tcp://MYIPADDR:50770 |
org.apache.activemq.broker.TransportConnection | ActiveMQ
BrokerService[localhost] Task-4
2017-04-20 09:15:03,992 | DEBUG | Connection Stopped: tcp://MYIPADDR:50770 |
org.apache.activemq.broker.TransportConnection | ActiveMQ
BrokerService[localhost] Task-4
2017-04-20 09:15:04,030 | DEBUG | Checkpoint done. |
org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint
Worker
2017-04-20 09:15:04,517 | DEBUG | queue://file, subscriptions=1, memory=60%,
size=802, pending=0 toPageIn: 177, force:false, Inflight: 9,
pagedInMessages.size 625, pagedInPendingDispatch.size 616, enqueueCount: 837,
dequeueCount: 35, memUsage:406126634, maxPageSize:200 |
org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost]
Task-4
2017-04-20 09:15:04,520 | DEBUG | queue://file, subscriptions=1, memory=60%,
size=801, pending=0 toPageIn: 177, force:false, Inflight: 8,
pagedInMessages.size 624, pagedInPendingDispatch.size 615, enqueueCount: 837,
dequeueCount: 36, memUsage:405961701, maxPageSize:200 |
org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost]
Task-4
{code}
Any ideas?
Thanks a lot!
> amqp:decode-error Could not process AMQP commands
> -------------------------------------------------
>
> Key: PROTON-1465
> URL: https://issues.apache.org/jira/browse/PROTON-1465
> Project: Qpid Proton
> Issue Type: Bug
> Components: python-binding
> Affects Versions: 0.17.0
> Environment: Ubuntu 14.04
> Reporter: Nico Maas
>
> I use Qpid in Python to send files and do it this way:
> {code}
> from __future__ import print_function, unicode_literals
> # qpid-proton
> from proton import Message
> from proton.utils import BlockingConnection
> from proton.handlers import IncomingMessageHandler
> activemq_channel = ""
> activemq_connection = ""
> activemq_session = ""
> activemq_sender = ""
> def mq_connect(ip, username, password):
> global activemq_channel
> global activemq_connection
> global activemq_session
> global activemq_sender
> activemq_connection = BlockingConnection(username + ":" + password + "@" +
> ip + ":5672")
> activemq_sender = activemq_connection.create_sender("file")
> def mq_send(data):
> global activemq_sender
> #activemq_sender.send(Message(bytearray(data)))
> activemq_sender.send(Message(durable=True,body=data))
> def mq_close():
> global activemq_connection
> activemq_connection.close()
> mq_connect(server_ip,'admin','admin')
> for i in file_list:
> data = open(i, 'rb')
> mq_send(data.read())
> data.close()
> mq_close.close()
> {code}
> Sadly I could not send the files as bytearrays as I normally do.. but it
> should work (Is there any better way to send binary files via proton?).
> However, on random, following problem arises:
> {code}
> Traceback (most recent call last):
> File "./send_activemq.py", line 323, in <module>
> mq_send(data.read())
> File "./send_activemq.py", line 271, in mq_send
> activemq_sender.send(Message(body=data))
> File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 78, in
> send
> self.connection.wait(lambda: _is_settled(delivery), msg="Sending on
> sender %s" % self.link.name, timeout=timeout)
> File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 267, in
> wait
> self.container.process()
> File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 159,
> in process
> self._check_errors()
> File "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 155,
> in _check_errors
> _compat.raise_(exc, value, tb)
> File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line
> 4050, in dispatch
> ev.dispatch(self.handler)
> File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line
> 3959, in dispatch
> result = dispatch(handler, type.method, self)
> File "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line
> 3837, in dispatch
> return m(*args)
> File "/usr/local/lib/python2.7/dist-packages/proton/utils.py", line 289, in
> on_connection_remote_close
> raise ConnectionClosed(event.connection)
> proton.utils.ConnectionClosed: Connection x closed due to:
> Condition('amqp:decode-error', 'Could not process AMQP commands')
> {code}
> ActiveMQ tells me following:
> {code}
> WARN | Transport Connection to: tcp://x:59158 failed:
> org.apache.activemq.transport.amqp.AmqpProtocolException: Could not process
> AMQP commands
> WARN | Transport Connection to: tcp://x:55804 failed: java.io.EOFException
> {code}
> However, it always happens at random - without any clue on the file, size or
> time..
> What can I do? Python crashes at this point... So it is a blocker for me.
> Thanks a lot for your help.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]