I have stopped the supervisor by giving the command “systemctl stop supervisord” . After i getting “Internal server error” and errors in following log files
web.error.log
[2015-06-23 19:48:42 +0000] [6584] [INFO] Starting gunicorn 19.3.0
[2015-06-23 19:48:42 +0000] [6584] [INFO] Listening at: http://127.0.0.1:8000 (6584)
[2015-06-23 19:48:42 +0000] [6584] [INFO] Using worker: sync
[2015-06-23 19:48:42 +0000] [6594] [INFO] Booting worker with pid: 6594
[2015-06-23 19:48:42 +0000] [6603] [INFO] Booting worker with pid: 6603
nginx/error.log
2015/06/23 19:30:15 [error] 2307#0: *25 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: frappe_default_site, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8000/favicon.ico”, host: “localhost”
Gunicorn seems to be running , what could be the issue
[root@localhost logs]# ps -aux | grep gunicorn
root 7109 0.0 0.4 219596 13596 ? S 20:03 0:00 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
root 7120 0.0 0.6 248716 18920 ? S 20:03 0:00 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
root 7123 0.0 0.6 252132 20144 ? S 20:03 0:00 /home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
root 7252 0.0 0.0 112640 972 pts/0 R+ 20:08 0:00 grep --color=auto gunicorn
Seems like “server block” updated with wrong value. Can you please share server .conf ?
Sunil
Which server.conf… i guess you are asking about nginx.server If i am right
Following lines in my nginx.conf
…
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
index index.html index.htm;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Pls check /etc/nginx/conf.d/frappe.conf (nginx server block of ERPNext) setting.
[root@localhost conf.d]# cat frappe.conf
server_names_hash_bucket_size 64;
upstream frappe {
server 127.0.0.1:8000 fail_timeout=0;
}
server {
listen 80 ;
client_max_body_size 4G;
server_name site1.local;
keepalive_timeout 5;
sendfile on;
root /home/frappe/frappe-bench/sites;
location /private/ {
internal;
try_files /$uri =424;
}
location /assets {
try_files $uri =404;
}
location / {
try_files /site1.local/public/$uri @magic;
}
location @magic {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Frappe-Site-Name site1.local;
proxy_set_header Host $host;
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout 120;
proxy_redirect off;
proxy_pass http://frappe;
}
}
server {
listen 80 default ;
client_max_body_size 4G;
server_name frappe_default_site;
keepalive_timeout 5;
sendfile on;
root /home/frappe/frappe-bench/sites;
location /private/ {
internal;
try_files /$uri =424;
}
location /assets {
try_files $uri =404;
}
location / {
try_files /site1.local/public/$uri @magic;
}
location @magic {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Frappe-Site-Name site1.local;
proxy_set_header Host $host;
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout 120;
proxy_redirect off;
proxy_pass http://frappe;
}
}
I have changed the settings as above. Still getting the same error.
Make_K
#7
Getting the same error, did you get any solution of this?