BookmarkSubscribeRSS Feed

“Bad Configuration” Messages Occur in the onprem_direct.log for the Direct Marketing Agent

Started 3 weeks ago by
Modified 3 weeks ago by
Views 192

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:

  • A segment map is not able to select counts.
  • A segment map execution on the Orchestration tab remains at 0% progress.

If you experience this behavior, check the onprem-direct.log for a Bad Configuration warning.

 

“Bad Configuration” Warning

 

Issues that can cause Bad Configuration warnings include the following:

 

  • You did not stop all SAS services before you performed a patching on the system.
  • You performed a patching on the system and files were overwritten or removed.
  • You applied a SAS hot fix and did not complete all of the steps.
  • Issues with the SAS environment (such as SAS Web Applications) are no longer working.
  • A previous shutdown of the environment left stray processes running, and the ports are still in use.
  • You made configuration changes to the SAS server, and the Direct Agent’s configuration files do not contain the updates.

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

 

Troubleshooting

 

To troubleshoot these issues, complete the following steps:

 

  1. Make sure that all the SAS Services are running.

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.

 

Example Validation Steps

 

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:

 

  1. Stop the Direct Agent. (For example, use systemctl stop direct-agent-service or the shutdown.sh script.)

  2. If on a separate machine, stop the middle-tier (also known as web-tier) components first. (For example, stop SASServerX_Y – WebAppServer first, then httpd-Web Server, then Cache Locator, and then JMS Broker.) Then, stop the compute, and finally the metadata tier.

     

    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

  3. Delete, move, or archive to a different path the contents of the following directories:

     

    • <SAS-configuration-directory>/Lev1/Web/WebAppServer/SASServerX_Y/logs/*  

     

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

    • <SAS-configuration-directory>/Lev1/Web/WebAppServer/SASServerX_Y/temp/* 

     

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

    • <SAS-configuration-directory>/Lev1/Web/WebAppServer/SASServerX_Y/work/* 


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

     

    • <SAS-configuration-directory>/Lev1/Web/WebServer/logs/*
    • <SAS-configuration-directory>/Lev1/Web/gemfire/instances/ins_41415/*.log
    • <SAS-configuration-directory>/Lev1/Web/gemfire/instances/ins_41415/*.dat
    • <SAS-configuration-directory>/Lev1/Web/activemq/data/* 

               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.

    • <SAS-configuration-directory>/Lev1/Web/Logs/SASServerX_Y/*

                     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.

Version history
Last update:
3 weeks ago
Updated by:
Contributors

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags