php-amqplib / RabbitMqBundle

RabbitMQ Bundle for the Symfony web framework
MIT License
1.22k stars 470 forks source link

consumer internal error if it connects to a queue that already has messages. #652

Closed nchauvire closed 3 years ago

nchauvire commented 3 years ago

Hi,

Sorry for my english, i am french.

I have been using rabbitmqBundle for 2 years without problem, but i just created a new project with symfony 5.3 and rabbitmqbundle 2.7.0 and now i have this problem.

I have to delete my queue (and therefore lose all the messages), then go back to step 1

I have another project running on the same rabbitmq server and I don't have this problem.

Here are the logs of my rabbitmq-server when the problem arises.

image

Here are the logs of my consumer php rabbitmq with option debug when the problem arises.

`` bin/console ra:co wexlog_discrepancy --debug < [hex]: 0000 41 4D 51 50 00 00 09 01 AMQP....

waiting for 10,10 waiting for a new frame

10,10: Connection.start Start from server, version: 0.9, properties: capabilities=(publisher_confirms=1, exchange_exchange_bindings=1, basic.nack=1, consumer_cancel_notify=1, connection.blocked=1, consumer_priorities=1, authentication_failure_close=1, per_consumer_qos=1, direct_reply_to=1), cluster_name=rabbit@SVR-DEV2.**, copyright=Copyright (C) 2007-2018 Pivotal Software, Inc., information=Licensed under the MPL. See http://www.rabbitmq.com/, platform=Erlang/OTP 21.2.6, product=RabbitMQ, version=3.7.8, mechanisms: PLAIN, AMQPLAIN, locales: en_US < 10,11:: Connection.startok < [hex]: 0000 01 00 00 00 00 01 37 00 0A 00 0B 00 00 00 F5 07 ......7. ......�. 0010 70 72 6F 64 75 63 74 53 00 00 00 07 41 4D 51 50 productS ....AMQP 0020 4C 69 62 08 70 6C 61 74 66 6F 72 6D 53 00 00 00 Lib.plat formS... 0030 03 50 48 50 07 76 65 72 73 69 6F 6E 53 00 00 00 .PHP.ver sionS... 0040 05 33 2E 30 2E 30 0B 69 6E 66 6F 72 6D 61 74 69 .3.0.0.i nformati 0050 6F 6E 53 00 00 00 00 09 63 6F 70 79 72 69 67 68 onS..... copyrigh 0060 74 53 00 00 00 00 0C 63 61 70 61 62 69 6C 69 74 tS.....c apabilit 0070 69 65 73 46 00 00 00 8C 1C 61 75 74 68 65 6E 74 iesF...� .authent 0080 69 63 61 74 69 6F 6E 5F 66 61 69 6C 75 72 65 5F ication failure_ 0090 63 6C 6F 73 65 74 01 12 70 75 62 6C 69 73 68 65 closet.. publishe 00A0 72 5F 63 6F 6E 66 69 72 6D 73 74 01 16 63 6F 6E r_confir mst..con 00B0 73 75 6D 65 72 5F 63 61 6E 63 65 6C 5F 6E 6F 74 sumer_ca ncel_not 00C0 69 66 79 74 01 1A 65 78 63 68 61 6E 67 65 5F 65 ifyt..ex changee 00D0 78 63 68 61 6E 67 65 5F 62 69 6E 64 69 6E 67 73 xchange bindings 00E0 74 01 0A 62 61 73 69 63 2E 6E 61 63 6B 74 01 12 t..basic .nackt.. 00F0 63 6F 6E 6E 65 63 74 69 6F 6E 2E 62 6C 6F 63 6B connecti on.block 0100 65 64 74 01 08 41 4D 51 50 4C 41 49 4E 00 00 00 edt..AMQ PLAIN... 0110 27 05 4C 4F 47 49 4E 53 00 00 00 08 72 65 63 65 '.LOGINS .... 0120 74 74 65 35 08 50 41 53 53 57 4F 52 44 53 00 00 .PAS SWORDS.. 0130 00 06 61 7A 65 72 74 79 05 65 6E 5F 55 53 CE ..**** .en_US�

< 10,11:: Connection.start_ok waiting for 10,20, 10,30 waiting for a new frame

10,30: Connection.tune < 10,31:: Connection.tune_ok < [hex]: 0000 01 00 00 00 00 00 0C 00 0A 00 1F 07 FF 00 02 00 ........ ....�... 0010 00 00 00 CE ...�

< 10,31:: Connection.tune_ok < 10,40:: Connection.open < [hex]: 0000 01 00 00 00 00 00 16 00 0A 00 28 0F 72 65 63 65 ........ ..(.rece 0010 74 74 65 35 2E 64 65 76 2E 72 62 00 00 CE tte5.dev .rb..�

< 10,40:: Connection.open waiting for 10,41 waiting for a new frame

10,41: Connection.open_ok Open OK! known_hosts: using channel_id: 1 < 20,10:: Channel.open < [hex]: 0000 01 00 01 00 00 00 05 00 14 00 0A 00 CE ........ ....�

< 20,10:: Channel.open waiting for 20,11 waiting for a new frame

20,11: Channel.open_ok Channel open using channel_id: 2 < 20,10:: Channel.open < [hex]: 0000 01 00 02 00 00 00 05 00 14 00 0A 00 CE ........ ....�

< 20,10:: Channel.open waiting for 20,11 waiting for a new frame

20,11: Channel.open_ok Channel open < 40,10:: Exchange.declare < [hex]: 0000 01 00 01 00 00 00 25 00 28 00 0A 00 00 12 77 65 ......%. (.....we 0010 78 6C 6F 67 5F 64 69 73 63 72 65 70 61 6E 63 79 xlog_dis crepancy 0020 06 66 61 6E 6F 75 74 02 00 00 00 00 CE .fanout. ....�

< 40,10:: Exchange.declare waiting for 40,11 waiting for a new frame

40,11: Exchange.declare_ok < 50,10:: Queue.declare < [hex]: 0000 01 00 01 00 00 00 98 00 32 00 0A 00 00 27 72 65 ......�. 2....'re 0010 66 65 72 65 6E 74 69 65 6C 5F 77 65 78 6C 6F 67 ferentie l_wexlog 0020 5F 64 69 73 63 72 65 70 61 6E 63 79 5F 6E 69 63 _discrep ancy_nic 0030 6F 63 68 61 75 02 00 00 00 65 16 78 2D 64 65 61 ochau... .e.x-dea 0040 64 2D 6C 65 74 74 65 72 2D 65 78 63 68 61 6E 67 d-letter -exchang 0050 65 53 00 00 00 0A 77 61 69 74 69 6E 67 5F 35 6D eS....wa iting_5m 0060 19 78 2D 64 65 61 64 2D 6C 65 74 74 65 72 2D 72 .x-dead- letter-r 0070 6F 75 74 69 6E 67 2D 6B 65 79 53 00 00 00 20 72 outing-k eyS... r 0080 65 66 65 72 65 6E 74 69 65 6C 5F 64 69 73 63 72 eferenti el_discr 0090 65 70 61 6E 63 79 5F 6E 69 63 6F 63 68 61 75 CE epancy_n icochau�

< 50,10:: Queue.declare waiting for 50,11 waiting for a new frame

50,11: Queue.declare_ok < 50,20:: Queue.bind < [hex]: 0000 01 00 01 00 00 00 AC 00 32 00 14 00 00 27 72 65 ......�. 2....'re 0010 66 65 72 65 6E 74 69 65 6C 5F 77 65 78 6C 6F 67 ferentie l_wexlog 0020 5F 64 69 73 63 72 65 70 61 6E 63 79 5F 6E 69 63 _discrep ancy_nic 0030 6F 63 68 61 75 12 77 65 78 6C 6F 67 5F 64 69 73 ochau.we xlog_dis 0040 63 72 65 70 61 6E 63 79 00 00 00 00 00 65 16 78 crepancy .....e.x 0050 2D 64 65 61 64 2D 6C 65 74 74 65 72 2D 65 78 63 -dead-le tter-exc 0060 68 61 6E 67 65 53 00 00 00 0A 77 61 69 74 69 6E hangeS.. ..waitin 0070 67 5F 35 6D 19 78 2D 64 65 61 64 2D 6C 65 74 74 g_5m.x-d ead-lett 0080 65 72 2D 72 6F 75 74 69 6E 67 2D 6B 65 79 53 00 er-routi ng-keyS. 0090 00 00 20 72 65 66 65 72 65 6E 74 69 65 6C 5F 64 .. refer entiel_d 00A0 69 73 63 72 65 70 61 6E 63 79 5F 6E 69 63 6F 63 iscrepan cy_nicoc 00B0 68 61 75 CE hau�

< 50,20:: Queue.bind waiting for 50,21 waiting for a new frame

50,21: Queue.bind_ok < 60,20:: Basic.consume < [hex]: 0000 01 00 01 00 00 00 4F 00 3C 00 14 00 00 27 72 65 ......O. <....'re 0010 66 65 72 65 6E 74 69 65 6C 5F 77 65 78 6C 6F 67 ferentie l_wexlog 0020 5F 64 69 73 63 72 65 70 61 6E 63 79 5F 6E 69 63 _discrep ancy_nic 0030 6F 63 68 61 75 1B 50 48 50 50 52 4F 43 45 53 53 ochau.PH PPROCESS 0040 5F 6E 69 63 6F 2D 47 30 32 32 32 39 5F 39 39 32 _nico-G0 2229_992 0050 38 00 00 00 00 00 CE 8.....�

< 60,20:: Basic.consume waiting for 60,21 waiting for a new frame waiting for any method waiting for a new frame

10,50: Connection.close < 10,51:: Connection.close_ok < [hex]: 0000 01 00 00 00 00 00 04 00 0A 00 33 CE ........ ..3�

< 10,51:: Connection.close_ok closing input closing socket

In AbstractConnection.php line 760:

INTERNAL_ERROR(0, 0)

rabbitmq:consumer [-m|--messages [MESSAGES]] [-r|--route [ROUTE]] [-l|--memory-limit [MEMORY-LIMIT]] [-d|--debug] [-w|--without-signals] [--]

< 20,40:: Channel.close < [hex]: 0000 01 00 02 00 00 00 0B 00 14 00 28 00 00 00 00 00 ........ ..(..... 0010 00 00 CE ..�

closing input closing socket

``

thank you in advance for your help

nchauvire commented 3 years ago

Hi, I am going to close this issue because I discovered that my problem comes from the REST API of rabbitmq-management. sorry for inconvenience