![]() * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (OUT), TLS handshake, Client hello (1): * Cipher selection: successfully set certificate verify locations: * Connected to (XX.XXX.XX.XXX) port 443 (#0) By carrying out tests using curl (and other systems), we were able to confirm that these systems are able to verify the certificate without any issue. Our problem therefore looked to be with the certificate verification. So if our server is set up to accept tlsv1.2, our quick fix above is useless because it’s the default option in hackney. ![]() Ssl:connect(Host1, Port, Opts1, Timeout).īy default, hackney set the protocol versions to, so the SSL module from Erlang tries tlsv1.2 first and, if it can’t connect, will try tlsv1.1. Opts1 = hackney_util:merge_opts(BaseOpts, Opts), Max_retries: Application.get_env(:arc, :max_retries, 3),īackoff_factor: Application.get_env(:arc, :backoff_factor, 1000),īackoff_max: Application.get_env(:arc, :backoff_max, 30_000),Īfter running this snippet we got the following error: ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'certify', 32, 'at ssl_handshake.erl:1335 generated CLIENT ALERT: Fatal - Handshake Failure - , Timeout: Application.get_env(:arc, :timeout, 10_000), Recv_timeout: Application.get_env(:arc, :recv_timeout, 5_000),Ĭonnect_timeout: Application.get_env(:arc, :connect_timeout, 10_000), Here is a simplified version of the arc library code: # The part of the code required is the bit that deals with downloading the file from our remote server before storing it locally or remotely (on Amazon S3, for example). To get a more detailed error description, our second idea was to run a code snippet taken directly from the arc library. Unfortunately, we got exactly the same error message and it didn’t help us understand what was happening at all. Understanding the issueįirst, we decided to locally reproduce the error using our own code. The weird thing is that requested files come from our own content delivery network (CDN) and files can be fetched directly via the browser. Recently, we noticed a lot of invalid changeset errors were occurring with the message invalid_file_path during this operation (changesets allow systems to filter, cast, validate, and define constraints when manipulating structs). Obviously the endpoint must be public and reachable. A basic use case is a user being able to provide an endpoint for a form rather than a file to upload. An interesting feature of this library is its ability to upload a file from a remote url. In the Elixir application we use on our platform, we utilize the Elixir library arc to manage file uploads (similar to Carrierwave for the Rails community). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |