You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/01/28 15:32:59 UTC

[GitHub] [trafficserver] jrushford commented on issue #8634: Reverse proxy ignoring strategies.yaml?

jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1024332560


   Can you enable “next_hop” debug?  Let’s see what that shows.  You don’t need the single quotes around the strategy name in either remap.config or strategy.yaml, remove them.
   
   
   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: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org