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 2021/02/15 17:56:32 UTC

[GitHub] [trafficserver] linnaea opened a new issue #7525: Loop detection breaks transparent proxying

linnaea opened a new issue #7525:
URL: https://github.com/apache/trafficserver/issues/7525


   https://github.com/apache/trafficserver/blob/926dd71b32ade8615fbba6737816240d6df0c9ad/proxy/http/HttpTransact.cc#L6541
   
   By the very definition of transparent proxying, this will detect a loop when it's trying to connect to origin server.
   
   Diag traces captured:
   ```
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:3239 (HandleCacheOpenReadMiss)> (http_seq) [633] [HttpTransact::HandleCacheOpenReadMiss] Miss in cache
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:5182 (get_ka_info_from_config)> (http_trans) [633] get_ka_info_from_config, server_info->http_version 65537, check_hostdb 0
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:7821 (build_request)> (http_trans) [633] [build_request] removing host name from url
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:7834 (build_request)> (http_trans) [633] [build_request] request like cacheable and conditional headers removed
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:7863 (build_request)> (http_trans) [633] [build_request] request_sent_time: 1613411433
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: +++++++++ Proxy's Request +++++++++
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: -- State Machine Id: 633
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: GET / HTTP/1.1
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Host: lab.linnaea.local
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: User-Agent: curl/7.66.0
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Accept: */*
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Via: http/1.1 traffic_server[745d2a80-67e3-4654-8bdd-49ee740d488c] (ApacheTrafficServer/9.0.0)
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]:
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:7319 (call_transact_and_set_next_state)> (http) [633] State Transition: SM_ACTION_CACHE_LOOKUP -> SM_ACTION_CACHE_ISSUE_WRITE
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:4715 (do_cache_prepare_action)> (http_cache_write) [633] writing to cache with URL http://lab.linnaea.local/
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpCacheSM.cc:160 (state_cache_open_write)> (http_cache) [633] [&HttpCacheSM::state_cache_open_write, CACHE_EVENT_OPEN_WRITE/TS_EVENT_CACHE_OPEN_WRITE]
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:2611 (main_handler)> (http) [633] [HttpSM::main_handler, CACHE_EVENT_OPEN_WRITE/TS_EVENT_CACHE_OPEN_WRITE]
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:2423 (state_cache_open_write)> (http) [633] [&HttpSM : state_cache_open_write, CACHE_EVENT_OPEN_WRITE/TS_EVENT_CACHE_OPEN_WRITE]
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:3207 (handle_cache_write_lock)> (http_trans) Next action next; nullptr
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:7319 (call_transact_and_set_next_state)> (http) [633] State Transition: SM_ACTION_CACHE_ISSUE_WRITE -> SM_ACTION_ORIGIN_SERVER_OPEN
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:4820 (do_http_server_open)> (http_track) entered inside do_http_server_open ][ipv4]
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:4852 (do_http_server_open)> (http) [633] open connection to lab.linnaea.local: 10.141.0.2:80
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpSM.cc:4864 (do_http_server_open)> (http_seq) [HttpSM::do_http_server_open] Sending request to server
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:6667 (will_this_request_self_loop)> (http_transact) [633] host ip and port same as local ip and port - bailing
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: +++++++++ Proxy's Response 2 +++++++++
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: -- State Machine Id: 633
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: HTTP/1.1 400 Cycle Detected
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Date: Mon, 15 Feb 2021 17:50:33 GMT
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Connection: close
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: Via: http/1.1 traffic_server (ATS [uEcMs f p eH:t cCMp s ] [http/1.1])
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]:
   Feb 16 01:50:33 vpn-hub traffic_manager[1043]: [Feb 16 01:50:33.718] [ET_NET 3] DEBUG: <HttpTransact.cc:801 (SelfLoop)> (http_trans) [633] [Loop]Request will selfloop.
   ```


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

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



[GitHub] [trafficserver] shinrich commented on issue #7525: Loop detection breaks transparent proxying

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


   I just ran into this as well in the 9.1.1 codebase.  Found a fix. Putting PR #8586 to address the issue.  Basically if the transaction is outbound transparent, there is no sense in performing the self loop check.


-- 
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] shinrich closed issue #7525: Loop detection breaks transparent proxying

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


   


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