Welcome! Log In Create A New Profile

Advanced

Upstream server error

October 26, 2016 09:28AM
Hi

I'm having issues with Google Endpoints and NGINX.
I keep on getting the following error message:

2016/10/26 13:02:09 [error] 15802#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 78.20.209.87, server: , request: "GET /v1 HTTP/1.1", upstream: "http://127.0.0.1:8081/v1", host: "104.199.29.197"

It seems like NGINX isn't listening to port 8081?

Here's my configuration file (currently set up for testing):

user nginx;

worker_processes 1;
worker_rlimit_nofile 65535;

pid /run/nginx.pid;

error_log /var/log/nginx/error.log notice;

events {
worker_connections 65535;
}

http {

access_log /dev/null;
rewrite_log on;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

limit_req_zone $binary_remote_addr zone=perip:10m rate=50r/s;
limit_conn_zone $binary_remote_addr zone=peraddr:10m;

server {

listen 8081;
server_name _;
root /usr/share/nginx/api.puls.be;

location / {
return 200 '{status: "ok"}';
add_header application/json;
}

error_page 403 404 500 502 503 504 /404.html;
location = /404.html {
root error;
}

}

}

Any idea's on how to catch requests to the upstream server?
Subject Author Posted

Upstream server error

Michiel October 26, 2016 09:28AM

Re: Upstream server error

Valentin V. Bartenev October 26, 2016 12:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready