jrushford commented on issue #8634: URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1024398555
Jonatan, I’ve tested your yaml. The issue is the missing colon following “scheme” on line 29 of your yaml. Also, “hash_key” is not valid for a policy of “latched”. It’s only valid if the policy is “consistent_hash”. Finally, the default name is strategies.yaml. The single quote around the strategy name in strategies.yaml is fine. Fix this and it should load. Check the diags.log for yaml load errors and set debug to “next_hop” and you should see the strategy gets loaded. John From: John Rushford ***@***.***> Date: Friday, January 28, 2022 at 8:41 AM To: apache/trafficserver ***@***.***>, apache/trafficserver ***@***.***> Cc: Subscribed ***@***.***> Subject: Re: [apache/trafficserver] Reverse proxy ignoring strategies.yaml? (Issue #8634) Jonatan, I just noticed the filename, “strategies.yml”. The default filename is “strategies.yaml”. Try renaming the file. If you prefer the “.yml”, Modify the default name with this setting in records.config: proxy.config.url_remap.strategies.filename CONFIG STRING strategies.yml John From: Jonatan Moleiro ***@***.***> Reply-To: apache/trafficserver ***@***.***> Date: Friday, January 28, 2022 at 7:57 AM To: apache/trafficserver ***@***.***> Cc: Subscribed ***@***.***> Subject: [apache/trafficserver] Reverse proxy ignoring strategies.yaml? (Issue #8634) HI! I've setup a reverse proxy with the idea of serving from one server and fallback to the seccondary server if the primary goes down. On the remap.config file i added this rule map http://myserver.com:80<https://urldefense.com/v3/__http:/myserver.com:80__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3RfOVk5Cq0$> http://server1.myserver.com:80<https://urldefense.com/v3/__http:/server1.myserver.com:80__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rf9tuCrfw$> @strategy='primary-fallback' and on the strategies.yml file i've defined these rules groups: - &g1 - host: server1.myserver.com protocol: - scheme: http port: 80 health_check_url: http://server1.myserver.com:80<https://urldefense.com/v3/__http:/server1.myserver.com:80__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rf9tuCrfw$> - scheme: https port: 443 health_check_url: https://server1.myserver.com:443<https://urldefense.com/v3/__https:/server1.myserver.com:443__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rf9I-bW8I$> weight: 0.5 - host: server2.myserver.com protocol: - scheme: http port: 80 health_check_url: http://server2.myserver.com:80<https://urldefense.com/v3/__http:/server2.myserver.com:80__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rfr4JAatk$> - scheme: https port: 443 health_check_url: https://server2.myserver.com:443<https://urldefense.com/v3/__https:/server2.myserver.com:443__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3RfJXbyirA$> weight: 0.5 strategies: - strategy: 'primary-fallback' policy: latched hash_key: cache_key go_direct: false parent_is_proxy: false groups: - *g1 scheme http failover: ring_mode: exhaust_ring response_codes: - 401 - 403 - 404 - 500 - 501 - 503 health_check: - passive When i test, and stop then httpd service on the Server 1, instead of routing to server 2, y get this error Could Not Connect Description: Could not connect to the requested server host. Apparently, it's ignoring the strategies.yaml. i've checked the diags.log and both strateges.yaml and remap.config loads correctly wthout error. Any idea on what is wrong with this configuration? I'm using ATS 9.1.1 compiled from source on Ubuntu 20.04 Thanks J — Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/apache/trafficserver/issues/8634__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rf8BmvKZo$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3WRZZX5AHVPOX7WEBTUYKVGHANCNFSM5NA65I7Q__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3Rf4QPZsyA$>. Triage notifications on the go with GitHub Mobile for iOS<https://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3RfJHWj05c$> or Android<https://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!CQl3mcHX2A!QWSsj-sfjwJYIJhZZHD7PypKvtKcUuUC1B3_AShbVUQSSZO0BrDVtRic-8-jA3RfoMQUCEw$>. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
