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 14:57:36 UTC

[GitHub] [trafficserver] jmoleiro opened a new issue #8634: Reverse proxy ignoring strategies.yaml?

jmoleiro opened a new issue #8634:
URL: https://github.com/apache/trafficserver/issues/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 http://server1.myserver.com:80 @strategy='primary-fallback'
   ```
   
   and on the *strategies.yml* file i've defined these rules
   
   ```yaml
   groups:
     - &g1
       - host: server1.myserver.com
         protocol:
           - scheme: http
             port: 80
             health_check_url: http://server1.myserver.com:80
           - scheme: https
             port: 443
             health_check_url: https://server1.myserver.com:443
         weight: 0.5
       - host: server2.myserver.com
         protocol:
           - scheme: http
             port: 80
             health_check_url: http://server2.myserver.com:80
           - scheme: https
             port: 443
             health_check_url: https://server2.myserver.com:443      
         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
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1024340917


   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: issues-unsubscribe@trafficserver.apache.org

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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1061275764


   no trouble found


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford closed issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025887341


   > Jonatan, From looking at the diags.log, your strategies.yaml file loads successfully with no errors. The traffic.out file should be in the same directory as the diags.log. Make sure that you have the following two configs in records.config set to enable debug with next_hop. CONFIG proxy.config.diags.debug.enabled INT 1 CONFIG proxy.config.diags.debug.tags STRING next_hop Make sure you’ve re-started traffic server or you have executed: # /opt/trafficserver/bin/traffic_ctl config reload You should then see the traffic.out file with next_hop debug messages. From: Jonatan Moleiro ***@***.***> Reply-To: apache/trafficserver ***@***.***> Date: Monday, January 31, 2022 at 7:18 AM To: apache/trafficserver ***@***.***> Cc: John Rushford ***@***.***>, Comment ***@***.***> Subject: Re: [apache/trafficserver] Reverse proxy ignoring strategies.yaml? (Issue #8634) Hi! I've made the changes. [Image removed by sender. diags]<[https://urldefense.com/v3/__https:/user-images.githubusercontent.co
 m/247449/151808132-85be9899-a4e3-47f5-a93b-3c9dd30cab93.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU2g3KYis$](https://urldefense.com/v3/__https:/user-images.githubusercontent.com/247449/151808132-85be9899-a4e3-47f5-a93b-3c9dd30cab93.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU2g3KYis%24)> But i cannot find the file traffic.out This is the diags.log content [Image removed by sender. log]<[https://urldefense.com/v3/__https:/user-images.githubusercontent.com/247449/151809615-7baeb90d-4c99-42c2-b0c1-ced0f1208a41.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUKHq83kM$](https://urldefense.com/v3/__https:/user-images.githubusercontent.com/247449/151809615-7baeb90d-4c99-42c2-b0c1-ced0f1208a41.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUKHq83kM%24)> I'll keep digging Thanks J — Reply to this email directly, view it on GitHub<[https://urlde
 fense.com/v3/__https:/github.com/apache/trafficserver/issues/8634*issuecomment-1025785256__;Iw!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUs-JCFOo$](https://urldefense.com/v3/__https:/github.com/apache/trafficserver/issues/8634*issuecomment-1025785256__;Iw!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUs-JCFOo%24)>, or unsubscribe<[https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3WMRAIHAKMLRMEYT3TUY2K23ANCNFSM5NA65I7Q__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU8KQL1dk$](https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3WMRAIHAKMLRMEYT3TUY2K23ANCNFSM5NA65I7Q__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU8KQL1dk%24)>. 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!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUwSrA4aw$](https://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUwSrA4aw%24)> 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!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU263rBKA$](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!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU263rBKA%24)>. You are receiving this because you commented.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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1032063569


   @jmoleiro did you get this working?  Can I close this issue?


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jmoleiro commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1024367024


   Hi! Sorry, it was a typo, the fle is named strategies.yaml
   
   And i was looking on the [logging documentation](https://docs.trafficserver.apache.org/en/9.0.x/admin-guide/files/logging.yaml.en.html), but I can't find references to next_hop logging. Any idea on where can i find some docs on this?
   
   Thanks!


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford edited a comment on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025885058


   @jmoleiro make sure that you enable debug in records.config.  You should have these two config settings:
   
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING next_hop
   
   After editing records.config, either restart trafficserver or run # /opt/trafficserver/bin/traffic_ctl config reload
   
   You should find traffic.out in the same directory as the diags.log. Your strategies.yaml file loads without issue as seen in the diags.log
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford closed issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford edited a comment on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025885058


   @jmoleiro make sure that you enable debug in records.config.  You should have these two config settings:
   
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING next_hop
   
   After editing records.config, either restart trafficserver or run # /opt/trafficserver/bin/traffic_ctl config reload
   
   You should find traffic.out in the same directory as the diags.log
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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: issues-unsubscribe@trafficserver.apache.org

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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1024408325


   I found the errors.
   
   
     1.  Use strategies.yaml
     2.  Colon after scheme on line 29
     3.  hash_key is only for a policy type of consistent_hash, invalid for policy type of latched
   
   Everything else is fine
   
   In records.config you can enable debug:
   
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING next_hop
   
   Restart ATS and watch traffic.out
   
   John
   
   From: Jonatan Moleiro ***@***.***>
   Reply-To: apache/trafficserver ***@***.***>
   Date: Friday, January 28, 2022 at 9:12 AM
   To: apache/trafficserver ***@***.***>
   Cc: John Rushford ***@***.***>, Comment ***@***.***>
   Subject: Re: [apache/trafficserver] Reverse proxy ignoring strategies.yaml? (Issue #8634)
   
   
   Hi! Sorry, it was a typo, the fle is named strategies.yaml
   
   And i was looking on the logging documentation<https://urldefense.com/v3/__https:/docs.trafficserver.apache.org/en/9.0.x/admin-guide/files/logging.yaml.en.html__;!!CQl3mcHX2A!XV075zc8NvL6h01hiv7GqpBH7SE0phsL3Nw4DatiiO0uaajMjqO2u8725VVfabOkWWBTHRw$>, but I can't find references to next_hop logging. Any idea on where can i find some docs on this?
   
   Thanks!
   
   —
   Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/apache/trafficserver/issues/8634*issuecomment-1024367024__;Iw!!CQl3mcHX2A!XV075zc8NvL6h01hiv7GqpBH7SE0phsL3Nw4DatiiO0uaajMjqO2u8725VVfabOkMb0-WzI$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3RF3JC4CUEL4ZSEIVLUYK55DANCNFSM5NA65I7Q__;!!CQl3mcHX2A!XV075zc8NvL6h01hiv7GqpBH7SE0phsL3Nw4DatiiO0uaajMjqO2u8725VVfabOk-b2lDWI$>.
   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!XV075zc8NvL6h01hiv7GqpBH7SE0phsL3Nw4DatiiO0uaajMjqO2u8725VVfabOkWC1sMFo$> 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!XV075zc8NvL6h01hiv7GqpBH7SE0phsL3Nw4DatiiO0uaajMjqO2u8725VVfabOkGfxukq0$>.
   You are receiving this because you commented.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



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

Posted by GitBox <gi...@apache.org>.
jmoleiro commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025785256


   Hi!
   
   I've made the changes. 
   
   ![diags](https://user-images.githubusercontent.com/247449/151808132-85be9899-a4e3-47f5-a93b-3c9dd30cab93.jpg)
   
   But i cannot find the file traffic.out 
   
   This is the diags.log content
   
   ![log](https://user-images.githubusercontent.com/247449/151809615-7baeb90d-4c99-42c2-b0c1-ced0f1208a41.jpg)
   
   I'll keep digging
   
   Thanks
   
   J


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jmoleiro commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1032127303


   Hi, we couldn't find a way to make it work, so we decided to drop the project. Thanks for your help
   J


-- 
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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025885058


   @jmoleiro make sure that you enable debug in records.config.  You should have these two config settings:
   
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING next_hop
   
   After editing records.config, either restart trafficserver or run # /opt/trafficserver/bin/traffic_ctl config reload
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
jrushford commented on issue #8634:
URL: https://github.com/apache/trafficserver/issues/8634#issuecomment-1025861591


   Jonatan,
   
   From looking at the diags.log, your strategies.yaml file loads successfully with no errors.
   
   The traffic.out file should be in the same directory as the diags.log.  Make sure that you have the following two configs in records.config set to enable debug with next_hop.
   
   CONFIG proxy.config.diags.debug.enabled INT 1
   CONFIG proxy.config.diags.debug.tags STRING next_hop
   
   Make sure you’ve re-started traffic server or you have executed:
   
   # /opt/trafficserver/bin/traffic_ctl config reload
   
   You should then see the traffic.out file with next_hop debug messages.
   
   
   
   From: Jonatan Moleiro ***@***.***>
   Reply-To: apache/trafficserver ***@***.***>
   Date: Monday, January 31, 2022 at 7:18 AM
   To: apache/trafficserver ***@***.***>
   Cc: John Rushford ***@***.***>, Comment ***@***.***>
   Subject: Re: [apache/trafficserver] Reverse proxy ignoring strategies.yaml? (Issue #8634)
   
   
   Hi!
   
   I've made the changes.
   
   [Image removed by sender. diags]<https://urldefense.com/v3/__https:/user-images.githubusercontent.com/247449/151808132-85be9899-a4e3-47f5-a93b-3c9dd30cab93.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU2g3KYis$>
   
   But i cannot find the file traffic.out
   
   This is the diags.log content
   
   [Image removed by sender. log]<https://urldefense.com/v3/__https:/user-images.githubusercontent.com/247449/151809615-7baeb90d-4c99-42c2-b0c1-ced0f1208a41.jpg__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUKHq83kM$>
   
   I'll keep digging
   
   Thanks
   
   J
   
   —
   Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/apache/trafficserver/issues/8634*issuecomment-1025785256__;Iw!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUs-JCFOo$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABCXE3WMRAIHAKMLRMEYT3TUY2K23ANCNFSM5NA65I7Q__;!!CQl3mcHX2A!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU8KQL1dk$>.
   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!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNUwSrA4aw$> 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!Vc4hw84e3PMZAkT5qIp09yuHunArUpMasrkBCtpKdTBrpatU9ep_pgSgw3OGObNU263rBKA$>.
   You are receiving this because you commented.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