Expand my Community achievements bar.

Sling Sitemap schedular not working

Avatar

Level 5

Hi Team,

 

Trying to execute the sling sitemap schedular but its not working, I am on SP14. Through logs could see after specific interval schedular executes and prints internal query to traverse nodes but at end sitemap is not generated.

Get this.

Cannot serve request to /content/abc/en/index.sitemap.xml in org.apache.sling.sitemap.impl.SitemapServlet

 

All on demand configuration works fine.

 

Another observation on one server with SP16, sitemap.xml is not written under var/sitemaps folder though schedular configuration works fine.

 

Anyone recently facing these issues, do update and any next steps.

6 Replies

Avatar

Community Advisor

Hello @Neha  - 

 

  • Ensure that the user executing the Sitemap Scheduler has the necessary permissions to write files to the "var/sitemaps" folder.
  • Ensure that the SitemapServlet is correctly mapped to handle the requests for the sitemap XML files. Verify that the servlet mapping configuration is accurately associating the URL pattern for sitemaps ("/content/abc/en/*.sitemap.xml") with the SitemapServlet.

 

Could you also check for any potential errors been logged in the same duration maybe?

Avatar

Level 5

Getting this

22.06.2023 16:11:24.166 *DEBUG* [[0:0:0:0:0:0:0:1] [1687430484163] GET /content/abc/en/index.sitemap.xml HTTP/1.1] org.apache.sling.sitemap.impl.SitemapStorage Could not copy data from resource: /var/sitemaps/content/abc/en/index/sitemap.xml

 

Avatar

Community Advisor

Hello @NehaCMS - 

 

Have you checked that the user or service account executing the operation has the necessary permissions to read and copy the resource ? 

Avatar

Level 5

Hi We figured out the issue as separate configuration has to be created under config.publish and deployed and then schedular is working as expected. When directly adding the schedular configuration through    its not working.

 

NehaCMS_0-1687925349170.png