Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Socket error on client

The other option is to use the current `retain_available` option,
which if set to false will disconnect clients that publish messages
with the retain bit set. I still think it would be useful to have
bridge specific options, but this should solve everything for your
situation, excepting that clients will still have to know not to send
a retain bit.

Regards,

Roger

On Tue, 3 Sep 2019 at 18:55, Roger Light <roger@xxxxxxxxxx> wrote:
>
> Hi Matthew,
>
> You're quite right. I had forgotten about the notification topics and
> retained messages being rejected, sorry about that. I agree with Greg
> - try_private is a option (inherited from RSMB) that enables certain
> features for bridges that are not compliant with the spec. They aren't
> unique to Mosquitto, but obviously not all 3.1.1 brokers support them.
> Once everybody moves to MQTT v5 it will be a moot point by the way,
> those features are part of the spec. Adding an option to restrict the
> setting of the retain flag for a bridge seems like the sensible option
> here. So something like `bridge_allow_retain`, which if set to false
> would remove the retain bit from any messages sent out from the
> bridge.
>
> Regards,
>
> Roger
>
> On Tue, 3 Sep 2019 at 16:55, matthew stanger <stangerm2@xxxxxxxxx> wrote:
> >
> > Hi Roger,
> >
> > Thanks for the reply.
> >
> >> You want `try_private false`.
> >
> > Set, alone didn't seem to make a difference.
> >
> > I did find this put out by AWS https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html: Summary: they don't follow a few MQTT 3.1.1 standards thus the following setting in the broker conf will cause them to kick you >_<.
> > Specifically watch out for these two things:
> > notifications true (.conf)
> > Sending retained message
> >
> > Once these were removed connection worked. That second one is specifically frustrating because if another dev accidentally pub's something to the local broker with `retain true` the local broker will go into an indefinite loop of getting kicked by AWS. Should the `try_private false` be ignoring this setting for the remote broker topics?
> >
> >
> > On Sat, Aug 31, 2019 at 5:09 AM Roger Light <roger@xxxxxxxxxx> wrote:
> >>
> >> Hi Matthew,
> >>
> >> You want `try_private false`. If this is set to true, Mosquitto
> >> bridges try to do some non-standard things that not all other brokers
> >> like. These extra things are to forward on the retained bit, and not
> >> return messages to the bridge that came from the bridge.
> >>
> >> Regards,
> >>
> >> Roger
> >>
> >> On Fri, 30 Aug 2019 at 19:14, matthew stanger <stangerm2@xxxxxxxxx> wrote:
> >> >
> >> > Using Mosquitto 1.6.4 I'm getting 'Socket error on client' in broker mode to AWS.
> >> >
> >> > First is there anything that can be done to get better debugging as it seems limited as is? I'm also not 100% the server team is setup/conf'd correct but I don't know how I can track things down further given the debugging info. It's a standard AWS IoT setup.
> >> >
> >> > $/usr/local/sbin/mosquitto -v -c /etc/mosquitto/test.conf
> >> > 1567187749: mosquitto version 1.6.4 starting
> >> > 1567187749: Config loaded from /etc/mosquitto/test.conf.
> >> > 1567187749: Opening ipv4 listen socket on port 1883.
> >> > 1567187749: Opening ipv6 listen socket on port 1883.
> >> > 1567187749: Warning: Mosquitto should not be run as root/administrator.
> >> > 1567187749: Connecting bridge aws-lyr-tv (a2zz4e1ymhks3x.iot.us-west-2.amazonaws.com:8883)
> >> > 1567187749: Bridge lyr-stb-emb-test sending CONNECT
> >> > 1567187749: Socket error on client local.lyr-stb-emb-test, disconnecting.
> >> > ... repeating socket error
> >> >
> >> > Conf:
> >> >   user root
> >> >   connection aws-lyr-tv
> >> >   address a2zz4e1ymhks3x.iot.us-west-2.amazonaws.com:8883
> >> >   topic # in 1
> >> >   #topic ${DEVICE}/# both 1
> >> >   #bridge_protocol_version mqttv311
> >> >   bridge_insecure true
> >> >   cleansession false
> >> >   clientid lyr-stb-emb-test
> >> >   start_type automatic
> >> >   try_private true
> >> >   bridge_cafile /home/matt/tmp/certs/test.ca
> >> >   bridge_certfile /home/matt/tmp/certs/cert.pem
> >> >   bridge_keyfile /home/matt/tmp/certs/prv.pem
> >> >   bridge_tls_version tlsv1.2
> >> >   log_dest stdout
> >> >   persistence true
> >> >   persistence_file /tmp/mosquitto.db
> >> >
> >> > I can connect with these certs using `openssl s_client`:
> >> > SSL-Session:
> >> >     Protocol  : TLSv1.2
> >> >     Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
> >> >     Session-ID: 2D31848FD76C0EF6AD84B905FE8F68192B8F2148B0A6351A2AB95966DCF4DF11
> >> >     Session-ID-ctx:
> >> >     Master-Key: B88F724070CCCCE47E062B58C1614BB699BCB04785533AB4494C7AF19AC32C420FDA8BBB68111BB3CD040FEB4F9B006C
> >> >     PSK identity: None
> >> >     PSK identity hint: None
> >> >     SRP username: None
> >> >     Start Time: 1567188263
> >> >     Timeout   : 7200 (sec)
> >> >     Verify return code: 0 (ok)
> >> >     Extended master secret: yes
> >> >
> >> > If someone could point down how I could debug the my broker I'm happy to be self serving :)
> >> >
> >> > Thanks
> >> > _______________________________________________
> >> > mosquitto-dev mailing list
> >> > mosquitto-dev@xxxxxxxxxxx
> >> > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> >> > https://www.eclipse.org/mailman/listinfo/mosquitto-dev
> >> _______________________________________________
> >> mosquitto-dev mailing list
> >> mosquitto-dev@xxxxxxxxxxx
> >> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> >> https://www.eclipse.org/mailman/listinfo/mosquitto-dev
> >
> > _______________________________________________
> > mosquitto-dev mailing list
> > mosquitto-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > https://www.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top