oops. 2nd problem is nginx won't start when the conf files listed in
state don't have data in them, and they won't get data in them until
nginx starts. Currently i just put in a dummy entry to get me by.
On 27/04/2018 16:42, Matthew VK3EVL wrote:
> Hi all,
>
> New to nginx so still finding my way around. I am running nginx-plus
> on amazon linux through AWS.
> I have setup nginx-asg-sync and i find i have 2 problems.
>
> The main one is sync isn't working. The nginx logs are spewing out
>
> 2018/04/27 06:19:24 [error] 21780#21780: *492 missing "upstream"
> argument, client: 127.0.0.1, server: , request: "GET /upstream_conf
> HTTP/1.1", host: "127.0.0.1:8080"
> 2018/04/27 06:19:29 [error] 21781#21781: *494 missing "upstream"
> argument, client: 127.0.0.1, server: , request: "GET /upstream_conf
> HTTP/1.1", host: "127.0.0.1:8080"
> 2018/04/27 06:19:29 [error] 21781#21781: *495 missing "upstream"
> argument, client: 127.0.0.1, server: , request: "GET /upstream_conf
> HTTP/1.1", host: "127.0.0.1:8080"
> 2018/04/27 06:19:34 [error] 21781#21781: *497 missing "upstream"
> argument, client: 127.0.0.1, server: , request: "GET /upstream_conf
> HTTP/1.1", host: "127.0.0.1:8080"
>
> To me that says that nginx-asg-sync isn't passing any parameters.
>
> nginx
> config---------------------------------------------------------------------------
>
> server {
> # Status page is enabled on port 8080 by default.
> listen 8080;
>
> # Status zone allows the status page to display statistics for
> the whole server block.
> # It should be enabled for every server block in other
> configuration files.
> status_zone status-page;
>
> # In case of nginx process listening on multiple IPs you can
> restrict status page
> # to single IP only
> # listen 10.2.3.4:8080;
>
> # HTTP basic Authentication is enabled by default.
> # You can add users with any htpasswd generator.
> # Command line and online tools are very easy to find.
> # You can also reuse your htpasswd file from Apache web server
> installation.
> #auth_basic on;
> #auth_basic_user_file /etc/nginx/users;
>
> # It is recommended to limit the use of status page to admin
> networks only
> # Uncomment and change the network accordingly.
> #allow 10.0.0.0/8;
> #deny all;
>
> # NGINX provides a sample HTML status page for easy dashboard
> view
> root /usr/share/nginx/html;
> location = /status.html { }
>
> # Standard HTTP features are fully supported with the status
> page.
> # An example below provides a redirect from "/" to "/status.html"
> location = / {
> return 301 /status.html;
> }
>
> # Main status location. HTTP features like authentication,
> access control,
> # header changes, logging are fully supported.
> location /status {
> status;
> status_format json;
> }
>
> location /upstream_conf {
> upstream_conf;
> }
> }
>
> stream {
> upstream mqtt_cluster {
> state /var/lib/nginx/state/mqtt_cluster.conf;
> }
>
> server {
> listen 1883;
> proxy_pass mqtt_cluster;
> status_zone mqtt_servers;
> }
>
> upstream coap_cluster {
> state /var/lib/nginx/state/coap_cluster.conf;
> }
>
> server {
> listen 5683 udp;
> proxy_bind 10.130.3.170:6000;
> proxy_pass coap_cluster;
> status_zone coap_servers;
> proxy_responses 1;
> }
>
> }
>
> aws.yaml-------------------------------------------------------------------------------------
>
>
> region: us-east-2
> upstream_conf_endpoint: http://127.0.0.1:8080/upstream_conf
> status_endpoint: http://127.0.0.1:8080/status
> sync_interval_in_seconds: 5
> upstreams:
> - name: mqtt_cluster
> autoscaling_group: xxxxx
> port: 1883
> kind: stream
> - name: coap_cluster
> autoscaling_group: xxxxx
> port: 5683
> kind: stream
>
>
> Is there anything that looks out of place there?
>
> Cheers
> Matthew
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx