If you want to connect the agent through a forwarding proxy, you need to set certain settings, which are located in the Install and Configure the Direct Agent section of the SAS® Customer Intelligence 360 Administration Guide.
If you need to connect the agent through a proxy, set the following properties in the cionprem.properties file. This file is located in the installation directory of the Direct Marketing Agent. (For example, C:\install\CI360Direct or /install/CI360Direct.)
Note: Use the following three properties when the user has an authenticated proxy:
Here is an example:
proxyHost=foo.demo.sas.com
proxyPort=8181
nonProxyHosts=localhost|fooburger.demo.sas.com
proxyUser=saszsr
proxyRealm =”Access to the staging site"
See the Install and Configure the Direct Agent section of the SAS® Customer Intelligence 360 Administration Guide for more information.
SAS supports the following proxy authentication:
SAS does not support the following proxy authentication:
In addition, to communicate with SAS Customer Intelligence 360, you must indicate which specific domains to allow in your firewall depending on the action that you want to perform. The Task 6: Allow Domains section of the SAS® Customer Intelligence 360 Administration Guide lists the domains that need to be allowed.
It is important to include ALL the information for your regions and for the actions that you want to take. Make sure to scroll down the page and include all the actions that you need. Here is an example:
SAS® 360 Engage: Direct
The following symptoms might occur when there are issues with the Direct Marketing Agent:
The following messages might occur in the onprem_direct.log:
Event stream connection to gateway failed: java.util.concurrent.TimeoutException: Idle timeout expired:
errorCode: GATEWAY_CONNECTION_FAILED, message: java.util.concurrent.TimeoutException: Idle timeout expired:
When traffic flows regularly over the WebSocket, the connection stays up. However, the connection has issues when there is an idle period. In this scenario, the gateway sends a "ping" every 60 seconds. In this idle case, the agent never receives the ping from the agent logs. As a result, when the gateway does not receive a response to the ping within 30 seconds, it closes the connection and also has an idle time-out. (Note that the agent does not get a close event either). Then, once the agent does not receive a message for 70 seconds, it closes its end of the connection and tries to reconnect.
This message likely occurs because there is network equipment between this agent and the gateway that has an idle time-out shorter than ten minutes. That equipment closes the WebSocket connection when it reaches its idle time-out, which is hit because the gateway pings come only every 70 seconds when there is no other traffic to be sent. At that point, a new connection has to be made to get traffic to flow again.
To circumvent this message, try to increase the firewall time-out to more than one minute.
org.jasig.cas.client.validation.TicketValidationException: INVALID_PROXY_CALLBACK
This message occurs because the SAS Customer Intelligence OnPrem Direct Services is pointing to the wrong host name and needs to point to the fully qualified host name where the Direct Marketing Agent is running.
407 Proxy Authentication Required
The client must authenticate with the proxy server before the request can be processed. This error can be the result of missing or incorrect credentials.
429 Too many Requests
The gateway returns this error when a user has made too many REST requests of a particular type within the current 30-second window.
To circumvent this error, spread out the time of the requests.
These errors can occur regardless of whether you do or do not use proxies:
400 Bad Request
This error occurs when the proxy server cannot understand the request, which can be the result of any of the following:
403 Forbidden
This error occurs when access to resources is denied, which can be due to any of the following:
502 Bad Gateway
This error occurs when the gateway or proxy server receives an invalid response from an upstream server. This error indicates that the upstream server is reachable but returned an unexpected or invalid response, which can be due to any of the following:
To circumvent 502 errors, try any of the following workarounds:
503 Service unavailable
The proxy server cannot access the required service, which can be due to any of the following:
504 Gateway Timeout
This error occurs when the gateway or proxy server does not receive a timely response from the upstream server. This error indicates that the upstream server is reachable but did not respond in time, which can be due to any of the following:
To circumvent 504 errors, try any of the following workarounds:
If the Direct Marketing Agent worked previously but you encounter an issue where it no longer works, consider the following:
A good way to troubleshoot is to run the following curl command on the server where the Direct Marketing Agent is installed. If the curl command works, it does not mean that all is well with the proxy server. However, it is a good place to start in order to understand where the issue might be.
curl -U "user-id":"pwd" -v -x proxy-name:proxy-port "https://extapigwservice-prod.ci360.sas.com/marketingGateway/commons/ping" --proxy-anyauth
Note: The values used for "user-id", "pwd", “proxy-name”, and “proxy-port” need to be the same values found in the cionprem.properties or credentials.properties files.
If the proxy server does not require authentication, remove “-U "user-id":"pwd"” from the curl command.
If you're getting INVALID_PROXY_CALLBACK or timeouts, make sure the proxyHost and proxyPort are set correctly in cionprem.properties, and double-check proxyUser, proxyPassword, and proxyRealm if your proxy requires authentication. Also confirm nonProxyHosts includes any internal services the agent needs to bypass the proxy for.
For the WebSocket timeouts, increase idle timeout settings on any network device or firewall between the agent and SAS. Devices dropping idle connections after 60 seconds will interfere with the ping/keepalive process and break the session.
This guide is helpful if your Direct Agent is having trouble connecting through a proxy. Most of the time, issues like this come down to incorrect proxy settings or network configurations. Make sure the proxy details are set correctly in the agent's configuration file and that the proxy supports the right protocols for your setup.
If it still does not work, you might want to test with a different proxy to rule out compatibility issues. I had a similar problem before, and switching to a cheap proxy from Lightning Proxies helped a lot. It was easy to set up, worked without any connection errors, and saved me time trying to troubleshoot unreliable proxies. Sometimes using a cleaner and more stable proxy makes all the difference.
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.