basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.94k stars 536 forks source link

riak-ts - no function clause matching ssl_cipher:hash_algorithm #918

Open hn0pw opened 7 years ago

hn0pw commented 7 years ago

I'm getting an error if ssl is enabled and the riak control page will be opened (https://ip_address_of_listener:port/admin).

2017-08-15 14:51:25.369 [error] <0.2858.0> gen_fsm <0.2858.0> in state hello terminated with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174
2017-08-15 14:51:25.370 [error] <0.2858.0> CRASH REPORT Process <0.2858.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in gen_fsm:terminate/7 line 622
2017-08-15 14:51:25.371 [error] <0.92.0> Supervisor ssl_connection_sup had child undefined started with {tls_connection,start_link,undefined} at <0.2858.0> exit with reason no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in context child_terminated
2017-08-15 14:51:25.378 [error] <0.2508.0> application: mochiweb, "Accept failed error", "{'EXIT',\n    {{function_clause,\n         [{ssl_cipher,hash_algorithm,\"\\b\",\n              [{file,\"ssl_cipher.erl\"},{line,1174}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1488}]},\n          {ssl_handshake,dec_hello_extensions,2,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {tls_handshake,decode_handshake,3,\n              [{file,\"tls_handshake.erl\"},{line,236}]},\n          {tls_handshake,get_tls_handshake_aux,3,\n              [{file,\"tls_handshake.erl\"},{line,203}]},\n          {tls_connection,next_state,4,\n              [{file,\"tls_connection.erl\"},{line,2556}]},\n          {gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,505}]}]},\n     {gen_fsm,sync_send_all_state_event,\n         [<0.2858.0>,{start,infinity},infinity]}}}"
2017-08-15 14:51:25.379 [error] <0.2508.0> CRASH REPORT Process <0.2508.0> with 0 neighbours exited with reason: {error,accept_failed} in mochiweb_acceptor:init/3 line 33
2017-08-15 14:51:25.379 [error] <0.315.0> {mochiweb_socket_server,320,{acceptor_error,{error,accept_failed}}}
2017-08-15 14:51:25.379 [error] <0.2859.0> gen_fsm <0.2859.0> in state hello terminated with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174
2017-08-15 14:51:25.379 [error] <0.2859.0> CRASH REPORT Process <0.2859.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in gen_fsm:terminate/7 line 622
2017-08-15 14:51:25.385 [error] <0.92.0> Supervisor ssl_connection_sup had child undefined started with {tls_connection,start_link,undefined} at <0.2859.0> exit with reason no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in context child_terminated
2017-08-15 14:51:25.386 [error] <0.2513.0> application: mochiweb, "Accept failed error", "{'EXIT',\n    {{function_clause,\n         [{ssl_cipher,hash_algorithm,\"\\b\",\n              [{file,\"ssl_cipher.erl\"},{line,1174}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1488}]},\n          {ssl_handshake,dec_hello_extensions,2,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {tls_handshake,decode_handshake,3,\n              [{file,\"tls_handshake.erl\"},{line,236}]},\n          {tls_handshake,get_tls_handshake_aux,3,\n              [{file,\"tls_handshake.erl\"},{line,203}]},\n          {tls_connection,next_state,4,\n              [{file,\"tls_connection.erl\"},{line,2556}]},\n          {gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,505}]}]},\n     {gen_fsm,sync_send_all_state_event,\n         [<0.2859.0>,{start,infinity},infinity]}}}"
2017-08-15 14:51:25.387 [error] <0.2513.0> CRASH REPORT Process <0.2513.0> with 0 neighbours exited with reason: {error,accept_failed} in mochiweb_acceptor:init/3 line 33
2017-08-15 14:51:25.410 [error] <0.2860.0> gen_fsm <0.2860.0> in state hello terminated with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174
2017-08-15 14:51:25.410 [error] <0.2860.0> CRASH REPORT Process <0.2860.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in gen_fsm:terminate/7 line 622
2017-08-15 14:51:25.410 [error] <0.92.0> Supervisor ssl_connection_sup had child undefined started with {tls_connection,start_link,undefined} at <0.2860.0> exit with reason no function clause matching ssl_cipher:hash_algorithm(8) line 1174 in context child_terminated
2017-08-15 14:51:25.411 [error] <0.2515.0> application: mochiweb, "Accept failed error", "{'EXIT',\n    {{function_clause,\n         [{ssl_cipher,hash_algorithm,\"\\b\",\n              [{file,\"ssl_cipher.erl\"},{line,1174}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n              [{file,\"ssl_handshake.erl\"},{line,1488}]},\n          {ssl_handshake,dec_hello_extensions,2,\n              [{file,\"ssl_handshake.erl\"},{line,1487}]},\n          {tls_handshake,decode_handshake,3,\n              [{file,\"tls_handshake.erl\"},{line,236}]},\n          {tls_handshake,get_tls_handshake_aux,3,\n              [{file,\"tls_handshake.erl\"},{line,203}]},\n          {tls_connection,next_state,4,\n              [{file,\"tls_connection.erl\"},{line,2556}]},\n          {gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,505}]}]},\n     {gen_fsm,sync_send_all_state_event,\n         [<0.2860.0>,{start,infinity},infinity]}}}"
2017-08-15 14:51:25.411 [error] <0.2515.0> CRASH REPORT Process <0.2515.0> with 0 neighbours exited with reason: {error,accept_failed} in mochiweb_acceptor:init/3 line 33
2017-08-15 14:51:25.471 [error] <0.315.0> {mochiweb_socket_server,320,{acceptor_error,{error,accept_failed}}}
2017-08-15 14:51:25.572 [error] <0.315.0> {mochiweb_socket_server,320,{acceptor_error,{error,accept_failed}}}

Without ssl all connections working fine

OS: Ubuntu 16.04.3 LTS Riak version: riak-ts 1.5.2 (from https://packagecloud.io/basho/riak-ts)

zrhoffman commented 4 years ago

This is an issue with unknown hash_sign algorithms for all versions of Riak built with Erlang/OTP versions before basho/otp release OTP-17.5.6.5. It was fixed in basho/otp@d9fd104e64.

See: http://erlang.org/pipermail/erlang-questions/2015-June/084868.html

Aside from building with a new enough version of basho/otp, one workaround is using TLS 1.1 instead of 1.2+.