Skip to content

Bad socket read/write on client __ Unknown Error #2579

@Izerous

Description

@Izerous

I have two mosquitto brokers both are running on Ubuntu 20.04. A test environment running Mosquitto 2.0.10 and a live environment running 2.0.13. And for clarification test has a fraction of the traffic of the live server even the the live server floats at like 7% CPU usage most of the time give or take a little bit.

The current issue is only occurring on the live server not the test server.

I have had a few issues that I have resolved 1 by 1 as they came up. Both are using go auth plugin to talk to separate auth servers (also test & live versions) and some of the calls were far from optimized occasionally causing timeouts. Those calls are now super fast and no longer appear to be relevant to the now current issue.

The live install sees a lot more traffic but considering the low CPU usage i'm not sure if it is relevant since it is no where even near 10% let alone 50% on a dual core machine.

About once every 7-14 days the server seems to reject all traffic and go into a state of full unresponsiveness for about a minute or two causing a ripple through everything connected to it. This affects all client types that are connected C#, JS, Java & Swift based clients.

The Logs look like the following and will last nearly a minute
(Ip addresses and stuff removed)

1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.

1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424491: New connection from [snip] on port [snip].
1656424491: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New client connected from [snip] as [snip]

1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: New connection from [snip] on port [snip].
1656424492: Client [snip] disconnected, not authorised.
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New client connected from [snip] as [snip]
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424492: New connection from [snip] on port [snip].
1656424492: Bad socket read/write on client [snip]: Unknown error.
1656424493: New connection from [snip] on port [snip].
1656424493: Bad socket read/write on client [snip]: Unknown error.
1656424493: New connection from [snip] on port [snip].
1656424493: Bad socket read/write on client [snip]: Unknown error.
1656424493: New connection from [snip] on port [snip].
1656424493: Bad socket read/write on client [snip]: Unknown error.
1656424493: New connection from [snip] on port [snip].

Because these are all thrown as Unknown errors i'm not even sure where to proceed investigating right now.

$SYS/broker/uptime is reporting an uptime over a month (bounced it to change logging) so it isn't like mosquitto is crashing and restarting or anything like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions