From owner-freebsd-questions@freebsd.org Tue Feb 16 16:13:34 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B27B53E387 for ; Tue, 16 Feb 2021 16:13:34 +0000 (UTC) (envelope-from karly@kipshouse.net) Received: from mgmt.ironboy.kipshouse.net (ironboy.kipshouse.net [IPv6:2001:470:835a:4242::42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.kipshouse.net", Issuer "Starfield Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dg5cY10PSz4fV6 for ; Tue, 16 Feb 2021 16:13:32 +0000 (UTC) (envelope-from karly@kipshouse.net) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kipshouse.org; i=@kipshouse.org; q=dns/txt; s=kh-ss; t=1613492014; x=1645028014; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; z=Date:=20Tue,=2016=20Feb=202021=2008:13:24=20-0800|From: =20Karl=20Young=20|To:=20PstreeM=20C hina=20|Cc:=20freebsd-questions@freebs d.org|Subject:=20Re:=20nginx=20as=20the=20load=20balance =20use=20upstream_fair|Message-ID:=20<20210216161324.GN20 539@mailboy.kipshouse.net>|References:=20 |MIME-Version:=201.0|In-Reply-To:=20; bh=33y+kFxQ4Cbg/bfIrToZ64OdneJesGCpMBgQz4sqZio=; b=WrBLpfaPq+O6hlZ98ks8rI9L/BjBaTTb/+6lZhJ9BKHnJt99bRcOXORc bkGQcDAY43s7BA++KMwo9M8+7XoQHu7N4i42vlLMU1HNYs/H5fEzD4C6W zCHqMzvzACaHDnzYDPGhgEgxeBrbqsjPnMMGeprcwwS0+TgOXffzaFPbt w4z8nBnZNtNa/9LMvLYyNS6uqulgbTq+MdIdt7Z5qcHQLss2YUGvW00q8 LfDRYkxO7P2Am1BnNBcNAkK19xopAbfUHVM0H3oSHH+tqRXxC8RsTzXJB K0y5a1lK+YJqWM3zdeT8K6OnG11p0n1H/epzYtbuJBVOcBwBenBbeKhLI w==; Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.org) identity=pra; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.org"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of karly@kipshouse.net) identity=mailfrom; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="karly@kipshouse.net"; x-conformance=sidf_compatible Received-SPF: None (d2.ironport.kipshouse.net: no sender authenticity information available from domain of postmaster@mailboy.kipshouse.net) identity=helo; client-ip=2001:470:835a:1010::26; receiver=d2.ironport.kipshouse.net; envelope-from="karly@kipshouse.net"; x-sender="postmaster@mailboy.kipshouse.net"; x-conformance=sidf_compatible IronPort-SDR: VyZs8Od+jY2CkA3TFkba0DK8HBMoV4HXktkQoX75yF5xbJhIP28rjPrezFVneLGlKCulEGSzfP bhq9gifKoFUfEt8XT5Lqqj/jZi7H/QoZDq+zuw030wl89uo+uf48qVwVWOrBVQ0blEqwH9HeF7 JLE6M57fAEl8v2PKZ3HqYzEIYtEiN0FhsQr2c0P3GHNILjWzc437A7jcEQ4yeSHbmdEa8Sxb8z t4UuV3gJOFWE+66BWIwM9+b57/0WJ1X8dUKNRO+tZZ2ff+3Lv2ubOdUV1hmhv9iQoQUuR+idB/ iPs= X-SBRS: None X-MID: 393766 X-RemoteIP: 2001:470:835a:1010::26 X-RemoteHost: 2001:470:835a:1010::26, mailboypriv.kipshouse.net IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A9z5Ixqkee86ZOjaD909TE+HI5hrpDfNRiW?= =?us-ascii?q?dD5ilNYBxZY6Wkvuql9c516TbfjjENVHY83f2BIrCHW3PA9ZhziLNhWIuKdg?= =?us-ascii?q?/gpWeuMcVe/ZLvqgeQeRHW2+ZB2c5bGZRWJ8b3CTFB4PrSwA79KNo4xcnCza?= =?us-ascii?q?bAv5a7815IbSVHL55t9B14DAHzKDwUeCBjCYAiHJSRouprzgDARV0tYs62Bm?= =?us-ascii?q?YIUoH4zrWhqLvcbRELHBIh4gWV5AnJ1JfBDxOa0h0COgkg/Z4e9wH+/zDR2r?= =?us-ascii?q?+uqLWSxBPaygbonu9rseqk4sBJBNGWgtMEbhLxjg2lf8BGVPm+vTxwjem+gW?= =?us-ascii?q?xa9+XkklMMP9547nvQem2vyCGdozXI4XIT0FqK8y7/vVLT5fL+XzB/N/Fl7L?= =?us-ascii?q?gpCyfkwk8ritFwwct39miS3qA5MTrLmiPh69/UExxrjFOzu3o+kegV5kYvNL?= =?us-ascii?q?c2YrlXsIAZ4QdJAI4NdRiKirwPHeFyAKjnjsp+fkidaxni01VHwNvpRXgrGw?= =?us-ascii?q?fDX05qgL3w7xFTkGpix0UVgMwT901gyLs4S51Jo/vJKb5pkrYmdL50UYtnCO?= =?us-ascii?q?0MQdS6BwX2KHqmDEuILVvqD60BMX7WwqSW3Jwu+OqodJYUpaFdpL3dVjpj2V?= =?us-ascii?q?IaZ1jjEomH0pFN73n2MR6AdCWowtpU54VjsqbtAL32NSaOUxQpnI+8ovlaD8?= =?us-ascii?q?XKMszDX65+ErvvLXHlHI5I2wHkMqMiUUU2QYkIodNTYSPpnuvbbpPtre6ebO?= =?us-ascii?q?3XTYCdaAoZZg=3D=3D?= X-IronPort-AV: E=McAfee;i="6000,8403,9897"; a="393766" Received: from mailboypriv.kipshouse.net (HELO mailboy.kipshouse.net) ([IPv6:2001:470:835a:1010::26]) by d2.ironport.kipshouse.net with ESMTP; 16 Feb 2021 08:13:26 -0800 Received: by mailboy.kipshouse.net (Postfix, from userid 500) id F37A646848; Tue, 16 Feb 2021 08:13:24 -0800 (PST) Date: Tue, 16 Feb 2021 08:13:24 -0800 From: Karl Young To: PstreeM China Cc: freebsd-questions@freebsd.org Subject: Re: nginx as the load balance use upstream_fair Message-ID: <20210216161324.GN20539@mailboy.kipshouse.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Arbitrary-Number-Of-The-Day: 42 X-URL: http://www.kipshouse.org/karly X-Work-URL: http://www.cisco.com/ X-Disclaimer: My opinions do not necessarily represent those of my employer. User-Agent: Mutt/1.7.2 (2016-11-26) X-Rspamd-Queue-Id: 4Dg5cY10PSz4fV6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=kipshouse.org header.s=kh-ss header.b=WrBLpfaP; dmarc=none; spf=none (mx1.freebsd.org: domain of karly@kipshouse.net has no SPF policy when checking 2001:470:835a:4242::42) smtp.mailfrom=karly@kipshouse.net X-Spamd-Result: default: False [-1.20 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:835a:4242::42:from]; R_DKIM_ALLOW(-0.20)[kipshouse.org:s=kh-ss]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HFILTER_HELO_IP_A(1.00)[mgmt.ironboy.kipshouse.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[mgmt.ironboy.kipshouse.net]; DMARC_NA(0.00)[kipshouse.org]; SPAMHAUS_ZRD(0.00)[2001:470:835a:4242::42:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kipshouse.org:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.50)[-0.504]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[karly@kipshouse.org,karly@kipshouse.net]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[karly@kipshouse.org,karly@kipshouse.net]; MAILMAN_DEST(0.00)[freebsd-questions] X-Mailman-Approved-At: Tue, 16 Feb 2021 19:39:43 +0000 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 16:13:34 -0000 PstreeM Did you enable the HTTP_UPSTREAM_FAIR option when you installed the port? HTTP_UPSTREAM_FAIR=off: 3rd party upstream fair module Does this file exist? /usr/local/libexec/nginx/ngx_http_upstream_fair_module.so Regards, -karl PstreeM China(pstreem@gmail.com)@2021.02.16 22:35:55 +0800: > hello expert: > > need your help for this issue, from the google can not find any > similar case. > use freebsd 12.2 system. and install nginx by ports, the version > is:nginx-1.18.0_47,2 > > configuration the fair as the load balance policy, but there is some > mistake when i start the service like: > =============== > root@env:/usr/local/etc/nginx # service nginx onerestart > Performing sanity check on nginx configuration: > nginx: [emerg] "fair" directive is not allowed here in > /usr/local/etc/nginx/nginx.conf:35 > nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed > =============== > > then,test if cancel the config "#fair", it running well. > =============== > Performing sanity check on nginx configuration: > nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok > nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful > Starting nginx. > ============== > > search from google and read the guide from nginx official site, the example > configure is all like this. i don't know how to fix this ? thanks very > much for your help. > > the part of configuration as below: > --------------------- > load_module /usr/local/libexec/nginx/ngx_stream_module.so; > load_module /usr/local/libexec/nginx/ngx_http_dynamic_upstream_module.so; > load_module /usr/local/libexec/nginx/ngx_http_upstream_fair_module.so; > load_module /usr/local/libexec/nginx/ngx_http_sticky_module.so; > > stream { > > upstream backend { > server server1:443; > server server2:443; > server server3:443; > fair; > } > > server { > listen 4443; > proxy_pass backend; > > } > } > ------------------------- > > BR//Armin > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"