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

MQTT connection resets #2

Open
zachjacobs opened this issue Oct 9, 2019 · 2 comments
Open

MQTT connection resets #2

zachjacobs opened this issue Oct 9, 2019 · 2 comments

Comments

@zachjacobs
Copy link

Hello, I am having an issue running the esp32-ota example on a base install of Thingsboard PE. The ESP32 has the following error. I'm using ESP-IDF v3.2.3.

I (83925) MQTT_CLIENT: Sending MQTT CONNECT message, type: 1, id: 0000
I (84845) tb_ota: Connected to MQTT broker mqtt://****, on port 1883
I (84845) tb_ota: Waiting for shared attributes response
free message
free message
free message
E (84885) MQTT_CLIENT: mqtt_message_receive: received a message with an invalid header=0x42
E (84885) MQTT_CLIENT: mqtt_process_receive: mqtt_message_receive() returned -1
W (85845) tb_ota: WAIT_OTA_CONFIG_FETCHED state, MQTT not connected, wait for the connect
W (86845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (87845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (88845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (89845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (90845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (91845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect
W (92845) tb_ota: WAIT_MQTT state, MQTT not connected, wait for the connect

And Thingsboard error version 2.4.1:

2019-10-09 12:10:45,793 [nioEventLoopGroup-6-8] INFO  o.t.s.t.mqtt.MqttTransportHandler - [fe0d8200-85a9-45a9-****-****] Processing connect msg for client: ESP32_****!
2019-10-09 12:10:45,794 [nioEventLoopGroup-6-8] INFO  o.t.s.t.mqtt.MqttTransportHandler - [fe0d8200-85a9-45a9- ****-****] Processing connect msg for client with user name: ****
2019-10-09 12:10:45,795 [ForkJoinPool-9-worker-25] INFO  o.t.s.t.mqtt.MqttTransportHandler - [fe0d8200-85a9-45a9-****-****] Client connected!
2019-10-09 12:10:46,752 [nioEventLoopGroup-6-8] ERROR o.t.s.t.mqtt.MqttTransportHandler - [fe0d8200-85a9-45a9-****-****] Unexpected Exception
java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
	at sun.nio.ch.IOUtil.read(IOUtil.java:192)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
@simonbogh
Copy link

Experiencing the same. Did you find a solution for this @zachjacobs ?

@aljimgar
Copy link

@simonbogh @zachjacobs I have solved this problem using esp-idf 3.2
https://github.com/espressif/esp-idf/releases/tag/v3.2

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

3 participants