环境信息
- EMQX 版本:4.4.3
- 操作系统及版本:centos 8
- 其他
问题描述
2022-04-29T20:39:38.975970+08:00 [error] crasher: initial call: cowboy_clear:connection_process/4, pid: <0.15278.4>, registered_name: [], error: {function_clause,[{cow_http_hd,token_ci_list,[<<226,128,156,117,112,103,114,97,100,101,226,128,157>>,[]],[{file,"cow_http_hd.erl"},{line,3463}]},{cow_http_hd,parse_connection,1,[{file,"cow_http_hd.erl"},{line,1164}]},{cowboy_http,connection_hd_is_close,1,[{file,"cowboy_http.erl"},{line,1333}]},{cowboy_http,maybe_req_close,3,[{file,"cowboy_http.erl"},{line,1306}]},{cowboy_http,after_parse,1,[{file,"cowboy_http.erl"},{line,332}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.1785.0>,<0.1784.0>,ranch_sup,<0.1595.0>], message_queue_len: 0, messages: [], links: [<0.15279.4>,#Port<0.88378>,<0.1785.0>], dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 29, reductions: 2234; neighbours:
2022-04-29T20:39:38.976885+08:00 [error] Ranch listener 'mqtt:ws:8083' had connection process started with cowboy_clear:start_link/4 at <0.15278.4> exit with reason: {function_clause,[{cow_http_hd,token_ci_list,[<<226,128,156,117,112,103,114,97,100,101,226,128,157>>,[]],[{file,"cow_http_hd.erl"},{line,3463}]},{cow_http_hd,parse_connection,1,[{file,"cow_http_hd.erl"},{line,1164}]},{cowboy_http,connection_hd_is_close,1,[{file,"cowboy_http.erl"},{line,1333}]},{cowboy_http,maybe_req_close,3,[{file,"cowboy_http.erl"},{line,1306}]},{cowboy_http,after_parse,1,[{file,"cowboy_http.erl"},{line,332}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
配置文件及日志
upstream empx_ws {
server 172.19.70.37:8083 max_fails=2 fail_timeout=30s;
server 172.19.70.38:8083 max_fails=2 fail_timeout=30s;
}
server
{
listen 80;
listen 443 ssl http2;
server_name apiyj.aaa.com;
index index.php index.html index.htm default.php default.htm default.html;
root /apps01/localhost;
ssl_certificate cert_aaa/server.cer;
ssl_certificate_key cert_aaa/server.key;
location / {
proxy_redirect off;
proxy_pass http://empx_ws;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}
access_log /apps01/logs/access.log;
error_log /apps01/logs/error.log;
}