Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message in log: protocol_header_corrupt #1

Closed
redstar opened this issue Sep 7, 2015 · 4 comments
Closed

Message in log: protocol_header_corrupt #1

redstar opened this issue Sep 7, 2015 · 4 comments

Comments

@redstar
Copy link

redstar commented Sep 7, 2015

I installed rabbitmq 3.2.4 and enabled the mqtt plugin. Then I clone this repository and run dub -v --compiler=ldc2 inside examples/publisher. Running the application displays a range violation and I find the message protocol_header_corrupt in the log file. Any hint?

@tchaloupka
Copy link
Owner

Hello Kai,
I looked at it and it seems that it is just that rabbitmq 3.2.4 is pretty old and don't support MQTT 3.1.1 properly yet.
In this rabbitmq/rabbitmq-mqtt#9 they are writing about some fixes for v 3.3.x.

I thought about adding support for the older version too, it's not that different, but as I only needed the current version, I've worked only on that.
Are you stuck on that version or can install the newer one?

I tried it also with LDC2 (0.15.1 on LLVM 3.6.2 Gentoo Linux) and got Range violation too, but after connection accepted. I'll look into it. Works fine with dmd-2.068.0

@tchaloupka
Copy link
Owner

Narrowed it to LibasyncManualEvent (https://github.com/rejectedsoftware/vibe.d/blob/6c4114b2fdbfcc4a435392bd80eced507bfff865/source/vibe/core/drivers/libasync.d#L748)

There is some problem with Task.send within the same fiber.
It works ok even with ldc2 when you switch to libevent instead of libasync in dub.json

@redstar
Copy link
Author

redstar commented Sep 8, 2015

Hi Tomáš,
thanks for looking into this! First I switch to mosquitto 1.4.3, which supports MQTT 3.1.1. The range violation is still there but at least I got some output. With dmd 2.066.1 it works. This could be an LDC problem with fibers (ldc-developers/ldc#666) - I check this later. Again, thanks for your fast help.

@redstar redstar closed this as completed Sep 8, 2015
@redstar
Copy link
Author

redstar commented Sep 8, 2015

I also tried the libevent configuration. This works with LDC for me, too. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants