1. 程式人生 > >記一次rabbitmq的web stomp ssl連線error的錯誤

記一次rabbitmq的web stomp ssl連線error的錯誤

環境說明:

1、系統環境:centos7

2、erlang版本:17.4

3、rabbitmq版本:3.6.1

問題的現象說明:

1、按照官網說明配置了web stomp 的ssl服務(http://www.rabbitmq.com/web-stomp.html)

2、正常執行

3、偶然一天發現瀏覽器無法訪問到web stomp服務無法正常訪問(使用了chrome瀏覽器),360居然神奇的可以訪問~。~

4、找了好久問題之後發現chrome瀏覽器自動升級了(v55.0.2883.87_x64 升級到 56.0.2924.87

查錯:

根據日誌,找到rabbitmq的報錯資訊
=ERROR REPORT==== 27-Feb-2017::11:08:40 ===
Ranch listener https had connection process started with cowboy_protocol:start_link/4 at <0.18429.0> exit with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1196}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,184}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handshake.erl"},{line,155}]},{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,433}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,503}]}]},{gen_fsm,sync_send_all_state_event,[<0.18428.0>,{start,5000},infinity]}}

根據報錯資訊,在谷歌上找到如下說明:

A few months back, Google changed something and their webmaster
tools and, probably, their crawler now crasheYaws when running
on Erlang 17. Here's a typical stack trace:


(幾個月前,谷歌對webmaster工具做了一些修改。或許,他們的爬蟲正在猛撞Yaws伺服器當他在Erlang17上執行時。這裡是一些典型的堆疊資訊:)

** Reason for termination =


** {function_clause,[{ssl_cipher,hash_algorithm,"\b",
[{file,"ssl_cipher.erl"},{line,1196}]},
...

This isn't Yaws' fault, it's SSL in Erlang 17 which can'thandle the
SSL handshake extension that Google use. AFAICT, if you continue running
an HTTPS-only site using Yaws+Erlang 17, you get kicked out of g
oogle's
index, which is a bummer.

(這並不是Yaws的故障,是谷歌的使用者端無法和erlang17上進行ssl握手。這很頭疼,如果你繼續使用Yaws+Erlang17的https,你的服務將不被谷歌支援。)

通過上述描述,我感覺是由於erlang17惹的禍,於是我將erlang 17升級為 erlang 19 。

升級後的環境為:

centos7 + erlang 19 + rabbitmq3.6.1

服務正常了!!!

(具體為何谷歌擯棄了erlang17的 ssl服務,待深究~!)