Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] two-way communication

Hi Roger,

At the Ubuntu server, instead of apt-get upgrade, I did apt-get install mosquitto mosquitto-dev

Long story short, here is the error message and the configuration file that worked perfectly in the old version.

Setting up mosquitto (2.0.15a-0mosquitto1~focal1) ...
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 "restart" failed.
● mosquitto.service - Mosquitto MQTT Broker
     Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2022-08-18 15:20:12 +03; 6ms ago
       Docs: man:mosquitto.conf(5)
             man:mosquitto(8)
    Process: 2612 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 2613 ExecStartPre=/bin/chown mosquitto:mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
    Process: 2621 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
    Process: 2622 ExecStartPre=/bin/chown mosquitto:mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
    Process: 2623 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
   Main PID: 2623 (code=exited, status=1/FAILURE)

Aug 18 15:20:13 nbs systemd[1]: Starting Mosquitto MQTT Broker...
Aug 18 15:20:13 nbs mosquitto[2666]: 1660825213: Loading config file /etc/mosquitto/conf.d/broker.conf
Aug 18 15:20:13 nbs systemd[1]: mosquitto.service: Main process exited, code=exited, status=1/FAILURE
Aug 18 15:20:13 nbs systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Aug 18 15:20:13 nbs systemd[1]: Failed to start Mosquitto MQTT Broker.
Aug 18 15:20:14 nbs systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 5.
Aug 18 15:20:14 nbs systemd[1]: Stopped Mosquitto MQTT Broker.
Aug 18 15:20:14 nbs systemd[1]: mosquitto.service: Start request repeated too quickly.
Aug 18 15:20:14 nbs systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Aug 18 15:20:14 nbs systemd[1]: Failed to start Mosquitto MQTT Broker.
dpkg: error processing package mosquitto (--configure):
 installed mosquitto package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mosquitto-dev:
 mosquitto-dev depends on mosquitto (<< 2.0.15a-0mosquitto1~focal1.1~); however:
  Package mosquitto is not configured yet.
 mosquitto-dev depends on mosquitto (>= 2.0.15a-0mosquitto1~focal1); however:
  Package mosquitto is not configured yet.

dpkg: error processing package mosquitto-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mosquitto
 mosquitto-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)




ahmett@nbs:/etc/mosquitto/conf.d$ vi broker.conf

listener 8883
tls_version tlsv1.3
ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/certs/nbstakibi.crt
keyfile /etc/mosquitto/certs/nbstakibi.key
require_certificate true
max_inflight_messages 1
max_queued_messages 6000


Ahmet Tekelioglu
+90 (530) 410 9807

On 18 Aug 2022, at 01:11, Roger Light <roger@xxxxxxxxxx> wrote:

Hi Ahmet,

I haven't heard of anything like that, sorry. Do you have any more
details of how exactly you are setting things up?

Regards,

Roger

On Wed, 17 Aug 2022 at 11:01, Ahmet Tekelioglu via mosquitto-dev
<mosquitto-dev@xxxxxxxxxxx> wrote:

Hello,

I am using mosquitto in an application that collects telemetry data form several dozen clients. I have already activated the MQTT/TLS parameters and selected relatively safe TLS parameters. However, partly out of curiosity, I am also implementing the Diffir-Hellman protocol for key exchange. The protocol itself works fine and produces the same key at both ends, the client and the server. It is possible to exchange keys many times and that part appears to work flawlessly.

However, after the first key exchange, I find that the telemetry data arriving from the clients becomes erratic so that only one third is saved to the database. Before the Diffie-Hellman protocol, data transfer was always one-way, from the clients to the server. The trouble started when I began to send D-H responses to the client from the server. Any clues?

Has anybody run into unexpected behaviour after two-way messaging?

Ahmet Tekelioglu
+90 (530) 410 9807
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top