Temos um servidor Ubuntu de teste em execução na plataforma Azure que, de repente, começou a exceder o tempo limite. Nós criamos o servidor há alguns dias e ele estava funcionando muito bem. De repente, hoje, enquanto estava sendo usado, começou a devolver 504s. Reiniciamos o nginx e o php-fpm e ainda não está funcionando.
Tentamos remover a frase secreta da nossa chave privada, como algumas outras respostas disseram, mas isso não resolveu o problema.
Qualquer ajuda ou conselho para solução de problemas seria muito apreciado. Também deixe-me saber se há outro arquivo de configuração que você precisa ver.
Obrigado antecipadamente!
Nosso /var/log/nginx/error.log:
2014/09/12 14:11:33 [emerg] 3854#0: SSL_CTX_use_PrivateKey_file("/etc/ssl/ssl.key/myserver.key") failed (SSL: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt error:0906A065:PEM routines:PEM_do_header:bad decrypt error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
2014/09/12 14:12:49 [error] 3887#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {MY_IP}, server: {OUR_DOMAIN}, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "{OUR_DOMAIN}"
2014/09/12 14:13:49 [error] 3887#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {MY_IP}, server: {OUR_DOMAIN}, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "{OUR_DOMAIN}"
2014/09/12 14:20:14 [error] 3955#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {MY_IP}, server: {OUR_DOMAIN}, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "{OUR_DOMAIN}"
Enter PEM pass phrase:
2014/09/12 14:20:55 [emerg] 4072#0: SSL_CTX_use_PrivateKey_file("/etc/ssl/ssl.key/myserver.key") failed (SSL: error:0906406D:PEM routines:PEM_def_callback:problems getting password error:0906A068:PEM routines:PEM_do_header:bad password read error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
2014/09/12 14:27:10 [alert] 4074#0: open socket #3 left in connection 3
2014/09/12 14:27:10 [alert] 4074#0: open socket #10 left in connection 4
2014/09/12 14:27:10 [alert] 4074#0: aborting
2014/09/12 14:40:08 [error] 4344#0: *5 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {MY_IP}, server: {OUR_DOMAIN}, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "{OUR_DOMAIN}"
2014/09/12 14:47:44 [error] 4344#0: *8 upstream timed out (110: Connection timed out) while reading response header from upstream, client: {MY_IP}, server: {OUR_DOMAIN}, request: "GET /{REQUESTED_PATH}/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "{OUR_DOMAIN}", referrer: "https://{OUR_DOMAIN}/{REQUESTED_PATH}/"
Nosso /var/log/nginx/access.log:
{MY_IP} - - [12/Sep/2014:14:11:24 +0000] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
{MY_IP} - - [12/Sep/2014:14:13:49 +0000] "GET / HTTP/1.1" 504 593 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
{MY_IP} - - [12/Sep/2014:14:18:50 +0000] "GET /{REQUESTED_PATH}/ HTTP/1.1" 499 0 "https://{OUR_DOMAIN}/{REQUESTED_PATH}/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.103 Safari/537.36"
{MY_IP} - - [12/Sep/2014:14:26:18 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
{MY_IP} - - [12/Sep/2014:14:30:07 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
Nosso /etc/nginx/nginx.conf:
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 32m;
large_client_header_buffers 2 1k;
client_header_timeout 3000;
client_body_timeout 3000;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 128k;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 2;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Nosso /var/log/php5-fpm.log:
[12-Sep-2014 14:20:49] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
Nosso /etc/php5/fpm/php-fpm.conf:
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
{COMMENTS}
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
{COMMENTS}
pid = /var/run/php5-fpm.pid
{COMMENTS}
error_log = /var/log/php5-fpm.log
{COMMENTS}
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
{COMMENTS}
include=/etc/php5/fpm/pool.d/*.conf
Nosso /etc/php5/fpm/pool.d/www.conf:
{COMMENTS}
[www]
{COMMENTS}
user = www-data
group = www-data
{COMMENTS}
listen = /var/run/php5-fpm.sock
{COMMENTS}
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
{COMMENTS}
pm = dynamic
{COMMENTS}
pm.max_children = 5
{COMMENTS}
pm.start_servers = 2
{COMMENTS}
pm.min_spare_servers = 1
{COMMENTS}
pm.max_spare_servers = 3
{COMMENTS}
request_terminate_timeout = 600
{COMMENTS}
chdir = /
{COMMENTS}
Versões de software:
- versão nginx: nginx / 1.4.6 (Ubuntu)
- Ubuntu 14.04.1 LTS (GNU / Linux 3.13.0-32-generix x86_64)
- PHP 5.5.9-1ubuntu4.3 (fpm-fcgi)
- Zend Engine v2.5.0 com Zend OPcache v7.0.3