[MQTT] Unexpected exception while processing MQTT message

Good morning.
I have a problem since I updated to 2.5.
Every time I restart openhab application on the logs I can read a loop of errors like this:

2019-12-20 08:25:54.334 [ERROR] [.moquette.broker.NewNettyMQTTHandler] - Unexpected exception while processing MQTT message. Closing Netty channel. CId=mqttjs_adc289ba

java.io.IOException: invalid massage

at io.moquette.broker.NettyUtils.validateMessage(NettyUtils.java:86) ~[?:?]

at io.moquette.broker.metrics.MQTTMessageLogger.logMQTTMessage(MQTTMessageLogger.java:61) ~[?:?]

at io.moquette.broker.metrics.MQTTMessageLogger.logMQTTMessageRead(MQTTMessageLogger.java:50) ~[?:?]

at io.moquette.broker.metrics.MQTTMessageLogger.channelRead(MQTTMessageLogger.java:45) ~[?:?]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

at io.moquette.broker.metrics.MessageMetricsHandler.channelRead(MessageMetricsHandler.java:50) [bundleFile:?]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) [bundleFile:4.1.42.Final]

at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:315) [bundleFile:4.1.42.Final]

at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:349) [bundleFile:4.1.42.Final]

at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:283) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

at io.moquette.broker.metrics.BytesMetricsHandler.channelRead(BytesMetricsHandler.java:51) [bundleFile:?]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) [bundleFile:4.1.42.Final]

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [bundleFile:4.1.42.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [bundleFile:4.1.42.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [bundleFile:4.1.42.Final]

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [bundleFile:4.1.42.Final]

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [bundleFile:4.1.42.Final]

at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Caused by: io.netty.handler.codec.DecoderException: too large message: 8102 bytes

at io.netty.handler.codec.mqtt.MqttDecoder.decode(MqttDecoder.java:88) ~[?:?]

at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:505) ~[?:?]

at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) ~[?:?]

... 25 more

If I restart too zigbee2mqtt it stop to log the error.

You are using the integrated MQTT broker.
I strongly recommend that you install mosquitto instead

1 Like

ok, it’s time to leave the integrated broker. is mosquitto installable by the menù of openhabian-cli? is there a guide? :open_mouth:

Google is your friend
If you are using openHABian, it is available in the setup menu

Hi,

is your issue gone now?
i have the same problem , also using the ingetrated broker…

07:10:03.448 [ERROR] [o.moquette.broker.NewNettyMQTTHandler] - Unexpected exception while processing MQTT message. Closing Netty channel. CId=mqttjs_66470cf5
java.io.IOException: invalid massage
at io.moquette.broker.NettyUtils.validateMessage(NettyUtils.java:86) ~[?:?]
at io.moquette.broker.metrics.MQTTMessageLogger.logMQTTMessage(MQTTMessageLogger.java:61) ~[?:?]
at io.moquette.broker.metrics.MQTTMessageLogger.logMQTTMessageRead(MQTTMessageLogger.java:50) ~[?:?]
at io.moquette.broker.metrics.MQTTMessageLogger.channelRead(MQTTMessageLogger.java:45) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]
at io.moquette.broker.metrics.MessageMetricsHandler.channelRead(MessageMetricsHandler.java:50) [bundleFile:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) [bundleFile:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:315) [bundleFile:4.1.42.Final]
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:349) [bundleFile:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:283) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]
at io.moquette.broker.metrics.BytesMetricsHandler.channelRead(BytesMetricsHandler.java:51) [bundleFile:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) [bundleFile:4.1.42.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [bundleFile:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [bundleFile:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [bundleFile:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [bundleFile:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [bundleFile:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152] Caused by: io.netty.handler.codec.DecoderException: too large message: 9362 bytes
at io.netty.handler.codec.mqtt.MqttDecoder.decode(MqttDecoder.java:88) ~[?:?]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:505) ~[?:?]
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) ~[?:?]
… 25 more

thx
stef

Same Problem here:

[ERROR] [.moquette.broker.NewNettyMQTTHandler] - Unexpected exception while processing MQTT message. Closing Netty channel. CId=DVES_3C1EEE

java.nio.channels.ClosedChannelException: null

	at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:607) [bundleFile:4.1.42.Final]

	at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1364) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:621) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:605) [bundleFile:4.1.42.Final]

	at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:79) [bundleFile:4.1.42.Final]

	at io.moquette.broker.metrics.BytesMetricsHandler.close(BytesMetricsHandler.java:66) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:621) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:605) [bundleFile:4.1.42.Final]

	at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:79) [bundleFile:4.1.42.Final]

	at io.moquette.broker.metrics.MessageMetricsHandler.close(MessageMetricsHandler.java:65) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:621) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:605) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:467) [bundleFile:4.1.42.Final]

	at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:969) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannel.close(AbstractChannel.java:231) [bundleFile:4.1.42.Final]

	at io.moquette.broker.NewNettyMQTTHandler.channelRead(NewNettyMQTTHandler.java:62) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.moquette.broker.metrics.MQTTMessageLogger.channelRead(MQTTMessageLogger.java:46) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.moquette.broker.metrics.MessageMetricsHandler.channelRead(MessageMetricsHandler.java:50) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) [bundleFile:4.1.42.Final]

	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.moquette.broker.metrics.BytesMetricsHandler.channelRead(BytesMetricsHandler.java:51) [bundleFile:?]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [bundleFile:4.1.42.Final]

	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [bundleFile:4.1.42.Final]

	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [bundleFile:4.1.42.Final]

	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) [bundleFile:4.1.42.Final]

	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [bundleFile:4.1.42.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [bundleFile:4.1.42.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [bundleFile:4.1.42.Final]

	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [bundleFile:4.1.42.Final]

	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [bundleFile:4.1.42.Final]

	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]

	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]

	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

I tried to install Mosquitto from the openhabian config menu and get this error message:

The following NEW packages will be installed:
  libev4 libmosquitto1 libuv1 libwebsockets8 mosquitto mosquitto-clients
0 upgraded, 6 newly installed, 0 to remove and 58 not upgraded.
Need to get 484 kB of archives.
After this operation, 1,054 kB of additional disk space will be used.
Get:1 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf libev4 armhf 1:4.25-1 [34.5 kB]
Get:2 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf libmosquitto1 armhf 1.5.7-1+deb10u1 [57.6 kB]
Get:3 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf libuv1 armhf 1.24.1-1 [96.7 kB]
Get:4 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf libwebsockets8 armhf 2.0.3-3 [85.6 kB]
Get:5 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf mosquitto armhf 1.5.7-1+deb10u1 [143 kB]
Get:6 http://mirror.netcologne.de/raspbian/raspbian buster/main armhf mosquitto-clients armhf 1.5.7-1+deb10u1 [66.8 kB]
Fetched 484 kB in 2s (277 kB/s)
Selecting previously unselected package libev4:armhf.
(Reading database ... 47745 files and directories currently installed.)
Preparing to unpack .../0-libev4_1%3a4.25-1_armhf.deb ...
Unpacking libev4:armhf (1:4.25-1) ...
Selecting previously unselected package libmosquitto1:armhf.
Preparing to unpack .../1-libmosquitto1_1.5.7-1+deb10u1_armhf.deb ...
Unpacking libmosquitto1:armhf (1.5.7-1+deb10u1) ...
Selecting previously unselected package libuv1:armhf.
Preparing to unpack .../2-libuv1_1.24.1-1_armhf.deb ...
Unpacking libuv1:armhf (1.24.1-1) ...
Selecting previously unselected package libwebsockets8:armhf.
Preparing to unpack .../3-libwebsockets8_2.0.3-3_armhf.deb ...
Unpacking libwebsockets8:armhf (2.0.3-3) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../4-mosquitto_1.5.7-1+deb10u1_armhf.deb ...
Unpacking mosquitto (1.5.7-1+deb10u1) ...
Selecting previously unselected package mosquitto-clients.
Preparing to unpack .../5-mosquitto-clients_1.5.7-1+deb10u1_armhf.deb ...
Unpacking mosquitto-clients (1.5.7-1+deb10u1) ...
Setting up libmosquitto1:armhf (1.5.7-1+deb10u1) ...
Setting up libev4:armhf (1:4.25-1) ...
Setting up mosquitto-clients (1.5.7-1+deb10u1) ...
Setting up libuv1:armhf (1.24.1-1) ...
Setting up libwebsockets8:armhf (2.0.3-3) ...
Setting up mosquitto (1.5.7-1+deb10u1) ...
Job for mosquitto.service failed because the control process exited with error code.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mosquitto, action "start" failed.
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
   Loaded: loaded (/lib/systemd/system/mosquitto.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-04-29 10:10:48 CEST; 90ms ago
     Docs: man:mosquitto.conf(5)
           man:mosquitto(8)
  Process: 30410 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
 Main PID: 30410 (code=exited, status=1/FAILURE)

Apr 29 10:10:49 openhab systemd[1]: Starting Mosquitto MQTT v3.1/v3.1.1 Broker...
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Main process exited, code=exited, status=1/FAILURE
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Apr 29 10:10:49 openhab systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker.
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Service RestartSec=100ms expired, scheduling restart.
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 5.
Apr 29 10:10:49 openhab systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker.
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Start request repeated too quickly.
Apr 29 10:10:49 openhab systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Apr 29 10:10:49 openhab systemd[1]: Failed to start Mosquitto MQTT v3.1/v3.1.1 Broker.
dpkg: error processing package mosquitto (--configure):
 installed mosquitto package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-7~deb10u2+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 mosquitto
Updating FireMotD available updates count ...
E: Sub-process /usr/bin/dpkg returned an error code (1)
FAILED

I am out of ideas now.

Current advice from users is to avoid built in Moquette broker, the authors have stopped supporting and it has begun to show glitches in openHAB use.

Use an alternative broker, Mosquitto is suggested.

Thatswhy I tried to install Mosquitto via openhabian-config. But that is failing, too.
Or is Mosquitto via openhabian-config considered as an embedded broker as well?

I know nothing about openhabian. You might need to offer a bit more detail than “failing” to get help with that.

I don’ want to sound rude an appreciate any help. But what more can/should I provide than the openhab error message from my first post after trying to install mosquitto?
I use openhabian 2.5.1-2 on a raspberry pi.
And without mqtt this project is dead for me.

So you had installed the embedded broker ( moquette) and did observe the posted first error messages. Did you remove that one from the system?
Once trying to install mosquito you again observed problems, the posted messages suggested to have a look into with:
See "systemctl status mosquitto.service" and "journalctl -xe" for details.

Did you look there?

Thx for the reply. I didn’t remove moquette, yet. I tried to first install the new one.
I looked into the status and and journal and maybe there is the issue: the jounal detected an undervoltage:

The unit packagekit.service has successfully entered the 'dead' state.
Apr 29 16:03:10 openhab kernel: Under-voltage detected! (0x00050005)
Apr 29 16:03:17 openhab kernel: Voltage normalised (0x00000000)
Apr 29 16:03:35 openhab kernel: Under-voltage detected! (0x00050005)
Apr 29 16:03:40 openhab sudo[10423]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/bin/journal
Apr 29 16:03:40 openhab sudo[10423]: pam_unix(sudo:session): session opened for user root by openhabian(uid=0)
Apr 29 16:03:40 openhab kernel: Voltage normalised (0x00000000)

I will try to solve that with a stronger power supply (using the original one atm).

IMHO Two MQTT brokers with default setup will into a problem, can’t say if that was your observed problem. However I would delete moquette.