emqx / emqx-sn

EMQX MQTT-SN Gateway
https://www.emqx.com
Apache License 2.0
30 stars 20 forks source link

Setting the port to ::1:2000 causes error #66

Open tonnenpinguin opened 6 years ago

tonnenpinguin commented 6 years ago

When setting the port to ::1:2000 (as mentioned in the comment) emqttd exits with the following error message.

15:13:40.661 [error] Error generating configuration in phase transform_datatypes 15:13:40.661 [error] Error transforming datatype for: mqtt.sn.port 15:13:40.661 [error] "::1:20000" cannot be converted to a(n) integer

Is setting the port to ::1:xxxx even required when trying to get IPv6 only clients to connect with the MQTT-SN bridge? Thanks in advance!

grutabow commented 6 years ago

emq-sn will allow binding itself on an ipv6 address in next official release.

tonnenpinguin commented 6 years ago

Thanks for the quick reply! Alright, I'll resume testing in a week then :)

manchoz commented 6 years ago

Still unable to get IPv6 working after upgrading to v2.3.4. With mqtt.sn.port = ::1:1884 emq_sn exits with:

[error] Supervisor emq_sn_sup had child emq_sn_udp_server started with esockd_udp:server(mqtt_sn, {"::1",1884}, [], {emq_sn_gateway_sup,start_gateway,[1,false]}) at undefined exit with reason {'EXIT',{function_clause,[{esockd_udp,server,[mqtt_sn,{"::1",1884},[],{emq_sn_gateway_sup,start_gateway,[1,false]}],[{file,"src/esockd_udp.erl"},{line,48}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]},{supervisor,start_children,3,[{file,"supervisor.erl"},{line,348}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,314}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,365}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,333}]},{proc_lib,init_p_do_apply,...}]}} in context start_error

tonnenpinguin commented 6 years ago

I'm seeing the same issue as @manchoz. This is on a clean install on a raspberry pi 3 running the latest raspbian.

emqplus commented 6 years ago

@manchoz @tonnenpinguin This issue has been fixed in esockd library. But both the emq-sn and emqttd projects still depends on the v5.2 of esockd.

I tagged esockd v5.2.1 and fixed the dependencies in the Makefile. Please clean and build the EMQ broker from latest master branch.

tonnenpinguin commented 6 years ago

Now it works :) Thanks @emqplus!

manchoz commented 6 years ago

Confirmed working for me too. Thanks @emqplus!

tonnenpinguin commented 5 years ago

Now I'm running into the same issue again after upgrading to 3.0 :(

Any ideas @emqplus?

gilbertwong96 commented 5 years ago

I'm working on this project now ,please wait for emqx3.0rc1 2018年10月9日 +0800 PM8:04 Berni notifications@github.com,写道:

Now I'm running into the same issue again after upgrading to 3.0 :(

Any ideas @emqplushttps://github.com/emqplus?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/emqx/emqx-sn/issues/66#issuecomment-428166073, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATh-0wNYQP3dmzvKaVoo3TveN5h8tRMXks5ujJDKgaJpZM4Rf1qo.

tonnenpinguin commented 5 years ago

Thanks for the quick reply! Is there an ETA available already?

gilbertwong96 commented 5 years ago

2018.10.20 2018年10月9日 +0800 PM8:11 Berni notifications@github.com,写道:

Thanks for the quick reply! Is there an ETA available already?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/emqx/emqx-sn/issues/66#issuecomment-428168159, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATh-05L9OeFtEDcEfhsZ7NxRYOar_bnGks5ujJKIgaJpZM4Rf1qo.

HJianBo commented 4 years ago

Hi, guys. Sorry so delay replying here

We will ensure it before v4.0 release