# error.log 分析
日志位置:/var/log/nginx
## 橫向
```
2018/10/13 14:21:20 [warn] 1787#1787: *7557 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/00/0000000002 while reading upstream, client: 223.11.19.15, server: tmc.sxctkj.cc, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "tmc.sxctkj.cc"
```
## 縱向
| 記錄 | 說明 |
| ------------ | ------------ |
| 2018/10/13 14:21:20 | 訪問時間 |
| [warn] | 報警 |
| 1787#1787: *7557 an upstream response is buffered to a temporary file /var/cache/nginx/fastcgi_temp/2/00/0000000002 while reading upstream, | 不知道 |
| client: 223.11.19.15, | 客戶端IP |
| server: tmc.xxctkj.cc, | 服務端訪問地址 |
| request: "GET /phpinfo.php HTTP/1.1", | 訪問的文件 |
| upstream: "fastcgi://127.0.0.1:9000", | fastcgi上游 |
| host: "tmc.sxctkj.cc" | 域名 |
## 相關
https://www.cnblogs.com/aoniboy/p/4866395.html
| 錯誤信息 | 錯誤說明 |
| --- | --- |
| "upstream prematurely(過早的) closed connection" | 請求uri的時候出現的異常,是由于upstream還未返回應答給用戶時用戶斷掉連接造成的,對系統沒有影響,可以忽略 |
| "recv() failed (104: Connection reset by peer)" | (1)服務器的并發連接數超過了其承載量,服務器會將其中一些連接Down掉; (2)客戶關掉了瀏覽器,而服務器還在給客戶端發送數據;
(3)瀏覽器端按了Stop |
| "(111: Connection refused) while connecting to upstream" | 用戶在連接時,若遇到后端upstream掛掉或者不通,會收到該錯誤 |
| "(111: Connection refused) while reading response header from upstream" | 用戶在連接成功后讀取數據時,若遇到后端upstream掛掉或者不通,會收到該錯誤 |
| "(111: Connection refused) while sending request to upstream" | Nginx和upstream連接成功后發送數據時,若遇到后端upstream掛掉或者不通,會收到該錯誤 |
| "(110: Connection timed out) while connecting to upstream" | nginx連接后面的upstream時超時 |
| "(110: Connection timed out) while reading upstream" | nginx讀取來自upstream的響應時超時 |
| "(110: Connection timed out) while reading response header from upstream" | nginx讀取來自upstream的響應頭時超時 |
| "(110: Connection timed out) while reading upstream" | nginx讀取來自upstream的響應時超時 |
| "(104: Connection reset by peer) while connecting to upstream" | upstream發送了RST,將連接重置 |
| "upstream sent invalid header while reading response header from upstream" | upstream發送的響應頭無效 |
| "upstream sent no valid HTTP/1.0 header while reading response header from upstream" | upstream發送的響應頭無效 |
| "client intended to send too large body" | 用于設置允許接受的客戶端請求內容的最大值,默認值是1M,client發送的body超過了設置值 |
| "reopening logs" | 用戶發送kill -USR1命令 |
| "gracefully shutting down", | 用戶發送kill -WINCH命令 |
| "no servers are inside upstream" | upstream下未配置server |
| "no live upstreams while connecting to upstream" | upstream下的server全都掛了 |
| "SSL_do_handshake() failed" | SSL握手失敗 |
| "SSL_write() failed (SSL:) while sending to client" | |
| "(13: Permission denied) while reading upstream" | |
| "(98: Address already in use) while connecting to upstream" | |
| "(99: Cannot assign requested address) while connecting to upstream" | |
| "ngx_slab_alloc() failed: no memory in SSL session shared cache" | ssl_session_cache大小不夠等原因造成 |
| "could not add new SSL session to the session cache while SSL handshaking" | ssl_session_cache大小不夠等原因造成 |
| "send() failed (111: Connection refused)" | |
- centos
- 安裝工具
- 安裝nginx
- 安裝PHP5
- 安裝PHP7.0.1
- 安裝PHP7.0.8
- 安裝redis
- redis允許遠程訪問
- 安裝php之redis擴展
- 安裝mysql
- 配置nginx虛擬機綁定域名
- xdebug下載配置
- phpStorm遠程調試配置
- 報錯解決:安裝PHP7解決問題方法
- 報錯解決:xdebug-解決問題
- yum丟失的解決辦法
- CentOS下安裝JDK的四種方法
- workman
- 某服務器配置情況
- 安裝PHP7.2.17
- 安裝PHP7.1.27
- 安裝MongoDB
- ubuntu
- mac
- window
- phpstrom+wamp+xdebug
- mysql
- MySql創建本地用戶和遠程用戶 并賦予權限
- 自建主從復制-mycat
- 數據庫優化
- 阿里云mysql主從復制
- 報錯解決
- SQL分析
- group by
- Mysql定時備份數據腳本
- MySQL數據庫遠程連接開啟方法
- 啟動報錯systemctl status
- 日志導出
- mysq進程
- mysql查詢正在執行的進程
- 命令
- nginx
- 安裝GIT
- access.log
- error.log分析
- 500 Internal Server Error錯誤
- 502解決方案
- 405 Not Allowed,nginx靜態文件響應post請求
- Linux基本操作
- 創建用戶
- chmod命令詳細用法設置文件的權限
- chown命令
- chgrp命令:改變文件的群組
- Linux 設置定時任務crontab命令
- 其他問題
- Win10 Subsystem Linux : Ubuntu 的root密碼
- 安全問題
- PHP安全設置
- redis
- 安裝
- 安裝2.8.17
- 問題
- 日志分析
- an upstream response is buffered to a temporary file
- too many open files
- worker_connections are not enough
- recv() failed
- 日志
- 系統日志
- apache訪問日志與錯誤日志
- nginx訪問日志與錯誤日志
- php錯誤日志
- php-fpm慢日志
- mysql慢日志
- 服務器優化
- php-fpm進程數優化
- 服務器安全
- RHSA-2018:2748: kernel security and bug fix update
- RHSA-2018:3408: git security update
- RHSA-2018:2570: bind security update
- RHSA-2018:3052: wget security and bug fix update
- RHSA-2018:3221: openssl security, bug fix, and enhancement update
- RHSA-2018:2384: kernel security and bug fix update
- RHSA-2018:3032: binutils security, bug fix, and enhancement update
- RHSA-2018:3157: curl and nss-pem security and bug fix update
- RHSA-2018:2285: yum-utils security update
- RHSA-2018:3092: glibc security, bug fix, and enhancement update
- CVE-2018-17182 on Ubuntu 14.04 LTS (trusty)
- CVE-2018-9415 on Ubuntu 14.04 LTS (trusty)
- CVE-2018-8043 on Ubuntu 14.04 LTS (trusty)
- CVE-2018-3620 on Ubuntu 14.04 LTS (trusty)
- CVE-2018-14634 on Ubuntu 14.04 LTS (trusty)
- CVE-2018-14609 on Ubuntu 14.04 LTS (trusty)
- CentOS Linux 7安全基線檢查
- Redis安全基線檢查
- RHSA-2019:1168-重要: 內核 安全更新
- RHSA-2019:1481-重要: 內核 安全更新
- RHSA-2019:0512-重要: 內核 安全和BUG修復更新
- ThinkPHP漏洞
- ThinkPHP 5.1.X <= 5.1.30 遠程代碼執行漏洞
- ThinkPHP 5 <=5.0.22 遠程代碼執行高危漏洞
- ThinkPHP <5.0.24 Request.php 遠程代碼執行漏洞
- PHP
- 怎樣獲取PHP各種版本
- 攻擊
- SSH暴力破解
- RDP暴力破解
- SQLSERVER暴力破解
- MYSQL暴力破解
- FTP暴力破解
- SQL注入
- 代碼執行
- XSS攻擊
- 本地文件包含
- 遠程文件包含
- 腳本木馬
- 上傳漏洞
- 路徑遍歷
- 越權訪問
- CSRF
- CRLF
- 其他