Issues with vanity_url rule on dispatcher | Community
Skip to main content
anandr1644048
New Participant
January 22, 2016
Solved

Issues with vanity_url rule on dispatcher

  • January 22, 2016
  • 15 replies
  • 8387 views

Hi All,

Have you used the following rules anytime at dispatcher?

/vanity_urls {    

     /url "/libs/granite/dispatcher/content/vanityUrls.html"  

       /file "/tmp/vanity_urls" 

        /delay 300

}

In our project we have allowed only certain pattern of url to be served from dispatcher. However vanity URL does not follow this pattern.

Documentation says that if we use above rule in the dispatcher then it would allow vanity URLs even though the pattern is not allowed in filter section. The problem that I am facing is , file "/tmp/vanity_urls" is not being created even though the dispatcher has write access. Can anybody let me know if they have faced the same issue ?

P.S : I have installed VanityURLS-Components and if I create  “/tmp/vanity_urls" manually and add vanity URLs , then the functionality is working fine. Issue is the vanity_urls file is not being created/updated periodically.

Env Details :

CQ : 5.6.1

Webserver : IBM Httpserver 7.0 ( 32 bit )

Dispatcher : dispatcher-apache2.2-linux-i686-4.1.11.tar.gz

Regards,

Anand

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

Have you verified the following URL works on the render instance - /libs/granite/dispatcher/content/vanityUrls.html ? Also, in the access.log file of the renderer find this URL and see if it is getting called after every 300 sec or not. If it is not getting called then enable debug [1] log level on dispatcher and monitor the dispatcher logs. 

If you do not see any message in the dispatcher log file as well then it will be good to raise this issue with on the day care support portal https://daycare.day.com/home/createaticket.html

[1] https://helpx.adobe.com/experience-manager/kb/troubleshooting-dispatcher-flushing-issues.html

15 replies

anandr1644048
New Participant
February 10, 2016

Hi Kristian,

I have copied /libs/granite/dispatcher/content/vanityUrls.html  to /content/vanityUrls.html and using /content/vanityUrls.html in the dispatcher configuration and i could able to hit /content/vanityUrls.html URL from the dispatcher without logging in.

When i restart my server and there is no vanity url text file in the server , then dispatcher hits /content/vanityUrls.html and stores the vanity url at tmp location and servers vanity URL. but any changes after the restart , is not being picked up by the server (  periodic vanity URL sync is not being performed )

Regards,

Anand

Kristian_Wright
New Participant
February 2, 2016

For clarification, I'm running dispatcher 4.1.11 Darwin (OSX).

Kristian_Wright
New Participant
January 29, 2016

anandr1644048 wrote...

/libs/granite/dispatcher/content/vanityUrls.html  is accessible and returns the list of available vanity url. but I don’t see any logs writing in access.log or dispatcher log files regarding ‘vanityUrls.html”

 

 

Hi anandr1644048,

When you call /libs/granite/dispatcher/content/vanityUrls.html are you calling it via the publish instance directly or via the dispatcher?  

I noticed that when I call localhost:4503/libs/granite/dispatcher/content/vanityUrls.html I get a 404 returned even though I installed the Vanity URLs components.  If I log into the publish instance and try again it correctly accesses the URL.  However when I call via the dispatcher, I get a 404.

So it seems that the call requires authentication.  When I request my vanity URL via dispatcher at publish.kristian.com/ktest I get the following in the dispatcher.log:

[Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] Found farm publish for publish.kristian.com [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] checking [/ktest] [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] request URL has no extension: /ktest [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] cache-action for [/ktest]: NONE [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] Checking vanity URLs [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] Vanity URL file (/Library/WebServer/Documents/publish/vanity_urls) not found, fetching... [Fri Jan 29 12:53:56 2016] [W] [75615(140735164698624)] Unable to fetch vanity URLs from localhost:4503/libs/granite/dispatcher/content/vanityUrls.html: remote server returned: HTTP/1.1 404 Not Found [Fri Jan 29 12:53:56 2016] [D] [75615(140735164698624)] Filter rejects: GET /ktest HTTP/1.1 [Fri Jan 29 12:53:56 2016] [I] [75615(140735164698624)] "GET /ktest" - - 7ms

and this is my access.log on the publish instance:

0:0:0:0:0:0:0:1 - anonymous 29/Jan/2016:13:10:42 +0800 "GET /libs/granite/dispatcher/content/vanityUrls.html HTTP/1.1" 404 126 "-" "-"

If I try and access the URL in my browser while logged into the publish instance via localhost:4503/libs/granite/dispatcher/content/vanityUrls.html this is the line in the access.log:

0:0:0:0:0:0:0:1 - admin 29/Jan/2016:13:13:25 +0800 "GET /libs/granite/dispatcher/content/vanityUrls.html HTTP/1.1" 200 7 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"

and I also have the correct output of /ktest on the screen from the Vanity URL component.

 

So it seems that either authentication is required for the call, or ACLs need to be updated to allow anon access to /libs/granite/dispatcher/content/vanityUrls.  Did you need to do this to get it working?

I'm running:

  • AEM 6.1
  • Apache 2.4
  • Dispatcher 4.1.11

 

Thanks,
Kristian

anandr1644048
New Participant
January 23, 2016

/libs/granite/dispatcher/content/vanityUrls.html  is accessible and returns the list of available vanity url. but I don’t see any logs writing in access.log or dispatcher log files regarding ‘vanityUrls.html”

Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Participant
January 22, 2016

Have you verified the following URL works on the render instance - /libs/granite/dispatcher/content/vanityUrls.html ? Also, in the access.log file of the renderer find this URL and see if it is getting called after every 300 sec or not. If it is not getting called then enable debug [1] log level on dispatcher and monitor the dispatcher logs. 

If you do not see any message in the dispatcher log file as well then it will be good to raise this issue with on the day care support portal https://daycare.day.com/home/createaticket.html

[1] https://helpx.adobe.com/experience-manager/kb/troubleshooting-dispatcher-flushing-issues.html