is rabbitmq 3.7.x supported?

221 views
Skip to first unread message

Vladimir Goncharov

unread,
Jul 15, 2018, 12:10:21 AM7/15/18
to Pika
Hi,

I have a problem (BlockingConnection raises pika.exceptions.IncompatibleProtocolError: (-1, 'EOF')) with connection to RabbitMQ 3.7.7 using pika-0.12.0.
Host system is CentOS 6.x , client is connecting to localhost. Pika 0.10.0 worked with RabbitMQ 3.6.0 quite well at the same host.
It seems that protocol is very different between 3.6.x and 3.7.x...
Is there pika version compatible with rabbitMQ 3.7.x ?

Best Regards,
Vladimir Goncharov

Gavin M. Roy

unread,
Jul 15, 2018, 3:48:50 PM7/15/18
to pika-...@googlegroups.com
Protocol is the same, you’re probably connecting to the HTTP port or something else.

--
You received this message because you are subscribed to the Google Groups "Pika" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MBX of 2008

unread,
Jul 16, 2018, 4:32:34 AM7/16/18
to pika-...@googlegroups.com
Hello,

No, I'm connecting to amqp port. here is a network dump:

[ota@OTA-PROC ~]$ /usr/sbin/tcpdump -i any -n port 5672
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
08:13:11.305977 IP 127.0.0.1.42211 > 127.0.0.1.amqp: Flags [S], seq 1617001030, win 65495, options [mss 65495,sackOK,TS val 3379627759 ecr 0,nop,wscale 7], length 0
08:13:11.306024 IP 127.0.0.1.amqp > 127.0.0.1.42211: Flags [S.], seq 3860033889, ack 1617001031, win 65483, options [mss 65495,sackOK,TS val 3379627759 ecr 3379627759,nop,wscale 7], length 0
08:13:11.306095 IP 127.0.0.1.42211 > 127.0.0.1.amqp: Flags [.], ack 1, win 512, options [nop,nop,TS val 3379627759 ecr 3379627759], length 0
08:13:21.308951 IP 127.0.0.1.amqp > 127.0.0.1.42211: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3379637762 ecr 3379627759], length 0

Server reset connection after 10 seconds timeout, no data is sent to/from server.

The script is the following:

>>> import pika
>>> cparms=pika.ConnectionParameters("127.0.0.1")
>>> connection = pika.BlockingConnection(cparms)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/java/jython/Lib/site-packages/pika/adapters/blocking_connection.py", line 377, in __init__
    self._process_io_for_connection_setup()
  File "/opt/java/jython/Lib/site-packages/pika/adapters/blocking_connection.py", line 416, in _process_io_for_connection_setup
    self._flush_output(self._opened_result.is_ready,
  File "/opt/java/jython/Lib/site-packages/pika/adapters/blocking_connection.py", line 469, in _flush_output
    raise maybe_exception
pika.exceptions.IncompatibleProtocolError: (-1, 'EOF')

The same script using pika-0.10.0 works fine (and rabbitmq-3.7.4):

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
11:24:34.294777 IP 127.0.0.1.42292 > 127.0.0.1.5672: Flags [S], seq 200617017, win 32792, options [mss 16396,sackOK,TS val 1571948628 ecr 0,nop,wscale 4], length 0
11:24:34.294845 IP 127.0.0.1.5672 > 127.0.0.1.42292: Flags [S.], seq 1997924536, ack 200617018, win 32768, options [mss 16396,sackOK,TS val 1571948628 ecr 1571948628,nop,wscale 4], length 0
11:24:34.294891 IP 127.0.0.1.42292 > 127.0.0.1.5672: Flags [.], ack 1, win 2050, options [nop,nop,TS val 1571948628 ecr 1571948628], length 0
11:24:34.544830 IP 127.0.0.1.42292 > 127.0.0.1.5672: Flags [P.], seq 1:9, ack 1, win 2050, options [nop,nop,TS val 1571948878 ecr 1571948628], length 8
11:24:34.544903 IP 127.0.0.1.5672 > 127.0.0.1.42292: Flags [.], ack 9, win 2048, options [nop,nop,TS val 1571948878 ecr 1571948878], length 0
....
Note that client sends data to server after opening connection ( line 4).

Best Regards,
Vladimir Goncharov



To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Pika" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

lba...@pivotal.io

unread,
Jul 16, 2018, 10:02:16 AM7/16/18
to Pika
Hi Vladimir,

You should have mentioned that you're using jython. What version are you using?

What version of CentOS 6 and Erlang are you using?

Thanks, I'll try to reproduce.
Luke
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Pika" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python...@googlegroups.com.

Gavin M. Roy

unread,
Jul 16, 2018, 10:35:10 AM7/16/18
to pika-...@googlegroups.com
Your TCP dump is fairly useless without the data. IncompatibleProtocolError generally means the other side is not responding or not talking AMQP.

lba...@pivotal.io

unread,
Jul 16, 2018, 10:39:11 AM7/16/18
to Pika
Hi Vladimir,

Please let me know what version of Java you are using, and the sequence of commands I should use to install both Java and Jython. Running "yum install jython" on my CentOS 6 VM results in a very old version being installed (2.2.1) that is incompatible with Pika.

FWIW, Jython appears to be an abandoned project, with no release in the past 3 years -


MBX of 2008

unread,
Jul 16, 2018, 11:49:00 AM7/16/18
to pika-...@googlegroups.com
Hi,

Here you are:

[ota@OTA-PROC ~]$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

[ota@OTA-PROC ~]$ jython
Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_172
Type "help", "copyright", "credits" or "license" for more information.

[ota@OTA-PROC ~]$ cat /etc/redhat-release
CentOS release 6.9 (Final)


Please note that the same behaviour I noticed on another 'old' system , it is 32-bit

vova@linux-7iii:~> jython
Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
[Java HotSpot(TM) Server VM (Oracle Corporation)] on java1.7.0_79
Type "help", "copyright", "credits" or "license" for more informati

vova@linux-7iii:~> cat /etc/SuSE-release
openSUSE 12.1 (i586)
VERSION = 12.1
CODENAME = Asparagus

Best Regards,
Vladimir Goncharov

To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

MBX of 2008

unread,
Jul 16, 2018, 11:53:40 AM7/16/18
to pika-...@googlegroups.com
Hi.

Well, not in this case. Please note , that length of all messages in the 1st trace is 0. No data were exchanged between client and server. The only diffrence was found that client in the second trace sent 8 bytes to server after opening socket and connection was established.
Subject is wrong (as usual :), rabbitm vestion 3.7.4 works fine with pika-0.10.0 but it fails wit 0.11.2 or later.  Client doesn't detect socket openning event?


Best Regards,
Vladimir Goncharov

To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Pika" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

MBX of 2008

unread,
Jul 16, 2018, 11:57:59 AM7/16/18
to pika-...@googlegroups.com
Yes, jython.org is abondoned. It was really pitty after changing pip protocol, but you may find updates on https://hg.python.org/jython/


Best Regards,
Vladimir Goncharov

To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.

lba...@pivotal.io

unread,
Jul 16, 2018, 1:27:35 PM7/16/18
to Pika
Thanks for the info Vladimir

It would speed things up if you provided information on how to install those exact Java and Jython versions on CentOS 6. If you can script it, even better.

Since Jython is abandoned I can't spend any extra time getting my environment up to see what's happening.

Thanks -
Luke

MBX of 2008

unread,
Jul 17, 2018, 2:04:21 AM7/17/18
to pika-...@googlegroups.com
Hi Luke,

For you convenience I managed to reproduce problem on recent Oracle Linux 7.3.
Here are steps to reproduce it:
1. Get recent jdk from oracle site. There are not direct links, sorry
2. Get jython2.7.1 using http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar
3. Get pika wheel using https://pypi.org/project/pika/#files
4. Unpack jdk*.tar.gz in some folder ( I put it into /opt), then update JAVA_HOME and PATH environment variables for new java installation. In my case it are
export JAVA_HOME=jdk1.8.0_172
PATH=/opt/jdk1.8.0_172/bin
5. Run jython installer using command java -jar jython-installer-2.7.1.jar -s -d targetDirectory
target Directory in my case is /opt/jdk1.8.0_172/jython
and add jython binary into PATH:
PATH= /opt/jdk1.8.0_172/jython/bin:$PATH
6. Check that everything is OK runnning jython:

$ jython
Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_172
Type "help", "copyright", "credits" or "license" for more information.
>>>
7. Install pika wheel:
pip install pika-0.12.0-py2.py3-none-any.whl
 That's all

I attached simple shell script for installation, but you still need to download files from Internet.
There are more actions required to install RabbitMQ on Oracle Linux 7.3 ( and much more to install it on Centos6),
please let me know if you plan to connect to localhost broker.

Best Regards,
Vladimir Goncharov



To unsubscribe from this group and stop receiving emails from it, send an email to pika-python+unsubscribe@googlegroups.com.
install-pika-OL7.3.sh

MBX of 2008

unread,
Jul 17, 2018, 8:23:47 AM7/17/18
to pika-...@googlegroups.com
Small update. jython socket library doesn't export constant SOMAXCONN, so compat.py from pika library raises exception. I replaced this constant with 128 in the source code.

Best Regards,
Vladimir Goncharov

lba...@pivotal.io

unread,
Jul 17, 2018, 8:41:43 AM7/17/18
to Pika
Thanks for the instructions, I will get to this when I can.
Reply all
Reply to author
Forward
0 new messages