表现:输出的json数据输出一部分,截断掉了.所以前端报错.
nginx中报 13: Permission denied
2024/03/07 17:13:10 [crit] 3691151#3691151: *2561 open() "/data/bws/temp/proxy_temp/9/03/0000000039" failed (13: Permission denied) while reading upstream, client: 192.168.60.51, server: omnitest.i.sinotrans.com, request: "GET /serivce/base/region/getAll HTTP/1.1", upstream: "http://127.0.0.1:8001/serivce/base/region/getAll", host: "omnitest.i.sinotrans.com"
连接被对方重设 发送在浏览器和web接口之间. 也就是说请求中间nginx中断了请求导致报错.
通过直接走后端8001服务,数据正常,走80端口就不正常.所以问题在nginx.
nginx 的配置
user nobody;
改为下面的解决问题
user root;
nginx服务重启
因为请求体比较大,nginx写到缓存文件中,但是读取的时候是nobody,导致报没权限.
参考资料: