My Oracle Support Banner

Unable to Get Value of Predefined Variable $dns in Oracle Traffic Director Headers (Doc ID 2428026.1)

Last updated on AUGUST 20, 2018

Applies to:

Oracle Traffic Director - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

After enabling the $dns predefined variable in Oracle Traffic Director 12.2.1.3, we are not able to see the value of the variable in the server log file.

The value can only be seen when TRACE 32 log is enabled.

Issue can be reproduced with following steps:
------------------------------------------------
1. Install and configure OTD 12.2.1.3

2. Edit "<config-name>-obj.conf" and add the following entries:
<If not $internal and defined $dns =~ "(.*)">
NameTrans fn="set-variable" set-headers="Proxyme: $1"
</If>

3. First few entries of <config-name>-obj.conf looks per below:
<Object name="default">
NameTrans fn="pfx2dir" from="/file-icons" dir="${ORACLE_HOME}/otd/lib/icons" name="content-file-icons"
NameTrans fn="assign-name" id="default-route" name="route-default-route"
<If not $internal and defined $dns =~ "(.*)">
NameTrans fn="set-variable" set-headers="Proxyme: $1"
</If>
....
....
NameTrans fn="map" from="/" to="/"
Service fn="proxy-retrieve" method="*"
Service fn="set-variable" error="404"
AddLog fn="flex-log"
</Object>

4. Enable logging of the request and response headers in OTD

5. When TRACE:32 log is enabled, the server log shows:

[2018-07-20T11:48:58+05:30] [otd_OTD_dns_TestOHS_Machine1] [NOTIFICATION:1]
[OTD-11008] [] [ecid: BaDm6110000000000] [rid: 0] [pid: 6669] for host
<ClientHostname> trying to GET /cgi-bin/test-cgi,
log-headers reports: request headers sent to origin
server(ServerHostname:7779) :[[
GET /cgi-bin/test-cgi HTTP/1.1
Proxy-agent: Oracle-Traffic-Director/12.2.1.3.0
ECID-Context: 1.BaDm6110000000000;kXjE
Surrogate-capability: otd="Surrogate/1.0"
Host: ServerHostname:8099
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101
Firefox/61.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-language: en-US,en;q=0.5
Accept-encoding: gzip, deflate
Cookie: ELOQUA=GUID=660B49E0562C42F9B63CF3AAF7ED3F7C; ORA_MOS_LOCALE=en|us;
s_fid=3882953D06E7163C-1C629EB91347B097; s_nr=1532066617959-Repeat;
atgRecVisitorId=12B8S9BLHold-yDQSPxoiQ4-0FWJwY9qROmZjr5WRCcBlxI85B7;
mmapi.store.p.0={"mmparams.d":{},"mmparams.p":{"pd"%
3A"1553239426834|\"1994077066|VgAAAApVAgDIv5aObQ8AAREAAUI3rilNNACZnZ
HaxY/VSLRzQ9avGtVIAAAAAP//////////AAZEaXJlY3QBAhABAAAAAA
AAAAAA////////////////AAAAAAAAAAFF\"",
"srv":"1553239426838|\"lvsvwcgus01\""}};
notice_preferences=2:cb8350a2759273dccf1e483791e6f8fd;
ORASSO_AUTH_HINT=v1.0~20180720144159;
ORA_UCM_INFO=3~E8A990F5DAA3AEE7E030018A19B93F93~Rao~Aishwarya~NOT_FOUND;
notice_gdpr_prefs=0,1,2:cb8350a2759273dccf1e483791e6f8fd;
_abck=3628EF9D4A702552B1CBF26579FA1E99B81AA2922E320000114AFA5A0A3BD071~0~KmvhF
I0gF45H2cMF/3f44mkOw1ftCVJFNP4CTQNxs68=~-1~-1;
ADMINCONSOLESESSION=VhGy-5RNoK7ZHbU-utO7i3iQzN2rjuQpifjjG7VaxjJ4MwMNgiKI!-1425
452690; s_cc=true;
gpw_e24=https://docs.oracle.com/middleware/1221/otd/admin/diag
.htm#OTADG411; s_sq=[[B]]
Upgrade-insecure-requests: 1
Cache-control: max-age=0
Proxyme: xxx.oracle.com        <================ here is the expected value
Client-ip: 1x.1xx.2xx.3x
Proxy-ssl: False
X-forwarded-for: 1x.1xx.2xx.3x
Proxy-jroute: OWqc9jAtZTbfTvxH3rAm7OnlJhUkPUtb
Via: 1.1 otd_OTD_dns_TestOHS_Machine1
Connection: keep-alive
]]

------------------------

With NOTIFICATION:1 log notice "Proxyme: xxx.oracle.com" part is missing (see below example)


[2018-07-20T11:54:32+05:30] [otd_OTD_dns_TestOHS_Machine1] [NOTIFICATION:1]
[OTD-11008] [] [ecid: Gezsp010000000000] [rid: 0] [pid: 10684] for host
Hostname trying to GET /cgi-bin/test-cgi,
log-headers reports: request headers sent to origin
server(HostName:7779) :[[
GET /cgi-bin/test-cgi HTTP/1.1
Proxy-agent: Oracle-Traffic-Director/12.2.1.3.0
ECID-Context: 1.Gezsp010000000000;kXjE
Surrogate-capability: otd="Surrogate/1.0"
Host: ServerHostname:8099
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101
Firefox/61.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-language: en-US,en;q=0.5
Accept-encoding: gzip, deflate
Cookie: ELOQUA=GUID=660B49E0562C42F9B63CF3AAF7ED3F7C; ORA_MOS_LOCALE=en|us;
s_fid=3882953D06E7163C-1C629EB91347B097; s_nr=1532067696042-Repeat;
atgRecVisitorId=12B8S9BLHold-yDQSPxoiQ4-0FWJwY9qROmZjr5WRCcBlxI85B7;
mmapi.store.p.0={"mmparams.d":{},"mmparams.p":{"pd"%
3A"1553239426834|\"1994077066|VgAAAApVAgDIv5aObQ8AAREAAUI3rilNNACZnZ
HaxY/VSLRzQ9avGtVIAAAAAP//////////AAZEaXJlY3QBAhABAAAAAA
AAAAAA////////////////AAAAAAAAAAFF\"",
"srv":"1553239426838|\"lvsvwcgus01\""}};
notice_preferences=2:cb8350a2759273dccf1e483791e6f8fd;
ORASSO_AUTH_HINT=v1.0~20180720144159;
ORA_UCM_INFO=3~E8A990F5DAA3AEE7E030018A19B93F93~Rao~Aishwarya~NOT_FOUND;
notice_gdpr_prefs=0,1,2:cb8350a2759273dccf1e483791e6f8fd;
_abck=3628EF9D4A702552B1CBF26579FA1E99B81AA2922E320000114AFA5A0A3BD071~0~KmvhF
I0gF45H2cMF/3f44mkOw1ftCVJFNP4CTQNxs68=~-1~-1;
ADMINCONSOLESESSION=VhGy-5RNoK7ZHbU-utO7i3iQzN2rjuQpifjjG7VaxjJ4MwMNgiKI!-1425
452690; s_cc=true;
gpw_e24=https://docs.oracle.com/middleware/1221/otd/admin/diag
.htm#OTADG411; s_sq=[[B]]
Upgrade-insecure-requests: 1
Pragma: no-cache
Cache-control: no-cache
Client-ip: 1x.1xx.2xx.3x
Proxy-ssl: False
X-forwarded-for: 1x.1xx.2xx.3x
Proxy-jroute: OWqc9jAtZTbfTvxH3rAm7OnlJhUkPUtb
Via: 1.1 otd_OTD_dns_TestOHS_Machine1
Connection: keep-alive
]]

 

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.