Hi Guys,
Facing a weird problem when using escalate plugin in my Traffic server version 9.0.2
remap config:
map / http://a.com @plugin=/usr/local/libexec/trafficserver/tslua.so @pparam=/usr/local/etc/trafficserver/script/L1/main.lua @plugin=/usr/local/libexec/trafficserver/escalate.so @pparam=500:b.com
main.lua
function cache_lookup()
local cache_status = ts.http.get_cache_lookup_status()
ts.debug("cache" .. cache_status)
end
function send_request()
**ts.server_request.header["Accept-Encoding"] = ""** //Not getting errors if I comment this line of code.
end
function do_remap()
ts.hook(TS_LUA_HOOK_CACHE_LOOKUP_COMPLETE, cache_lookup)
ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
return 0
end
Environment :
http://a.com/test500.html : 500 (forced)
http://b.com/test500.html : 200
Error Scenario:
Step 1) Hit http://b.com/test5xx.html
Txn Flow: Cache Miss -> Origin[200] -> Cached in ATS
Output of debug tags: cache_status 0
Step 2) Hit http://a.com/test5xx.html
Txn Flow: Cache Miss -> Origin [500] -> Escalate -> lookup http://b.com/test5xx.html [Found in cache]
-> returns a proper response
-> ATS restarted with error highlighted below
Output of debug tags:
cache_status 0
cache_status 2
Server restarts with the following error in monitor.log
[Sep 23 16:07:43.688] traffic_manager NOTE: [LocalManager::pollMgmtProcessServer] **Server Process terminated due to Sig 6: Aborted**
[Sep 23 16:07:43.688] traffic_manager NOTE: [Alarms::signalAlarm] Server Process was reset
[Sep 23 16:07:44.690] traffic_manager NOTE: [ProxyStateSet] Traffic Server Args: ' -M'
[Sep 23 16:07:44.691] traffic_manager NOTE: [LocalManager::listenForProxy] Listening on port: 8080 (ipv4)
[Sep 23 16:07:44.691] traffic_manager NOTE: [LocalManager::listenForProxy] Listening on port: 8080 (ipv6)
[Sep 23 16:07:44.691] traffic_manager NOTE: [LocalManager::startProxy] Launching ts process
[Sep 23 16:07:44.697] traffic_manager NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '14'
[Sep 23 16:07:44.697] traffic_manager NOTE: [Alarms::signalAlarm] Server Process born
This works properly if I remove the code inside send request function or if I disable pristine header in records.config.
Not able to find any valid reason for this. It might be something to do with the basics but what I am not able to understand is that this issues is solved just by not using ts.server_request.header variable in send_request function.
Please help if you guys can relate to something you have already seen or faced such problem.
Thanks in advance.
Hi Guys,
Facing a weird problem when using escalate plugin in my Traffic server version 9.0.2
remap config:
main.lua
Environment :
http://a.com/test500.html : 500 (forced)
http://b.com/test500.html : 200
Error Scenario:
Server restarts with the following error in monitor.log
This works properly if I remove the code inside send request function or if I disable pristine header in records.config.
Not able to find any valid reason for this. It might be something to do with the basics but what I am not able to understand is that this issues is solved just by not using ts.server_request.header variable in send_request function.
Please help if you guys can relate to something you have already seen or faced such problem.
Thanks in advance.