{"action":"created","issue":{"url":"https://api.github.com/repos/erlio/vernemq/issues/151","repository_url":"https://api.github.com/repos/erlio/vernemq","labels_url":"https://api.github.com/repos/erlio/vernemq/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/erlio/vernemq/issues/151/comments","events_url":"https://api.github.com/repos/erlio/vernemq/issues/151/events","html_url":"https://github.com/erlio/vernemq/issues/151","id":159763532,"number":151,"title":"SSL Connection Error","user":{"login":"hbahn","id":13863157,"avatar_url":"https://avatars.githubusercontent.com/u/13863157?v=3","gravatar_id":"","url":"https://api.github.com/users/hbahn","html_url":"https://github.com/hbahn","followers_url":"https://api.github.com/users/hbahn/followers","following_url":"https://api.github.com/users/hbahn/following{/other_user}","gists_url":"https://api.github.com/users/hbahn/gists{/gist_id}","starred_url":"https://api.github.com/users/hbahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbahn/subscriptions","organizations_url":"https://api.github.com/users/hbahn/orgs","repos_url":"https://api.github.com/users/hbahn/repos","events_url":"https://api.github.com/users/hbahn/events{/privacy}","received_events_url":"https://api.github.com/users/hbahn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2016-06-11T08:45:34Z","updated_at":"2016-06-19T04:58:17Z","closed_at":null,"body":"HI. This is Hongbeom. \r\n\r\nI have been deploying VerneMQ solution into our system.\r\nHowever, I have found several SSL-connection-releated issues and errors.\r\nCould you review these errors and help me to find out solutions?\r\nPlease find the attached series of logs (error, crash, console). \r\n\r\n## Error Log\r\n```\r\n2016-06-11 16:17:51.237 [error] <0.450.0> gen_fsm <0.450.0> in state hello terminated with reason: bad argument in call to ets:select_delete(undefined, [{{{undefined,'_','_'},'_'},[],[true]}]) in ets:match_delete/2 line 655\r\n```\r\n\r\n## Crash Log\r\n```\r\n2016-06-11 16:17:51 =ERROR REPORT====\r\n** State machine <0.450.0> terminating\r\n** Last message in was {'$gen_sync_all_state_event',{<0.451.0>,#Ref<0.0.0.10886>},{start,5000}}\r\n** When State == hello\r\n**      Data  == [{data,[{\"StateData\",{state,server,{#Ref<0.0.0.10885>,<0.451.0>},gen_tcp,tls_connection,tcp,tcp_closed,tcp_error,\"localhost\",8883,#Port<0.10349>,{ssl_options,tls,[{3,3}],verify_none,{#Fun<vmq_ssl.0.22150846>,no_crl},#Fun<ssl.8.125280099>,false,false,undefined,1,<<\"/svc/iot/SSL/cert.pem\">>,\"***\",<<\"/svc/iot/SSL/key.pem\">>,\"***\",\"***\",\"***\",<<>>,\"***\",undefined,undefined,\"***\",\"***\",[<<0,9>>,<<\"A\\f\">>,<<192,2>>,<<0,21>>,<<0,4>>,<<0,5>>,<<192,17>>,<<192,7>>,<<0,47>>,<<192,14>>,<<192,4>>,<<0,50>>,<<0,51>>,<<192,19>>,<<\"A\\t\">>,<<0,10>>,<<\"A\\r\">>,<<192,3>>,<<0,19>>,<<0,22>>,<<192,18>>,<<\"A\\b\">>,<<0,53>>,<<192,15>>,<<192,5>>,<<0,56>>,<<0,57>>,<<192,20>>,<<\"A\\n\">>,<<0,60>>,<<0,64>>,<<0,103>>,<<\"A)\">>,<<\"A%\">>,<<\"A'\">>,<<\"A#\">>,<<0,61>>,<<0,106>>,<<0,107>>,<<\"A*\">>,<<\"A&\">>,<<\"A(\">>,<<\"A$\">>],#Fun<ssl.1.125280099>,true,268435456,false,undefined,false,undefined,undefined,true,undefined,false,true,false},{socket_options,binary,raw,0,0,false},\"***\",\"***\",\"***\",undefined,\"***\",undefined,ssl_session_cache,undefined,false,undefined,{undefined,undefined},undefined,undefined,\"***\",\"***\",\"***\",undefined,\"***\",\"***\",\"***\",undefined,undefined,undefined,\"***\",{false,first},undefined,undefined,{[],[]},false,true,false,false,undefined,undefined,<0.329.0>}}]}]\r\n** Reason for termination =\r\n** {badarg,[{ets,select_delete,[undefined,[{{{undefined,'_','_'},'_'},[],[true]}]],[]},{ets,match_delete,2,[{file,\"ets.erl\"},{line,655}]},{ssl_pkix_db,remove_certs,2,[{file,\"ssl_pkix_db.erl\"},{line,220}]},{ssl_connection,terminate,3,[{file,\"ssl_connection.erl\"},{line,934}]},{tls_connection,terminate,3,[{file,\"tls_connection.erl\"},{line,326}]},{gen_fsm,terminate,7,[{file,\"gen_fsm.erl\"},{line,595}]},{gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,517}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,237}]}]}\r\n2016-06-11 16:17:51 =CRASH REPORT====\r\n  crasher:\r\n    initial call: tls_connection:init/1\r\n    pid: <0.450.0>\r\n    registered_name: []\r\n    exception exit: {{badarg,[{ets,select_delete,[undefined,[{{{undefined,'_','_'},'_'},[],[true]}]],[]},{ets,match_delete,2,[{file,\"ets.erl\"},{line,655}]},{ssl_pkix_db,remove_certs,2,[{file,\"ssl_pkix_db.erl\"},{line,220}]},{ssl_connection,terminate,3,[{file,\"ssl_connection.erl\"},{line,934}]},{tls_connection,terminate,3,[{file,\"tls_connection.erl\"},{line,326}]},{gen_fsm,terminate,7,[{file,\"gen_fsm.erl\"},{line,595}]},{gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,517}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,237}]}]},[{gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,520}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,237}]}]}\r\n    ancestors: [tls_connection_sup,ssl_sup,<0.135.0>]\r\n    messages: []\r\n    links: [<0.138.0>,#Port<0.10349>]\r\n    dictionary: [{ssl_manager,ssl_manager}]\r\n    trap_exit: true\r\n    status: running\r\n    heap_size: 1598\r\n    stack_size: 27\r\n    reductions: 439\r\n  neighbours:\r\n```\r\n\r\n## Error Log\r\n```\r\n2016-06-11 16:17:51.237 [error] <0.450.0> CRASH REPORT Process <0.450.0> with 0 neighbours exited with reason: bad argument in call to ets:select_delete(undefined, [{{{undefined,'_','_'},'_'},[],[true]}]) in ets:match_delete/2 line 655\r\n```\r\n\r\n## Crash Log\r\n```\r\n2016-06-11 16:17:51 =ERROR REPORT====\r\nRanch listener {{172,18,95,136},8883} had connection process started with vmq_ranch:start_link/4 at <0.451.0> exit with reason: {certfile,{badmatch,[]}}\r\n```\r\n\r\n## Error Log\r\n```\r\n2016-06-11 16:17:51.238 [error] <0.451.0> CRASH REPORT Process <0.451.0> with 0 neighbours crashed with reason: {certfile,{badmatch,[]}} in ranch_ssl:accept_ack/2 line 115\r\n```\r\n\r\n## Error Log\r\n```\r\n2016-06-11 16:17:51.238 [error] <0.138.0> Supervisor tls_connection_sup had child undefined started with {tls_connection,start_link,undefined} at <0.450.0> exit with reason bad argument in call to ets:select_delete(undefined, [{{{undefined,'_','_'},'_'},[],[true]}]) in ets:match_delete/2 line 655 in context child_terminated\r\n```\r\n\r\n## Error Log\r\n```\r\n2016-06-11 16:17:51.238 [error] <0.451.0> Ranch listener {{172,18,95,136},8883} terminated with reason: {certfile,{badmatch,[]}}\r\n```\r\n\r\nThanks in advance.\r\nHongbeom."},"comment":{"url":"https://api.github.com/repos/erlio/vernemq/issues/comments/226979649","html_url":"https://github.com/erlio/vernemq/issues/151#issuecomment-226979649","issue_url":"https://api.github.com/repos/erlio/vernemq/issues/151","id":226979649,"user":{"login":"hbahn","id":13863157,"avatar_url":"https://avatars.githubusercontent.com/u/13863157?v=3","gravatar_id":"","url":"https://api.github.com/users/hbahn","html_url":"https://github.com/hbahn","followers_url":"https://api.github.com/users/hbahn/followers","following_url":"https://api.github.com/users/hbahn/following{/other_user}","gists_url":"https://api.github.com/users/hbahn/gists{/gist_id}","starred_url":"https://api.github.com/users/hbahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbahn/subscriptions","organizations_url":"https://api.github.com/users/hbahn/orgs","repos_url":"https://api.github.com/users/hbahn/repos","events_url":"https://api.github.com/users/hbahn/events{/privacy}","received_events_url":"https://api.github.com/users/hbahn/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T04:58:17Z","updated_at":"2016-06-19T04:58:17Z","body":"Based on Erlio's helps, we found the problem that our CA signed certification has a whitespace (a char) each line and it causes parsing errors on Erlang SSL module.\r\n\r\nSimply removing the whitespace we solve it.\r\n\r\nThanks for your help. please close this issue."}}
{"actor":{"display_login":"hbahn"}}