Sling Sitemap schedular not working | Community
Skip to main content
Level 4
June 21, 2023

Sling Sitemap schedular not working

  • June 21, 2023
  • 3 replies
  • 1808 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
June 21, 2023
Tanika02
Level 7
June 21, 2023

Hello @neha-1  - 

 

  • 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?

NehaMaAuthor
Level 4
June 22, 2023

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

 

Tanika02
Level 7
June 22, 2023

Hello @nehama - 

 

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

NehaMaAuthor
Level 4
June 28, 2023

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.