Troubleshooting Steps for Apache related issue

Steps to resolve Apache-related issue where Python services are not starting due to file lock on the logs folder by monitoring software. Stop all Apache services, open each Python component's .conf file, add the appropriate PidFile line, and start the services again.

All the python components of Product are hosted as a service using Apache 2.4. If there is a problem in the configuration files of Python components due to which the services don’t start, then the functionality corresponding to that component will not work. A scenario for the same is mentioned below.

Python services are not starting

Table 114 – Python services are not starting: Scenario 1

Issue Description Python components’ services hosted using apache are not starting and error message like “(OS 5) Access is denied. : AH10231: httpd.exe: Failed creating pid file C:/Apache24/logs/httpd.pid.5TZumS” can be seen in apache logs in environment where some kind of monitoring software is installed.
Modules Impacted iRecommend, iParse, Entity Model, iUnique, iKnowledgeIndexer (Advanced Knowledge Component), iKnowledgeScreen (Advanced Knowledge Component), iKnowledgeSearch (Advanced Knowledge Component), iCrawler, iKnowledgeRating, iScript, iKnowledge
Probable Root Cause Monitoring software have a file lock on the logs folder, that’s why the service that needs to be started cannot overwrite a PID file there for proper functioning.

Steps to resolve

        1. Open “services” application from windows search bar.
        2. First, stop all the installed apache 24 services (including “Apache2.4”) (having name like “HCL.iAutomate.iRecommend”) e.g., iRecommend, iParse, Entity Model, iUnique, iKnowledgeIndexer (Advanced Knowledge Component), iKnowledgeScreen (Advanced Knowledge Component), iKnowledgeSearch (Advanced Knowledge Component), iCrawler, iKnowledgeRating, iScript, iKnowledge.
        3. Go to the path <Apache_Root_Folder_Path>/conf. For e.g. - “C:/Apache24/conf” has <Apache_Root_Folder_Path> as “C:/Apache24”.
        4. One by one open every python component “.conf” file (e.g. iRecommend.conf) and repeat the steps 4 and 5 below for each file.
        5. Go to the line as shown below.
          Figure 1. Figure 175 - Location in conf file to add code line in old apache version
          Figure 2. Figure 176 - Location in conf file to add code line in newer versions of apache
        6. Add the below line as shown in the figure:

          Older version of apache:

          PidFile “c:/Apache24/httpd.pid"

          Figure 3. Figure 177 - Code line added in older versions of apache

          Newer version of apache:

          PidFile "${SRVROOT}/httpd.pid"

          Figure 4. Figure 178 - Code line added in newer versions of apache
        7. Save and close the file.
        8. Start all the services that you stopped in step 2. You should be able to start all the services now.