【发布时间】:2015-08-20 06:30:21
【问题描述】:
以下是代码 sn-p,我在其中打开一个套接字以在其上写入 APNS 通知:
get_socket()->
%%Options
Options = [{certfile, ?Cert}, {keyfile, ?Key}, {mode, binary}],
%%ssl connection
ssl:connect(?Address, ?Port, Options, infinity)
.
close_socket(Socket)->
ssl:close(Socket).
我的 ejabberd.log 文件中出现以下崩溃
2015-06-05 12:33:17.112 [error] <0.3134.0> gen_fsm <0.3134.0> in state certify terminated with reason: no function clause matching ssl_cipher:hash_algorithm(239) line 1174
2015-06-05 12:33:17.113 [error] <0.3134.0> CRASH REPORT Process <0.3134.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(239) line 1174 in gen_fsm:terminate/7 line 622
2015-06-05 12:33:17.113 [error] <0.99.0> Supervisor tls_connection_sup had child undefined started with {tls_connection,start_link,undefined} at <0.3134.0> exit with reason no function clause matching ssl_cipher:hash_algorithm(239) line 1174 in context child_terminated
2015-06-05 12:33:17.113 [error] <0.3133.0> CRASH REPORT Process <0.3133.0> with 0 neighbours exited with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"ï",[{file,"ssl_cipher.erl"},{line,1174}]},{ssl_handshake,'-decode_handshake/3-blc$^0/1-0-',1,[{file,"ssl_handshake.erl"},{line,898}]},{ssl_handshake,'-deode_handshake/3-blc$^0/1-0-',1,[{file,"ssl_handshake.erl"},{line,899}]},{ssl_handshake,decode_handshake,3,[{file,"ssl_handshake.erl"},{line,898}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handshake.erl"},{line,153}]},{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,454}]},...]},...} in gen_fsm:sync_send_all_state_event/3 line 240
2015-06-05 12:33:17.113 [error] <0.377.0> Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.3133.0> exit with reason {{function_clause,[{ssl_cipher,hash_algorithm,"ï",[{file,"ssl_cipher.erl"},{line,1174}]},{ssl_handshake,'-decode_handshake/3-blc$^0/1-0-',1,[file,"ssl_handshake.erl"},{line,898}]},{ssl_handshake,'-decode_handshake/3-blc$^0/1-0-',1,[{file,"ssl_handshake.erl"},{line,899}]},{ssl_handshake,decode_handshake,3,[{file,"ssl_handshake.erl"},{line,898}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handshake.erl"},{line,153}]},{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,454}]},...]},...} in context child_terminated
2015-06-05 12:33:17.372 [debug] <0.3074.0>@ejabberd_receiver:process_data:343 Received XML on stream = <<"<iq type=\"get\" to=\"+919333333333@devlab\" id=\"vCard-Temp2C753D87-6F56-48D5-B3CF-09C1B1DF46F7\"><vCard xmlns=\"vcard-temp\"/></iq>">>
2015-06-05 12:33:17.372 [debug] <0.3074.0>@shaper:update:117 State: {maxrate,1000,623.3758292140764,1433496796970483}, Size=125
M=90.80183440963172, I=402.231
可能出了什么问题?
【问题讨论】:
-
你使用的是哪个版本的 Erlang?
-
今天遇到了同样的问题。一定是苹果在他们的服务器上引入了一些变化。
-
几天前也看到了这个问题。重新启动我的服务器修复了生产,但调试令牌仍然无法正常工作。
-
@TrespassersW 我得到这个:** 当状态 == hello ** 数据 == [{data, [{"StateData",{state,client, {#Ref ,}, gen_tcp,tls_connection,tcp,tcp_closed,tcp_error,"gateway.sandbox.push.apple.com",2195, 等等..
标签: android sockets ssl erlang ejabberd