The Direct Marketing Agent might be affected when you make system changes or have a platform issue. It is very important to note that the SAS® 9.4 Intelligence Platform must be functioning properly in order for the Direct Agent to work. The Direct Agent is needed in order to run SAS® 360 Engage: Direct.
You might encounter the following symptoms when this issue occurs:
If you experience this behavior, check the onprem-direct.log for a Bad Configuration warning.
Issues that can cause Bad Configuration warnings include the following:
Here is an example of the Bad Configuration warning in the onprem-direct.log:
WARN [localhost-startStop-1] SID[] USER[] CC[] [] rt.AnnotationConfigWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environment' defined in ServletContext resource [/WEB-INF/spring-config/webapp-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.String com.sas.analytics.crm.spring.client.SASEnvironmentFactory.getServiceRegistry() throws com.sas.analytics.crm.error.client.UserException] threw exception; nested exception is com.sas.analytics.crm.error.client.UserException: Bad Configuration
To troubleshoot these issues, complete the following steps:
Linux
./sas.servers status
Windows
Open the Services Application (services.msc).
2. Validate the SAS environment.
You can use your Instructions.html to validate that SAS® Intelligence Platform is working as expected.
Details about how to validate SAS Intelligence Platform are in the Instructions.html files located in the <sasconfig>/Lev1/Documents/Instructions.html or <sasconfig>/Lev1/Documents/Backups folders.
Here is an example of the validation steps:
1) In SAS® Management Console, validate the following:
SAS® Content Server
Test using an unrestricted user account (such as sasadm@saspw).
If SAS Content Server is not working, the following message might occur:
Code 503: Service unavailable
SAS® Pooled Workspace Server
a) Test using an unrestricted user account (such as sasadm@saspw), an account that is a member of the SAS Administrators group, or a regular user account.
b) Then, validate the mid-tier.
c) Make sure that you can log on to the SAS® Web Administration Console, which is part of the SASServer1_1 SAS Web Application Server instance. If you cannot log on, the following message might occur:
Service Unavailable
The server is temporarily unavailable to service your request due to maintenance downtime or capacity problems. Please try again later
Example link: http://<your mid-tier>:7980/SASAdmin or https://<your mid-tier>:/8343/SASAdmin)
SAS® Web Server
a) Click the URL and look for the following message:
Congratulations! You have successfully set up SAS Web Server.
Here is an example link: http://<your mid-tier>:7980 or https://<your mid-tier>:/8343).
2) SAS Server configuration changes.
Check the date of the existing files to determine whether modifications were made to these four files in the following directory:
<sasconfig>/Lev1/Web/WebAppServer/SASServer1_1/bin
* server.xml
* jaas.config
* catalina.properties
* secure.file (only if configured to use the secure.file)
a) Then, compare these files to the ones in the Direct Agent directory (<sas_install>/<CI360Direct>/).
If these files do not match, rename them to “original” in the <sas_install>/<CI360Direct>/ directory as follows:
* server.xml.original
* jaas.config.original
* catalina.properties.original
* secure.file.original (only if the file currently exists in the directory and the system was configured using the secure.file
b) Copy the files from the <sasconfig>/Lev1/Web/WebAppServer/SASServer1_1/bin directory to the <sas_install>/<CI360Direct>/ directory.
* server.xml
* jaas.config
* catalina.properties
* secure.file (only if the file currently exists in the directory and the system was configured using the secure.file)
For more details about these files, see the Install and Configure the Direct Agent section of the SAS® Customer Intelligence 360 Administration Guide.
If you need the Direct Agent and SAS 9.4 running quickly, the following steps often work:
1) Stop all the services.
2) Clean up the logs.
3) Restart all the services in the proper order.
For more information, complete the following steps:
If SAS Intelligence Platform is all on one machine, you can use the sas.servers stop script from Linux.
On Linux, use the following script to stop the SAS Services:
sas.servers status
sas.servers stop
In the directories above, the X and Y in SASServerX_Y represent the different servers that you might have installed
(that is SASServer1_1, SASServer2_1, and so on).
(These temporary files do not need to be backed up.)
In the directories above, the X and Y in SASServerX_Y represent the different servers that you might have installed
(that is SASServer1_1, SASServer2_1, and so on).
(These temporary files do not need to be backed up)
In the directories above, the X and Y in SASServerX_Y represent the different servers that you might have installed
(that is SASServer1_1, SASServer2_1, and so on).
Note: Delete only the content inside the data folder. If you delete the data folder, you will not be able to start the service.
All the files in <SAS-configuration-directory>//Lev1/Web/activemq/data/* will be regenerated after the restart.
In the directories above, the X and Y in SASServerX_Y represent the different servers that you might have installed
(that is SASServer1_1, SASServer2_1, and so on).
4. Start the SAS Services beginning with the metadata tier, the compute tier, followed by the middle-tier (also known as web tier) components. If SAS Intelligence Platform is all on one machine, you can use the sas.servers start script:
On Linux, use the following script to start the SAS Services:
sas.servers start
5. It is very important that—after restarting the SAS Services —you wait before starting the Direct Marketing Agent. SAS recommends waiting 30 minutes because the middle-tier usually takes up to 30 minutes to fully restart. Then, you can start the Direct Marketing Agent (for example, systemclt start direct-agent-service).
IMPORTANT TIP: Make sure you know how the daemon is started for the Direct Marketing Agent, which is determined during the installation of the Direct Marketing Agent. You need to start the Direct Agent the way the administrator or installer configured it.
Prevention
To help prevent issues with the SAS 9.4 environment, it is very important to set up a schedule to clean up the environment. See the following SAS Communities article for additional details: Performance-Type Issues That You Might Encounter with the Direct Marketing Agent
If the Direct Agent does not start and you are not sure why, check when you shut down the SAS Services (on-premises) last to determine whether they stopped the Direct Agent too. It is important that—after restarting the SAS Services—you wait before starting the Direct Marketing Agent. SAS recommends waiting 30 minutes because the middle-tier usually takes up to 30 minutes to fully restart.
SAS also recommends that you restart SASServer1 (and any other SAS Servers that depend on SASServer1) if you make any changes to items. These items include users or application objects that are created in the SAS metadata and are used by the agent. Then, after everything is running again, restart the agent itself.
Before restarting the SAS Services, you can search for any stray SAS processes that might still be running by using the grep command. Here is an example:
ps -ef | grep "sassrv" | grep "sasexe/sas"
For more information, see the Linux man pages for the ps and kill commands.
For more information, see the Direct Agent documentation.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.