If this is a public server, it can be someone scanning your app for vulnerabilities, or trying to do unencrypted HTTP requests on an HTTPS port by mistake, or otherwise sending invalid data for whatever reason.
Basically Erlang is saying it received nonsense data.
On the other side of things: I was getting this error as a warning log message because I was attempting to do SSL against an HTTP server that intentionally didn’t do secure connections.
This was the error message:
TLS :client: In state :hello at tls_record.erl:539 generated CLIENT ALERT: Fatal - Unexpected Message
* {:unsupported_record_type, 72}
Changing the connection to go through the default HTTP port instead of the HTTPS port stopped the warning logs.
I had this error message on my dev server after enabling self-signed ssl locally. I served https over a different port (4000 → http, 4001 → https) and my mistake was, that I entered http://localhost:4001 in the browser, instead of https. Since Chrome didn’t show the protocol it was easy to oversee.
I am currently having this issue and these are the common error lines I saw last in my logs that stopped the whole app:
20:15:27.010 [notice] TLS :server: In state :hello at tls_handshake.erl:346 generated SERVER ALERT: Fatal - Insufficient Security
- :no_suitable_ciphers
20:23:56.937 [notice] TLS :server: In state :hello at tls_record.erl:564 generated SERVER ALERT: Fatal - Unexpected Message
- {:unsupported_record_type, 5}
22:12:11.435 [notice] TLS :server: In state :hello at tls_handshake.erl:364 generated SERVER ALERT: Fatal - Protocol Version