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

Bridge emqttd broker to another emqttd broker & emqttd to mosquitto bridge #438

Closed
shrikantlahase opened this issue Jan 29, 2016 · 17 comments
Assignees
Labels
Milestone

Comments

@shrikantlahase
Copy link

Please can anybody tell me configurations (emqttd.conf) required for creating bridge.

@emqplus
Copy link
Contributor

emqplus commented Jan 29, 2016

@emqplus emqplus added this to the 0.15.0 milestone Jan 29, 2016
@emqplus emqplus self-assigned this Jan 29, 2016
@shrikantlahase
Copy link
Author

thanks feng

On Fri, Jan 29, 2016 at 1:35 PM, Feng Lee notifications@github.com wrote:

@shrikantlahase https://github.com/shrikantlahase, please check wiki:
https://github.com/emqtt/emqttd/wiki/Bridge


Reply to this email directly or view it on GitHub
#438 (comment).

@emqplus
Copy link
Contributor

emqplus commented Jan 29, 2016

@shrikantlahase, I am not sure if mosquitto could bridge to emqttd. If any issues, please contact us:)

@shrikantlahase
Copy link
Author

Hi feng,

  1. Bridging mosquitto broker and emqttd broker was not successful. Can you
    do any help...?
  2. I am trying to connect paho mqtt client which written in python to
    emqttd broker but its not happening. How to connect as a client to emqttd
    broker...?

Regards & Thanks,
Shrikant

On Fri, Jan 29, 2016 at 2:54 PM, Feng Lee notifications@github.com wrote:

@shrikantlahase https://github.com/shrikantlahase, I am not sure if
mosquitto could bridge to emqttd. If any issues, please contact us:)


Reply to this email directly or view it on GitHub
#438 (comment).

@emqplus
Copy link
Contributor

emqplus commented Feb 1, 2016

Hi @shrikantlahase

  1. Please add my Skype: feng.emqtt.io to discuss the bridge issue.
  2. We also use The paho client library written in python to test emqttd broker, so it should work well with emqttd.

@shrikantlahase
Copy link
Author

shrikantlahase commented Feb 1, 2016 via email

@emqplus
Copy link
Contributor

emqplus commented Feb 1, 2016

please open the console log in etc/emqttd.config, and then ‘./bin/emqttd console’ to debug:

    {handlers, [
        {lager_console_backend, info},
       ...

@jianglinchun
Copy link

bridge from mosquitto to emqttd not successfully. I've test both mqtt broker by mosquitto_pub and both of them works fine.

mosquitto bridge configuration:
connection emqttd
address 101.200.88.13:1883
topic /test both
#bridge_protocol_version mqttv31
start_type automatic
local_clientid C_00:0C:29:2B:77:52

emqttd error log:
18:11:20.601 <0.485.0> [error] Client(116.236.226.166:60775): Framing error - protocol_header_corrupt

emqttd listeners:
[root@iZ25r8abgnyZ emqttd]# ./bin/emqttd_ctl listeners
listener on http:8083
acceptors : 4
max_clients : 64
current_clients : 1
shutdown_count : []
listener on mqtts:8883
acceptors : 4
max_clients : 512
current_clients : 0
shutdown_count : []
listener on mqtt:1883
acceptors : 16
max_clients : 512
current_clients : 0
shutdown_count : [{protocol_header_corrupt,31}]
listener on http:18083
acceptors : 4
max_clients : 512
current_clients : 3
shutdown_count : []

emqplus pushed a commit that referenced this issue Feb 17, 2016
@emqplus
Copy link
Contributor

emqplus commented Feb 17, 2016

@shrikantlahase, @jianglinchun mosquitto bridge works now.

The mosquitto bridge uses a special 0x83 as protocol version in the CONNECT packet.

Please check out the '0.17' branch.

@emqplus emqplus modified the milestones: 0.17, 0.15.0 Feb 17, 2016
@jianglinchun
Copy link

Unexpected behavior. Pls check the following mosquitto log(unacceptable protocol version and works after retry???):

1455734681: Connecting bridge 000C292 (101.200.88.13:1883)
1455734681: Bridge OpenWrt.000C292 sending CONNECT
1455734681: Received CONNACK on connection wd_000C292B7752.
1455734681: Connection Refused: unacceptable protocol version
1455734681: Socket error on client wd_000C292B7752, disconnecting.
1455734712: Bridge wd_000C292B7752 doing local SUBSCRIBE on topic /test
1455734712: Connecting bridge 000C292 (101.200.88.13:1883)
1455734712: Bridge OpenWrt.000C292 sending CONNECT
1455734712: Received CONNACK on connection wd_000C292B7752.
1455734712: Bridge wd_000C292B7752 sending SUBSCRIBE (Mid: 2, Topic: /test, QoS: 0)

@emqplus
Copy link
Contributor

emqplus commented Feb 18, 2016

Please check the console log of emqttd broker, configure etc/emqttd.config:

{lager_console_backend, info},

emqplus pushed a commit that referenced this issue Feb 21, 2016
@emqplus
Copy link
Contributor

emqplus commented Feb 21, 2016

@jianglinchun The broker will reply 'unacceptable protocol version' error code when mosquitto bridge CONNECT packet received. I fixed in the latest 0.17 branch, please pull and verify.

@jianglinchun
Copy link

Thank you for you fix. It works now.

@emqplus
Copy link
Contributor

emqplus commented Feb 21, 2016

hi @shrikantlahase, could we close the issue?

@shrikantlahase
Copy link
Author

thanks for the fix.
I am yet to test your solution you provided to this issue. Time being you
can closed the issue. If some problem other issue occurs , i will inform
you.

thanks and Regards
Shrikant

On Sun, Feb 21, 2016 at 8:21 PM, Feng Lee notifications@github.com wrote:

hi @shrikantlahase https://github.com/shrikantlahase, could we close
the issue?


Reply to this email directly or view it on GitHub
#438 (comment).

@emqplus emqplus closed this as completed Feb 22, 2016
@drasko
Copy link

drasko commented Oct 10, 2016

I can not make it work:

drasko@Lenin:~/mainflux/mosquitto$ /usr/sbin/mosquitto -c mosquitto.conf -p 1111
1476137283: mosquitto version 1.4.8 (build date Sun, 14 Feb 2016 15:06:55 +0000) starting
1476137283: Config loaded from mosquitto.conf.
1476137283: Opening ipv4 listen socket on port 1111.
1476137283: Opening ipv6 listen socket on port 1111.
1476137283: Bridge local.Lenin.bridge-to-mainflux doing local SUBSCRIBE on topic #
1476137283: Connecting bridge bridge-to-mainflux (localhost:1883)
1476137283: Bridge Lenin.bridge-to-mainflux sending CONNECT
1476137283: Socket error on client local.Lenin.bridge-to-mainflux, disconnecting.

I am using latest debian emqttd-debian64-v2.0-beta.3-20160918.zip and I can not see anything in the debug console (set laget to debug, and wun in the foreground - no indeication tat mosquitto tries to connect)

@drasko
Copy link

drasko commented Nov 7, 2016

Any news on this?

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

No branches or pull requests

4 participants